Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 311711 - gcc -march=native and distcc
Summary: gcc -march=native and distcc
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-28 04:36 UTC by Gordon Pettey
Modified: 2010-03-28 10:17 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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