<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:i@maskray.me" title="Fangrui Song <i@maskray.me>"> <span class="fn">Fangrui Song</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - -nostdlib -rtlib=compiler_rt fails, no mechanism to link libc.so"
href="https://bugs.llvm.org/show_bug.cgi?id=25185">bug 25185</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">CC</td>
<td>
</td>
<td>i@maskray.me
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - -nostdlib -rtlib=compiler_rt fails, no mechanism to link libc.so"
href="https://bugs.llvm.org/show_bug.cgi?id=25185#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - -nostdlib -rtlib=compiler_rt fails, no mechanism to link libc.so"
href="https://bugs.llvm.org/show_bug.cgi?id=25185">bug 25185</a>
from <span class="vcard"><a class="email" href="mailto:i@maskray.me" title="Fangrui Song <i@maskray.me>"> <span class="fn">Fangrui Song</span></a>
</span></b>
<pre>-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
<span class="quote">> gcc -nostdlib t.c -lgcc
> gcc -nostdlib t.c `gcc -print-file-name=libgcc.a`</span >
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...
<span class="quote">> <a href="https://reviews.llvm.org/D10049">https://reviews.llvm.org/D10049</a></span >
Implemented by D31447
<span class="quote">> <a href="https://reviews.llvm.org/D10050">https://reviews.llvm.org/D10050</a></span >
Fixed
<span class="quote">> <a href="https://reviews.llvm.org/D10051">https://reviews.llvm.org/D10051</a></span >
Implemented by D25338
<span class="quote">> <a href="https://reviews.llvm.org/D10052">https://reviews.llvm.org/D10052</a></span >
May be not really necessary because --print-libgcc-file-name does the job..</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>