This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gold linker 2.22 regressed for DragonFly


John Marino <binutils@marino.st> writes:

> Editing ld1_LDFLAGS to add --no-ctors-in-init-array is effectively this.
> Also the title of this post is "gold linker 2.22 REGRESSED for
> DragonFly".  gold linker 2.21 doesn't need this switch to build itself.

The --no-ctors-in-init-array option is new for 2.22.  It turns off new
functionality which was added in gold 2.22.  This new functionality only
works on a system which supports the DT_INIT_ARRAY dynamic tag.  My
guess is that DragonFly does not support that.  So, we need to have some
way for the configure script to detect whether DT_INIT_ARRAY works.  We
should be able to use gcc_AC_INITFINI_ARRAY as a model, from
gcc/acinclude.m4.

> I just drilled into the testsuite directory and typed ">gmake
> check-TESTS" and went through 137 tests.  DragonFly failed 42 of them
> (attached).

That doesn't work, you have to run "make check".  That is an automake
thing.

> I'm also getting several similar error messages like, "
> Makefile:2639: warning: overriding recipe for target 'ifuncmain1picstatic'
> Makefile:2636: warning: ignoring old recipe for target 'ifuncmain1picstatic'"

Interesting, this looks like it might be a bug in automake.  The code in
gold/testsuite/Makefile.am is:

if NATIVE_LINKER
if GCC
...
if IFUNC
...
if HAVE_STATIC
if IFUNC_STATIC
...
check_PROGRAMS += ifuncmain1picstatic
ifuncmain1picstatic: ifuncmain1pic.o ifuncmod1.o gcctestdir/ld
	$(LINK) -Bgcctestdir/ -static ifuncmain1pic.o ifuncmod1.o
endif
endif

The corresponding lines in gold/testsuite/Makefile.in, which is
generated by automake, are:

@GCC_FALSE@ifuncmain1picstatic$(EXEEXT): $(ifuncmain1picstatic_OBJECTS) $(ifuncmain1picstatic_DEPENDENCIES) 
...
@HAVE_STATIC_FALSE@ifuncmain1picstatic$(EXEEXT): $(ifuncmain1picstatic_OBJECTS) $(ifuncmain1picstatic_DEPENDENCIES) 
...
@IFUNC_FALSE@ifuncmain1picstatic$(EXEEXT): $(ifuncmain1picstatic_OBJECTS) $(ifuncmain1picstatic_DEPENDENCIES) 
...
@IFUNC_STATIC_FALSE@ifuncmain1picstatic$(EXEEXT): $(ifuncmain1picstatic_OBJECTS) $(ifuncmain1picstatic_DEPENDENCIES) 
...
@NATIVE_LINKER_FALSE@ifuncmain1picstatic$(EXEEXT): $(ifuncmain1picstatic_OBJECTS) $(ifuncmain1picstatic_DEPENDENCIES) 


It seems to me that automake should only be emitting the rules for
ifuncmain1picstatic$(EXEEXT) if all of the conditions are true.  I don't
know why it is emitting rules if any of the conditions are false.  When
any of the conditions are false, there is no reason to build
ifuncmain1picstatic at all.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]