public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* suggestion for gold's testsuite makefile (initpri2 LDFLAGS)
@ 2012-02-06 12:07 John Marino
  2012-02-15  9:28 ` John Marino
  0 siblings, 1 reply; 4+ messages in thread
From: John Marino @ 2012-02-06 12:07 UTC (permalink / raw)
  To: binutils

The initpri2 test can only pass if the --ctors-in-init-array option is
enabled.  With a default build, Gold enables this option by default.
Still, the testsuite should not assume the option is enabled, it should
explicitly set it.

Suggestion to change line 2280 of Makefile.in FROM:
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri2_LDFLAGS = -Bgcctestdir/
TO
@GCC_TRUE@@NATIVE_LINKER_TRUE@initpri2_LDFLAGS = -Bgcctestdir/ -Wl,--ctors-in-init-array


As background, the BSDs need to build Gold with a modified options.h
file to set --no-ctors-in-init-array as the default.  I'm in the
process of getting DragonFly BSD to support DT_INIT_ARRAY and friends
and this test was failing even though the crt1.o had been properly
modified to support it.  Making this change either has no effect or
it means the difference between a pass or fail on a capable system
with a non-standard ctors-in-init-array default.

John

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

* Re: suggestion for gold's testsuite makefile (initpri2 LDFLAGS)
  2012-02-06 12:07 suggestion for gold's testsuite makefile (initpri2 LDFLAGS) John Marino
@ 2012-02-15  9:28 ` John Marino
  2012-02-16  2:15   ` Ian Lance Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: John Marino @ 2012-02-15  9:28 UTC (permalink / raw)
  To: binutils

On 2/6/2012 13:06, John Marino wrote:
> The initpri2 test can only pass if the --ctors-in-init-array option is
> enabled.  With a default build, Gold enables this option by default.
> Still, the testsuite should not assume the option is enabled, it should
> explicitly set it.
>
> Suggestion to change line 2280 of Makefile.in FROM:
> @GCC_TRUE@@NATIVE_LINKER_TRUE@initpri2_LDFLAGS = -Bgcctestdir/
> TO
> @GCC_TRUE@@NATIVE_LINKER_TRUE@initpri2_LDFLAGS = -Bgcctestdir/ -Wl,--ctors-in-init-array
>
>
> As background, the BSDs need to build Gold with a modified options.h
> file to set --no-ctors-in-init-array as the default.  I'm in the
> process of getting DragonFly BSD to support DT_INIT_ARRAY and friends
> and this test was failing even though the crt1.o had been properly
> modified to support it.  Making this change either has no effect or
> it means the difference between a pass or fail on a capable system
> with a non-standard ctors-in-init-array default.
>
> John


I don't think anybody responded to this post from last week, but I don't 
want it to fall between the cracks.  Is it a good idea to modify the 
gold testsuite makefile with this change?

John

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

* Re: suggestion for gold's testsuite makefile (initpri2 LDFLAGS)
  2012-02-15  9:28 ` John Marino
@ 2012-02-16  2:15   ` Ian Lance Taylor
  2012-02-16 19:39     ` Cary Coutant
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Lance Taylor @ 2012-02-16  2:15 UTC (permalink / raw)
  To: John Marino; +Cc: binutils

John Marino <binutils@marino.st> writes:

> On 2/6/2012 13:06, John Marino wrote:
>> The initpri2 test can only pass if the --ctors-in-init-array option is
>> enabled.  With a default build, Gold enables this option by default.
>> Still, the testsuite should not assume the option is enabled, it should
>> explicitly set it.
>>
>> Suggestion to change line 2280 of Makefile.in FROM:
>> @GCC_TRUE@@NATIVE_LINKER_TRUE@initpri2_LDFLAGS = -Bgcctestdir/
>> TO
>> @GCC_TRUE@@NATIVE_LINKER_TRUE@initpri2_LDFLAGS = -Bgcctestdir/ -Wl,--ctors-in-init-array
>>
>>
>> As background, the BSDs need to build Gold with a modified options.h
>> file to set --no-ctors-in-init-array as the default.  I'm in the
>> process of getting DragonFly BSD to support DT_INIT_ARRAY and friends
>> and this test was failing even though the crt1.o had been properly
>> modified to support it.  Making this change either has no effect or
>> it means the difference between a pass or fail on a capable system
>> with a non-standard ctors-in-init-array default.
>>
>> John
>
>
> I don't think anybody responded to this post from last week, but I
> don't want it to fall between the cracks.  Is it a good idea to modify
> the gold testsuite makefile with this change?

Yes, it's fine.  The obvious patch is preapproved if anybody cares to
commit it.

Sorry, I've been completely swamped.

Ian

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

* Re: suggestion for gold's testsuite makefile (initpri2 LDFLAGS)
  2012-02-16  2:15   ` Ian Lance Taylor
@ 2012-02-16 19:39     ` Cary Coutant
  0 siblings, 0 replies; 4+ messages in thread
From: Cary Coutant @ 2012-02-16 19:39 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: John Marino, binutils

>> I don't think anybody responded to this post from last week, but I
>> don't want it to fall between the cracks.  Is it a good idea to modify
>> the gold testsuite makefile with this change?
>
> Yes, it's fine.  The obvious patch is preapproved if anybody cares to
> commit it.

I have committed this change:

	* testsuite/Makefile.am (initpri2): Add --ctors-in-init-array option.
	* testsuite/Makefile.in: Regenerate.

-cary

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

end of thread, other threads:[~2012-02-16 19:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-06 12:07 suggestion for gold's testsuite makefile (initpri2 LDFLAGS) John Marino
2012-02-15  9:28 ` John Marino
2012-02-16  2:15   ` Ian Lance Taylor
2012-02-16 19:39     ` Cary Coutant

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).