This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] ld: amend "ld: Skip unsupported static executable tests"
>>> On 02.08.18 at 14:08, <hjl.tools@gmail.com> wrote:
> On Thu, Aug 2, 2018 at 1:14 AM, Jan Beulich <JBeulich@suse.com> wrote:
>> Said commit (98d72909f8) made the building of static_prog and
>> static_nonifunc_prog conditional, but then only added conditionals to
>> the tests involving the former. Also conditionalize the ones involving
>> the latter.
>>
>> ld/
>> 2018-08-02 Jan Beulich <jbeulich@suse.com>
>>
>> * testsuite/ld-ifunc/ifunc.exp: Also skip tests involving
>> static_nonifunc_prog when static builds are not possible.
>>
>> --- a/ld/testsuite/ld-ifunc/ifunc.exp
>> +++ b/ld/testsuite/ld-ifunc/ifunc.exp
>> @@ -284,7 +284,8 @@ if {! [check_osabi tmpdir/dynamic_prog $
>> fail "Dynamic ifunc-using executable does not have an OS/ABI field of $expected_none"
>> set fails [expr $fails + 1]
>> }
>> -if {! [check_osabi tmpdir/static_nonifunc_prog $expected_none]} {
>> +if { ![string match "" $STATIC_LDFLAGS] \
>> + && ! [check_osabi tmpdir/static_nonifunc_prog $expected_none]} {
>> fail "Static non-ifunc-using executable does not have an OS/ABI field of $expected_none"
>> set fails [expr $fails + 1]
>> }
>> @@ -310,7 +311,8 @@ if {[contains_ifunc_symbol tmpdir/dynami
>> fail "Dynamic ifunc-using executable contains an IFUNC symbol"
>> set fails [expr $fails + 1]
>> }
>> -if {[contains_ifunc_symbol tmpdir/static_nonifunc_prog] != 0} {
>> +if { ![string match "" $STATIC_LDFLAGS] \
>> + && [contains_ifunc_symbol tmpdir/static_nonifunc_prog] != 0} {
>> fail "Static non-ifunc-using executable contains an IFUNC symbol"
>> set fails [expr $fails + 1]
>> }
>> @@ -349,7 +351,8 @@ if {[contains_ifunc_reloc tmpdir/dynamic
>> fail "Dynamic ifunc-using executable contains a reloc against an IFUNC symbol"
>> set fails [expr $fails + 1]
>> }
>> -if {[contains_ifunc_reloc tmpdir/static_nonifunc_prog] == 1} {
>> +if { ![string match "" $STATIC_LDFLAGS] \
>> + && [contains_ifunc_reloc tmpdir/static_nonifunc_prog] == 1} {
>> fail "Static non-ifunc-using executable contains a reloc against an IFUNC symbol!"
>> set fails [expr $fails + 1]
>> }
>>
>
> STATIC_LDFLAGS only applies to tests which are linked against libc.a.
> Are the above tests linked against libc.a?
That's a question you should answer, I think, considering the original
change of yours where you suppress the building of static_nonifunc_prog
when STATIC_LDFLAGS is empty. The issue I'm observing is that the
binary simply doesn't exist, and hence the tests fail.
Jan