Building runtime uses headers from different GCC version

I’m building llvm, clang and the openmp runtime on a centos 7 machine (for portability and old glibc version). The GCC version on centos 7 by default is too old so I’ve tried installing newer GCC versions using either conda or building a newer GCC from sources. The former goes in a conda environment directory and by default the latter goes in /usr/local/bin. If I set CC and CXX to those newer compilers then my expectation is that the clang built as part of the lllvm build that is then used to build the openmp runtime would use the headers associated with that newer compiler. Instead, the newly built clang always wants to use centos’ default GCC 4.8.5 headers in /usr/include. What do I need to do to get the new clang to use the newer GCC’s include files?

1 Like