eclass/toolchain.eclass sets: confgcc+=" --with-cloog-include=/usr/include/cloog-ppl" This leads to: cc1: warning: include location "/usr/include/cloog-ppl" is unsafe for cross-compilation [-Wpoison-system-directories] ... during cross-compilation of GCC with CC="${CHOST}-gcc --sysroot ...". The eclass should probably set --with-cloog-include=${PREFIX}/usr/include/cloog-ppl instead. It does not seem to cause any major problem in my case, hence I choose minor severity. Reproducible: Always
sorry, but please provide more details. it's hard to guess at what you're doing here and the proper fix without them. start with `emerge --info`, as well as details on your cross-compiler, as well as whatever it is you're compiling that triggers these warnings.
Created attachment 326750 [details] emerge --info (host)
Created attachment 326752 [details] emerge --info (cross)
I have also set: export FC="${CHOST}-gfortran --sysroot=${SYSROOT}" export CC="${CHOST}-gcc --sysroot=${SYSROOT}" export CXX="${CHOST}-g++ --sysroot=${SYSROOT}" … with CHOST set to the cross-compile CHOST, i.e. !=CBUILD. I was trying to build sys-devel/gcc-4.7.2.
why are you exporting toolchain variables that way ? the cross-compiler itself takes care of setting the correct sysroot. for now, use USE=-graphite *** This bug has been marked as a duplicate of bug 406359 ***
(In reply to comment #5) > why are you exporting toolchain variables that way ? the cross-compiler > itself takes care of setting the correct sysroot. I am building with SYSROOT=/path/to/target and want to use the cross-compiler in /usr/$CHOST for that. I.e. it shall search in $SYSROOT/usr/include by default, instead of /usr/$CHOST/usr/include.