This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] ld: amend "ld: Skip unsupported static executable tests"
- From: "Jan Beulich" <JBeulich at suse dot com>
- To: <binutils at sourceware dot org>
- Cc: "Alan Modra" <amodra at gmail dot com>,"H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Thu, 02 Aug 2018 02:14:22 -0600
- Subject: [PATCH] ld: amend "ld: Skip unsupported static executable tests"
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]
}