Ticket #28656 (closed defect: fixed)
zlib won't build correctly with clang (.so output instead of .dylib)
| Reported by: | vince@… | Owned by: | macports-tickets@… |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | ports | Version: | 1.9.2 |
| Keywords: | clang | Cc: | landonf@…, ryandesign@…, bradskins@…, jeremyhu@… |
| Port: | zlib |
Description
The Zlib configure script expect its compiler to contain the 'gcc' string, otherwise it branches to some default configuration that outputs a .so file (instead of .dylib). The following additional patch makes it work correctly with clang (llvm-gcc-4.2 works since it contains 'gcc').
Attachments
Change History
comment:1 Changed 2 years ago by vince@…
- Summary changed from zlib won't build with clang to zlib won't build correctly with clang (.so output instead of .dylib)
comment:2 Changed 2 years ago by jmr@…
Is there a reason we need to fix this in the port instead of just sending the patch upstream? We don't currently use clang to build zlib even on 10.7.
comment:3 Changed 2 years ago by vince@…
We could send the patch upstream, of course, but I think it might be wise in the future to allow people to choose between llvm-gcc-4.2 which has, anyhow, a limited lifespan, and clang, which will probably be the only available compiler in the near future. This might at least be useful to maintainers who could spot compilation problems or discrepancies between llvm-gcc-4.2 and clang and report them to the Apple clang team.

