From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7854) id DD9EA3858D28; Mon, 7 Nov 2022 12:16:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD9EA3858D28 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Cl?ment Chigot To: bfd-cvs@sourceware.org Subject: [binutils-gdb] ld/testsuite: skip tests related to -shared when disabled X-Act-Checkin: binutils-gdb X-Git-Author: =?utf-8?q?Cl=C3=A9ment_Chigot?= X-Git-Refname: refs/heads/master X-Git-Oldrev: 092a151a38c1bd87f25d1d03d4089a25b1bfbbc8 X-Git-Newrev: 8bfb6941c358ee2da8320125644c59bf90842f6b Message-Id: <20221107121654.DD9EA3858D28@sourceware.org> Date: Mon, 7 Nov 2022 12:16:54 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Nov 2022 12:16:55 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D8bfb6941c358= ee2da8320125644c59bf90842f6b commit 8bfb6941c358ee2da8320125644c59bf90842f6b Author: Cl=C3=A9ment Chigot Date: Fri Nov 4 16:52:05 2022 +0100 ld/testsuite: skip tests related to -shared when disabled =20 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. =20 ld/ChangeLog: =20 * testsuite/ld-elfvers/vers.exp: Call check_shared_lib_support. * testsuite/ld-elfweak/elfweak.exp: Likewise. * testsuite/ld-shared/shared.exp: Likewise. Diff: --- 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(+) diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/ver= s.exp index 3e2ba2aac07..2e44d4a410f 100644 --- a/ld/testsuite/ld-elfvers/vers.exp +++ b/ld/testsuite/ld-elfvers/vers.exp @@ -27,6 +27,11 @@ if { ![check_compiler_available] } { return } =20 +# 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. diff --git a/ld/testsuite/ld-elfweak/elfweak.exp b/ld/testsuite/ld-elfweak/= elfweak.exp index 99188654df1..69826803a17 100644 --- a/ld/testsuite/ld-elfweak/elfweak.exp +++ b/ld/testsuite/ld-elfweak/elfweak.exp @@ -27,6 +27,11 @@ if { ![check_compiler_available] } { return } =20 +# 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. diff --git a/ld/testsuite/ld-shared/shared.exp b/ld/testsuite/ld-shared/sha= red.exp index 229fddbd436..94e03fceff9 100644 --- a/ld/testsuite/ld-shared/shared.exp +++ b/ld/testsuite/ld-shared/shared.exp @@ -30,6 +30,11 @@ if { ![check_compiler_available] } { return } =20 +# 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*] \