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: [PATCH] PR ld/19645: Properly implement STT_COMMON


On Tue, Jan 3, 2017 at 4:39 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> On Jan 03 2017, Andreas Schwab <schwab@linux-m68k.org> wrote:
>
>> On Feb 26 2016, "H.J. Lu" <hjl.tools@gmail.com> wrote:
>>
>>> diff --git a/ld/testsuite/ld-elfcomm/elfcomm.exp b/ld/testsuite/ld-elfcomm/elfcomm.exp
>>> index 81fd520..926b98c 100644
>>> --- a/ld/testsuite/ld-elfcomm/elfcomm.exp
>>> +++ b/ld/testsuite/ld-elfcomm/elfcomm.exp
>>
>>> @@ -187,7 +170,9 @@ if [istarget nios2*-*-*] {
>>>  # Explicitly use "-fcommon" so that even if $CFLAGS includes
>>>  # "-fno-common", these tests are compiled as expected.
>>>  if {   ![ld_compile "$CC $CFLAGS -fcommon" $srcdir/$subdir/common1a.c tmpdir/common1a.o]
>>> -    || ![ld_compile "$CC $CFLAGS -fcommon" $srcdir/$subdir/common1b.c tmpdir/common1b.o] } {
>>> +    || ![ld_compile "$CC $CFLAGS -fcommon" $srcdir/$subdir/common1b.c tmpdir/common1b.o]
>>> +    || ![ld_compile "$CC $CFLAGS -Wa,--elf-stt-common=yes -fcommon" $srcdir/$subdir/common1b.c tmpdir/common1c.o] } {
>>
>> This is passing --elf-stt-common=yes to the installed assembler, not the
>> newly built one.
>
> Actually, the problem is that -B doesn't override DEFAULT_ASSEMBLER or
> DEFAULT_LINKER.  Thus if the compiler was built with --with-as or
> --with-ld then many binutils tests do the wrong thing.
>
> Andreas.
>

True.  Many linker tests use -B to select the newly built assembler
and linker.  Should we disable linker tests if -B doesn't work?


-- 
H.J.


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