https://llvm.org/bugs/show_bug.cgi?id=25185
Bug ID: 25185 Summary: -nostdlib -rtlib=compiler_rt fails, no mechanism to link libc.so Product: clang Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Driver Assignee: unassignedclangb...@nondot.org Reporter: n...@port70.net CC: llvm-bugs@lists.llvm.org Classification: Unclassified -rtlib is ignored after -nostdlib: $ clang -nostdlib -rtlib=compiler-rt t.c -o t clang-3.6: warning: argument unused during compilation: '-rtlib=compiler-rt' $ clang --version clang version 3.6.2 (tags/RELEASE_362/final) Target: armv6-alpine-linux-muslgnueabihf this makes it impossible to link libc.so which must use -nostdlib, but has to be linked against the right compiler runtime. there seems to be no way to discover (e.g. in a configure script) how to link to the right clang compiler runtime (this is most likely necessary for other freestanding code too, not just the c runtime). (the problem persists on trunk and target independent.) on gcc one can use either of gcc -nostdlib t.c -lgcc gcc -nostdlib t.c `gcc -print-file-name=libgcc.a` clang should either accept -rtlib or needs a similar mechanism to -print-file-name, in fact there are patches proposed along those lines: http://reviews.llvm.org/D10049 http://reviews.llvm.org/D10050 http://reviews.llvm.org/D10051 http://reviews.llvm.org/D10052 -- 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