Hi Tim, Meador Thanks for the review. The attached patch attempts to emulate the GCC behaviour for LIBRARY_PATH.
- Environment variable LLVM_HOST_TRIPLE created by the build system is compared with the -target option to determine if native compilation is used. - LIBRARY_PATH environment variable is now only supported when native compilation taking place. - I had to add a special case in the check for ARM vs Thumb to prevent this being considered a cross-compilation. - Clang::Driver/linker-opts.c can now take the "REQUIRES: native" predicate to only test on supported cases. I don't know if other target triples will need special casing in the code as ARM/Thumb has in my patch. If so the check needs to be adapted. Please review Thanks Rich > -----Original Message----- > From: Meador Inge [mailto:[email protected]] > Sent: 11 December 2013 17:32 > To: Tim Northover; Richard Barton > Cc: [email protected] > Subject: Re: [PATCH] Make Clang::Driver/linker-opts.c safe on a bare-metal > compiler > > On 12/11/2013 09:41 AM, Tim Northover wrote: > > > The GCC documentation > > (http://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html) seems > > to imply it's actually dependent on native vs cross rather than > > embedded vs Linux. This fits with a few cursory tests I've just done > > on my toolchains. > > This is correct. GCC only honors LIBRARY_PATH for native toolchains. > > -- > Meador Inge > CodeSourcery / Mentor Embedded
LIBRARY-PATH-native-only.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
