[llvm-bugs] [Bug 25185] -nostdlib -rtlib=compiler_rt fails, no mechanism to link libc.so
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Jul 6 19:59:54 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=25185
Fangrui Song <i at maskray.me> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |i at maskray.me
Resolution|--- |FIXED
--- Comment #1 from Fangrui Song <i at maskray.me> ---
-rtlib= doesn't append an arg by itself. It changes the selected
libgcc/compiler-rt builtin file when -nodefaultlibs (implied by -nostdlib) is
used.
% clang -rtlib=libgcc --print-libgcc-file-name
/usr/lib/gcc/x86_64-linux-gnu/8.0.1/libgcc.a
% clang -rtlib=compiler-rt --print-libgcc-file-name
/home/ray/llvm/Release/lib/clang/9.0.0/lib/linux/libclang_rt.builtins-x86_64.a
> gcc -nostdlib t.c -lgcc
> gcc -nostdlib t.c `gcc -print-file-name=libgcc.a`
The counterpart is: clang -nostdlib `clang -rtlib=compiler-rt
--print-libgcc-file-name`
The compiler-rt builtin library doesn't use the name "libgcc.a" so
-print-file-name=libgcc.a doesn't work...
> https://reviews.llvm.org/D10049
Implemented by D31447
> https://reviews.llvm.org/D10050
Fixed
> https://reviews.llvm.org/D10051
Implemented by D25338
> https://reviews.llvm.org/D10052
May be not really necessary because --print-libgcc-file-name does the job..
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190707/69795688/attachment.html>
More information about the llvm-bugs
mailing list