https://llvm.org/bugs/show_bug.cgi?id=28855
Bug ID: 28855 Summary: clang 3.8.1 fails to link i386 macOS due to eprintf.c.o incorrectly being included in libclang_rt.osx.a Product: compiler-rt Version: unspecified Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: compiler-rt Assignee: unassignedb...@nondot.org Reporter: jerem...@apple.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified On MacPorts, our clang-3.8 port (built from the 3.8.1 tarballs) fails to link for i386 macOS because the built libclang_rt.osx.a incorrectly includes eprintf.c.o $ clang-mp-3.8 -arch i386 -bundle -undefined error -o libsasldb.plugin sasldb.lo sasldb_init.lo plugin_common.lo -all_load libsasldb.al -lresolv -v -Wl,-v clang version 3.8.1 (tags/RELEASE_381/final) Target: i386-apple-darwin16.0.0 Thread model: posix InstalledDir: /opt/local/libexec/llvm-3.8/bin "/opt/local/bin/ld" -demangle -dynamic -arch i386 -bundle -all_load -macosx_version_min 10.12.0 -undefined error -undefined error -o libsasldb.plugin sasldb.lo sasldb_init.lo plugin_common.lo libsasldb.al -lresolv -v -lSystem /opt/local/libexec/llvm-3.8/bin/../lib/clang/3.8.1/lib/darwin/libclang_rt.eprintf.a /opt/local/libexec/llvm-3.8/bin/../lib/clang/3.8.1/lib/darwin/libclang_rt.osx.a @(#)PROGRAM:ld PROJECT:ld64-274 configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS) Library search paths: /usr/lib /usr/local/lib Framework search paths: /Library/Frameworks/ /System/Library/Frameworks/ duplicate symbol ___eprintf in: /opt/local/libexec/llvm-3.8/bin/../lib/clang/3.8.1/lib/darwin/libclang_rt.eprintf.a(eprintf.c.o) /opt/local/libexec/llvm-3.8/bin/../lib/clang/3.8.1/lib/darwin/libclang_rt.osx.a(eprintf.c.o) ld: 1 duplicate symbol for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) --- The issue is still present recently on the release_39 branch: ~/tmp/bug $ nm -m /opt/local/libexec/llvm-3.9/lib/clang/3.9.0/lib/darwin/libclang_rt.osx.a | grep eprint /opt/local/libexec/llvm-3.9/lib/clang/3.9.0/lib/darwin/libclang_rt.osx.a(eprintf.c.o): 0000000000000000 (__TEXT,__text) private external ___eprintf ~/tmp/bug $ clang-mp-3.9 --version clang version 3.9.0 (branches/release_39 277311) Target: x86_64-apple-darwin16.0.0 Thread model: posix InstalledDir: /opt/local/libexec/llvm-3.9/bin -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs