ld/testsuite: skip tests related to -shared when disabled
Checks
Commit Message
I didn't remove the hardcoded switch below as I'm not sure if some
platforms still want to skip these tests even if the shared support is
there.
---
Call the helper function "check_shared_lib_support" to ensure -shared
is enabled before launching ld-shared, ld-elfweak and ld-elfvers.
This allows to catch custom targets explicitly disabling it.
ld/ChangeLog:
* testsuite/ld-elfvers/vers.exp: Call check_shared_lib_support.
* testsuite/ld-elfweak/elfweak.exp: Likewise.
* testsuite/ld-shared/shared.exp: Likewise.
---
ld/testsuite/ld-elfvers/vers.exp | 5 +++++
ld/testsuite/ld-elfweak/elfweak.exp | 5 +++++
ld/testsuite/ld-shared/shared.exp | 5 +++++
3 files changed, 15 insertions(+)
Comments
Hi Clément,
> Call the helper function "check_shared_lib_support" to ensure -shared
> is enabled before launching ld-shared, ld-elfweak and ld-elfvers.
> This allows to catch custom targets explicitly disabling it.
>
> ld/ChangeLog:
>
> * testsuite/ld-elfvers/vers.exp: Call check_shared_lib_support.
> * testsuite/ld-elfweak/elfweak.exp: Likewise.
> * testsuite/ld-shared/shared.exp: Likewise.
Approved, please apply.
Cheers
Nick
@@ -27,6 +27,11 @@ if { ![check_compiler_available] } {
return
}
+# Skip targets where -shared is not supported
+if { ![check_shared_lib_support] } {
+ return
+}
+
# This test can only be run on a couple of ELF platforms.
# Square bracket expressions seem to confuse istarget.
# This is similar to the test that is used in ld-shared, BTW.
@@ -27,6 +27,11 @@ if { ![check_compiler_available] } {
return
}
+# Skip targets where -shared is not supported
+if { ![check_shared_lib_support] } {
+ return
+}
+
# This test can only be run on a couple of ELF platforms.
# Square bracket expressions seem to confuse istarget.
# This is similar to the test that is used in ld-shared, BTW.
@@ -30,6 +30,11 @@ if { ![check_compiler_available] } {
return
}
+# Skip targets where -shared is not supported
+if { ![check_shared_lib_support] } {
+ return
+}
+
# This test can only be run on a couple of ELF platforms.
# Square bracket expressions seem to confuse istarget.
if { ![istarget hppa*64*-*-hpux*] \