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

Bug 311711

Summary: gcc -march=native and distcc
Product: Gentoo Linux Reporter: Gordon Pettey <petteyg359>
Component: [OLD] Core systemAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: enhancement CC: xarthisius
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---

Description Gordon Pettey 2010-03-28 04:36:19 UTC
distcc doesn't work with -march=native if a remote system has a different CPU than the target, because the remote system will compile with native for it's own CPU. Google tells me that the following command may be used to return the options gcc uses when -march=native:

gcc -march=native -E -v - </dev/null 2>&1 | sed -n 's/.* -v - //p'

Perhaps the distcc ebuild could have an einfo added to it suggesting use of this command to put in CFLAGS options that may be used with distcc across systems with differing CPUs.
Comment 1 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2010-03-28 10:17:01 UTC
Please read http://www.gentoo.org/doc/en/distcc.xml
It's explicitly stated there: "Don't use -march=native when compiling with distcc"
As for the einfo, this "one-liner" may be confusing for some users. It's far more beneficial to read 'man gcc' and pick proper march/mtune yourself.
Best regards,
Kacper Kowalik