[distcc] GCC bugfix and new "distccflags" script

Daniel Santos daniel.santos at pobox.com
Sat Sep 16 08:18:56 UTC 2017


I've written a new script to extrapolate -march=native into
distributable flags.  It depends upon PR39851
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39851) which is in 8.0 and
has just been backported to 6 and 7, so will be in their next release
(I'm not sure if the next minor version or revision).  Martin Liška has
done the heavy lifting here, I've just written a script to use his
bugfix.  I've released it here:
https://github.com/daniel-santos/distccflags

It still has room for refinement.  For example, some -m<isa> flags
implicitly include others.  Example:

$ export
CC="/home/daniel/proj/sys/gcc/builds/kdev-x86_64-pc-linux-gnu/gcc/xgcc
-B/home/daniel/proj/sys/gcc/builds/kdev-x86_64-pc-linux-gnu/gcc"
$ ./distccflags -march=k8 -mavx
CFLAGS="-march=k8 -mavx -mpopcnt -msse3 -msse4 -msse4.1 -msse4.2 -mssse3
-mxsave"

Everything after -mavx in the output here are implicitly included in
-mavx and aren't actually needed.  None the less, this cleans things up
quite a bit and you generally would just pass -march=native to the
script anyway.

Daniel



More information about the distcc mailing list