<div dir="ltr">Would be nice if you can also add a comment around the double-checking of llvm_unwinder, even something along the lines of "we need libgcc to appear both before and after... in the link order, for reasons thus far unknown to me" is fine. Just so that anyone looking through this in the future is at least made aware of this.<div><br></div><div>Cheers,</div><div><br><div>/ Asiri</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 23, 2016 at 8:25 PM, Adhemerval Zanella via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: azanella<br>
Date: Tue Aug 23 14:25:12 2016<br>
New Revision: 279552<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=279552&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=279552&view=rev</a><br>
Log:<br>
libcxx: Fix libcxx tests on aarch64 with libunwind<br>
<br>
Some tests uses 'long double' to/from conversions and for some targets<br>
they are provided by compiler runtime (either compiler-rt or libgcc).<br>
However when building libcxx with linunwinder current test configuration<br>
at target_info.py do not include the required libraries, as:<br>
<br>
not llvm_unwinder:<br>
"-lc++" "-lm" "-lgcc_s" "-lgcc" "-lpthread" "-lc" "-lgcc_s" "-lgcc"<br>
<br>
llvm_unwinder<br>
"-lc++" "-lm" "-lpthread" "-lc" "-lunwind" "-ldl"<br>
<br>
This causes some tests build issues with missing symbols on aarch64,<br>
for instance, where 'long double' is a binary float with 128-bits with<br>
mostly of internal operations being provided by software routines.<br>
<br>
This patch changes how to define the default linker flags with libunwinder by<br>
adding libgcc regardless.<br>
<br>
I checked and aarch64 and x86_64 with libcxx and libunwind (with and without<br>
LIBCXXABI_USE_LLVM_UNWINDER).<br>
<br>
Modified:<br>
libcxx/trunk/test/libcxx/test/<wbr>target_info.py<br>
<br>
Modified: libcxx/trunk/test/libcxx/test/<wbr>target_info.py<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/test/target_info.py?rev=279552&r1=279551&r2=279552&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/libcxx/trunk/test/<wbr>libcxx/test/target_info.py?<wbr>rev=279552&r1=279551&r2=<wbr>279552&view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- libcxx/trunk/test/libcxx/test/<wbr>target_info.py (original)<br>
+++ libcxx/trunk/test/libcxx/test/<wbr>target_info.py Tue Aug 23 14:25:12 2016<br>
@@ -180,7 +180,8 @@ class LinuxLocalTI(<wbr>DefaultTargetInfo):<br>
if llvm_unwinder:<br>
flags += ['-lunwind', '-ldl']<br>
else:<br>
- flags += ['-lgcc_s', '-lgcc']<br>
+ flags += ['-lgcc_s']<br>
+ flags += ['-lgcc']<br>
use_libatomic = self.full_config.get_lit_bool(<wbr>'use_libatomic', False)<br>
if use_libatomic:<br>
flags += ['-latomic']<br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>