On Sat, 6 Aug 2011, Ian Lance Taylor wrote:
Marc Glisse <marc.glisse@xxxxxxxx> writes:
I noticed recently that unless I specify --with-ld=/usr/bin/ld or
--with-gnu-ld, the configuration system doesn't notice that I am using
the GNU binutils (HAVE_GNU_LD is set to 0). Is that done on purpose so
I can more easily use another linker ?
[...]
The current default is aimed at people who distribute the compiler,
since they might distribute it to a system with a different linker.
The current default actually seems to have a number of inconsistencies
which make it useless for distributors too.
When I change my PATH on solaris, all of the following macros change
values:
HAVE_GAS_SUBSECTION_ORDERING
HAVE_GAS_WEAKREF
HAVE_AS_LEB128
HAVE_GAS_CFI_PERSONALITY_DIRECTIVE
USE_AS_TRADITIONAL_FORMAT
HAVE_GAS_SHF_MERGE
HAVE_AS_TLS
HAVE_AS_IX86_FILDS
HAVE_AS_IX86_CMOV_SUN_SYNTAX
HAVE_AS_IX86_FFREEP
HAVE_AS_IX86_DIFF_SECT_DELTA
HAVE_AS_IX86_TLSGDPLT
HAVE_AS_IX86_TLSLDMPLT
HAVE_GAS_LCOMM_WITH_ALIGNMENT
HAVE_AS_GDWARF2_DEBUG_FLAG
HAVE_AS_GSTABS_DEBUG_FLAG
HAVE_AS_DEBUG_PREFIX_MAP
I think a recent enough version of binutils for LTO would make the
difference even larger.
But not all tests are changed (HAVE_GNU_AS for instance) and as/ld may
later be picked in MD_EXEC_PREFIX instead of PATH (which causes errors
if they are not the same).
I'm
not sure that is a good idea these days--I think that most distributors
are accustomed to using special configure options and that the defaults
should be for the people who use the compiler natively only. I would
support a change with appropriate notification on the changes page.
I think it isn't so much changing as fixing, so I am not sure there would
be much to notify about...
Thank you for your answer,
--
Marc Glisse