public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* GNU Binutils not auto-detected
@ 2011-08-06 12:47 Marc Glisse
  2011-08-06 16:05 ` Ian Lance Taylor
  2011-08-06 19:42 ` Jonathan Wakely
  0 siblings, 2 replies; 5+ messages in thread
From: Marc Glisse @ 2011-08-06 12:47 UTC (permalink / raw)
  To: gcc-help

Hello,

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 ?

On Linux that means I am missing a few extra features.

On Solaris, it will use the first ld on the PATH (which might be GNU) but 
give it options as if it was the Oracle linker.

-- 
Marc Glisse

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GNU Binutils not auto-detected
  2011-08-06 12:47 GNU Binutils not auto-detected Marc Glisse
@ 2011-08-06 16:05 ` Ian Lance Taylor
  2011-08-06 17:36   ` Marc Glisse
  2011-08-06 19:42 ` Jonathan Wakely
  1 sibling, 1 reply; 5+ messages in thread
From: Ian Lance Taylor @ 2011-08-06 16:05 UTC (permalink / raw)
  To: gcc-help

Marc Glisse <marc.glisse@inria.fr> 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 ?
>
> On Linux that means I am missing a few extra features.
>
> On Solaris, it will use the first ld on the PATH (which might be GNU)
> but give it options as if it was the Oracle linker.

The current default is aimed at people who distribute the compiler,
since they might distribute it to a system with a different linker.  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.

Ian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GNU Binutils not auto-detected
  2011-08-06 16:05 ` Ian Lance Taylor
@ 2011-08-06 17:36   ` Marc Glisse
  0 siblings, 0 replies; 5+ messages in thread
From: Marc Glisse @ 2011-08-06 17:36 UTC (permalink / raw)
  To: gcc-help

On Sat, 6 Aug 2011, Ian Lance Taylor wrote:

> Marc Glisse <marc.glisse@inria.fr> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GNU Binutils not auto-detected
  2011-08-06 12:47 GNU Binutils not auto-detected Marc Glisse
  2011-08-06 16:05 ` Ian Lance Taylor
@ 2011-08-06 19:42 ` Jonathan Wakely
  2011-08-06 20:00   ` Marc Glisse
  1 sibling, 1 reply; 5+ messages in thread
From: Jonathan Wakely @ 2011-08-06 19:42 UTC (permalink / raw)
  To: gcc-help

On 6 August 2011 13:46, Marc Glisse wrote:
> Hello,
>
> 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 ?
>
> On Linux that means I am missing a few extra features.

Huh, I had misunderstood "Same as --with-gnu-as" at
http://gcc.gnu.org/install/configure.html#with-gnu-ld to mean that
--with-gnu-ld had no effect except on the four platforms mentioned by
the --with-gnu-as docs.  I wonder how many GCC installations I've done
over the past few years where I got that wrong ...

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: GNU Binutils not auto-detected
  2011-08-06 19:42 ` Jonathan Wakely
@ 2011-08-06 20:00   ` Marc Glisse
  0 siblings, 0 replies; 5+ messages in thread
From: Marc Glisse @ 2011-08-06 20:00 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

On Sat, 6 Aug 2011, Jonathan Wakely wrote:

> On 6 August 2011 13:46, Marc Glisse wrote:
>> Hello,
>>
>> 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 ?
>>
>> On Linux that means I am missing a few extra features.
>
> Huh, I had misunderstood "Same as --with-gnu-as" at
> http://gcc.gnu.org/install/configure.html#with-gnu-ld to mean that
> --with-gnu-ld had no effect except on the four platforms mentioned by
> the --with-gnu-as docs.  I wonder how many GCC installations I've done
> over the past few years where I got that wrong ...

The --with-gnu-as documentation is lying too (even if you replace sparc 
with *). The differences are negligible, but they exist.

-- 
Marc Glisse

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-08-06 20:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-06 12:47 GNU Binutils not auto-detected Marc Glisse
2011-08-06 16:05 ` Ian Lance Taylor
2011-08-06 17:36   ` Marc Glisse
2011-08-06 19:42 ` Jonathan Wakely
2011-08-06 20:00   ` Marc Glisse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).