[PATCH] D23420: libcxx: Fix libcxx test on aarch64 with libunwind

Eric Fiselier via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 11 14:55:21 PDT 2016

EricWF added a subscriber: EricWF.
EricWF added a reviewer: EricWF.
EricWF added a comment.

Urg... Not this again. This link order is important. I can't remember *why*, but libgcc has to appear both before and after `pthread` and `libc` IIRC.  Either way the intention here is to mimic the output of Clangs driver. For example the order Clang generates on Linux is:

  // clang++ -### -pthread -stdlib=libc++ -xc++ - < /dev/null
  "-lc++" "-lm" "-lgcc_s" "-lgcc" "-lpthread" "-lc" "-lgcc_s" "-lgcc"

What link order does the compiler generate on your platform?


More information about the cfe-commits mailing list