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

Bug 568306

Summary: sys-devel/{gcc,binutils}: make cross-compiling poison logic kick in based on --sysroot settings
Product: Gentoo Linux Reporter: SpanKY <vapier>
Component: Current packagesAssignee: Gentoo Crossdev team <crossdev>
Status: RESOLVED WONTFIX    
Severity: enhancement    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 627914    

Description SpanKY gentoo-dev 2015-12-15 05:52:52 UTC
atm, we enable the poisoned system flags only for cross-compilers.  we should make these flags always available (even native toolchains), and by default only enable the warning when the active sysroot is not /.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2019-12-22 23:57:49 UTC
I guess it's specifically about the https://gitweb.gentoo.org/repo/gentoo.git/tree/eclass/toolchain.eclass#n1018:

	### Cross-compiler options
	if is_crosscompile ; then
		# Enable build warnings by default with cross-compilers when system
		# paths are included (e.g. via -I flags).
		confgcc+=( --enable-poison-system-directories )
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2019-12-23 00:12:55 UTC
Gentoo stopped applying gcc-poison-system-directories.patch after gcc-5.5.0.

openembedded has a refreshed version of the patch:
    http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gcc/gcc-9.2/0002-gcc-poison-system-directories.patch

Does not looks like the patch ever meant to be applied upstream. I suggest upstreaming some form of this patch instead and make enhancements there.