0

I am trying to switch to gcc47+ setup in /usr/local/bin/gcc. The default system gcc is 4.4.6 in /usr/bin/gcc.

Similarly header files :

/usr/include/c++/4.4.4/bits/stl_pair.h /usr/local/include/c++/4.7.1/bits/stl_pair.h

I tried to build llvm clang with cd /apps/llvmbuild ; /apps/llvm/configure --prefix=/apps/llvmbuild --enable-optimized --enable-cxx11 --enable-docs=no --enable-targets=host-only --disable-assertions CPPFLAGS=-I/usr/local/include/ CXXFLAGS=-I/usr/local/include/

And then cd /apps/llvmbuild ; make -j12 ENABLE_OPTIMIZED=1 DISABLE_ASSERTIONS=1

but I am getting errors that show it is searching for c++ files in the 4.4.6 directory : /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/exception_ptr.h

locate exception_ptr.h
/usr/include/c++/4.4.4/exception_ptr.h
/usr/local/include/c++/4.7.1/bits/exception_ptr.h

1 Answer 1

1

Use CC and CXX environment variables. See configure --help for info:

Some influential environment variables:
  CC          C compiler command
  ...
  CXX         C++ compiler command

Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.

Something like this:

CXX=/usr/local/bin/g++ CC=/usr/local/bin/gcc /apps/llvm/configure --your --other --options
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.