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.
Cheers, / Asiri On Tue, Aug 23, 2016 at 8:25 PM, Adhemerval Zanella via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: azanella > Date: Tue Aug 23 14:25:12 2016 > New Revision: 279552 > > URL: http://llvm.org/viewvc/llvm-project?rev=279552&view=rev > Log: > libcxx: Fix libcxx tests on aarch64 with libunwind > > Some tests uses 'long double' to/from conversions and for some targets > they are provided by compiler runtime (either compiler-rt or libgcc). > However when building libcxx with linunwinder current test configuration > at target_info.py do not include the required libraries, as: > > not llvm_unwinder: > "-lc++" "-lm" "-lgcc_s" "-lgcc" "-lpthread" "-lc" "-lgcc_s" "-lgcc" > > llvm_unwinder > "-lc++" "-lm" "-lpthread" "-lc" "-lunwind" "-ldl" > > This causes some tests build issues with missing symbols on aarch64, > for instance, where 'long double' is a binary float with 128-bits with > mostly of internal operations being provided by software routines. > > This patch changes how to define the default linker flags with libunwinder > by > adding libgcc regardless. > > I checked and aarch64 and x86_64 with libcxx and libunwind (with and > without > LIBCXXABI_USE_LLVM_UNWINDER). > > Modified: > libcxx/trunk/test/libcxx/test/target_info.py > > Modified: libcxx/trunk/test/libcxx/test/target_info.py > URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/ > libcxx/test/target_info.py?rev=279552&r1=279551&r2=279552&view=diff > ============================================================ > ================== > --- libcxx/trunk/test/libcxx/test/target_info.py (original) > +++ libcxx/trunk/test/libcxx/test/target_info.py Tue Aug 23 14:25:12 2016 > @@ -180,7 +180,8 @@ class LinuxLocalTI(DefaultTargetInfo): > if llvm_unwinder: > flags += ['-lunwind', '-ldl'] > else: > - flags += ['-lgcc_s', '-lgcc'] > + flags += ['-lgcc_s'] > + flags += ['-lgcc'] > use_libatomic = self.full_config.get_lit_bool('use_libatomic', > False) > if use_libatomic: > flags += ['-latomic'] > > > _______________________________________________ > cfe-commits mailing list > cfe-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits