<div dir="ltr">Hi,<div><br></div><div style>When building using autoconf with libc++ on Linux, the override directive in 'lib/Target/PowerPC/TargetInfo/Makefile' on the CPPFLAGS variable causes compilation and linking errors. For compilation if the location of the libc++ headers are specified as command line overrides to gmake these will get clobbered, for linking the -stdlib=libc++ gets clobbered so LLVMPowerPCInfo.a is linked with libstdc++ causing undefined symbol errors when linking with libc++ linked libraries.</div>
<div style><br></div><div style>As an example here is how I configure the llvm build to produce errors.</div><div style><br></div><div style>LD_LIBRARY_PATH="/usr/local/lib/libc++:/usr/local/lib/libc++abi" CC=clang CXX=clang++ CPPFLAGS="-I/usr/local/include/c++/v1 -I/usr/local/include/c++abi" LDFLAGS="-L/usr/local/lib/libc++ -L/usr/local/lib/libc++abi -lc++ -lc++abi" ../configure --enable-optimized --enable-cxx11 --enable-libcpp<br>
</div><div style><br></div><div style>Attached is a patch that I think resolves the issue and is consistent with other TargetInfo makefiles.</div><div style><br></div><div style>Thanks</div><div style>~ry</div><div style>
<br></div></div>