Re: LoongArch: ld: Fix bug not generate plt when link a dso
authorAlan Modra <amodra@gmail.com>
Wed, 24 Aug 2022 23:53:59 +0000 (09:23 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 25 Aug 2022 00:11:43 +0000 (09:41 +0930)
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

index 7ef972a44e54c401131e302d7132d155660f039e..bb28d336fd1a7361e92b71f6c8604c799ecb1447 100644 (file)
@@ -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" \
+            ] \
+       ]
+}