ld/testsuite: skip tests related to -shared when disabled

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.
This commit is contained in:
Clément Chigot 2022-11-04 16:52:05 +01:00
parent 092a151a38
commit 8bfb6941c3
3 changed files with 15 additions and 0 deletions

View File

@ -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.

View File

@ -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.

View File

@ -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*] \