Review of --enable-gold=both patch

Mark Mitchell mark@codesourcery.com
Mon Jun 28 07:09:00 GMT 2010


I've reviewed this patch:

http://gcc.gnu.org/ml/gcc-patches/2010-04/txt00090.txt

I think the general idea is good, but I'm not happy about a couple of
details:

* --enable-gold=both and --enable-gold=ld are not good spellings.

We already have --with-gnu-ld and --with-ld=/some/path.  Instead of
--enable-gold (or --enable=gold=gold), we should add --with-gold.  And,
if both --with-gnu-ld and --with-gold are present, that can be
equivalent to --enable-gold=both.

You also need to define what --with-ld does in the presence of
--with-gnu-ld and --with-gold.  I recommend that --with-ld sets the GNU
ld path, and that --with-gold=/some/path sets the gold path.  (Bonus
points if you make --with-gnu-ld=/some/path work too.)

* The stuff where we figure out what target support gold is too much of
 a hack.  Every time someone changes gold, we'll have to change that
too.  If the user says --with-gold, just believe them.  For a one-tree
build, gold's configure script will presumably complain.

Also, please do not include generated files (configure) in patches.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list