From c6e42384f1a1fe678ae947afd3558b5188c3e10e Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 25 Aug 2022 09:23:59 +0930 Subject: [PATCH] Re: LoongArch: ld: Fix bug not generate plt when link a dso Fixes loongarch32-elf +FAIL: medium jirl plt * testsuite/ld-loongarch-elf/cmodel.exp: Don't run test when no shared library support. --- ld/testsuite/ld-loongarch-elf/cmodel.exp | 27 +++++++++++++----------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/ld/testsuite/ld-loongarch-elf/cmodel.exp b/ld/testsuite/ld-loongarch-elf/cmodel.exp index 7ef972a44e5..bb28d336fd1 100644 --- a/ld/testsuite/ld-loongarch-elf/cmodel.exp +++ b/ld/testsuite/ld-loongarch-elf/cmodel.exp @@ -23,15 +23,18 @@ if ![istarget loongarch*-*-*] { return } -run_ld_link_tests [list \ - [list \ - "medium jirl plt" \ - "-shared" "" \ - "" \ - {libjirl.s} \ - [list \ - [list objdump -d cmodel-libjirl.dd] \ - ] \ - "libjirl.so" \ - ] \ - ] +if [check_shared_lib_support] { + run_ld_link_tests \ + [list \ + [list \ + "medium jirl plt" \ + "-shared" "" \ + "" \ + {libjirl.s} \ + [list \ + [list objdump -d cmodel-libjirl.dd] \ + ] \ + "libjirl.so" \ + ] \ + ] +} -- 2.30.2