Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 438624

Summary: sys-devel/gcc-4.7.2: cross-compiling (canadian) triggers warning: include location "/usr/include/cloog-ppl" is unsafe for cross-compilation
Product: Gentoo Linux Reporter: Dennis Schridde <dschridde+gentoobugs>
Component: EclassesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info (host)
emerge --info (cross)

Description Dennis Schridde 2012-10-16 20:01:31 UTC
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
Comment 1 SpanKY gentoo-dev 2012-10-17 04:45:00 UTC
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.
Comment 2 Dennis Schridde 2012-10-17 09:01:18 UTC
Created attachment 326750 [details]
emerge --info (host)
Comment 3 Dennis Schridde 2012-10-17 09:01:36 UTC
Created attachment 326752 [details]
emerge --info (cross)
Comment 4 Dennis Schridde 2012-10-17 09:03:57 UTC
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.
Comment 5 SpanKY gentoo-dev 2012-10-17 19:45:28 UTC
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 ***
Comment 6 Dennis Schridde 2012-10-17 22:28:18 UTC
(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.