public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Lulu Cai <cailulu@loongson.cn>
To: binutils@sourceware.org
Cc: xuchenghua@loongson.cn, chenglulu@loongson.cn,
	liuzhensong@loongson.cn, mengqinggang@loongson.cn,
	xry111@xry111.site, i.swmail@xen0n.name, maskray@google.com,
	luweining@loongson.cn, wanglei@loongson.cn,
	hejinyang@loongson.cn, nickc@redhat.com,
	Lulu Cai <cailulu@loongson.cn>
Subject: [PATCH] Fix loongarch*-elf target gld testsuite failure.
Date: Wed, 27 Dec 2023 17:38:47 +0800	[thread overview]
Message-ID: <20231227093847.2133271-1-cailulu@loongson.cn> (raw)

The loongarch*-elf target does not support SHARED and PIE, so this
target is skipped for some tests that require these options.
---
 ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp | 10 +++++++---
 ld/testsuite/ld-loongarch-elf/local-ifunc-reloc.d  |  1 +
 ld/testsuite/ld-loongarch-elf/relax.exp            |  4 ++++
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp b/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp
index 2a5709a5b55..460efb1fa1d 100644
--- a/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp
+++ b/ld/testsuite/ld-loongarch-elf/ld-loongarch-elf.exp
@@ -42,8 +42,9 @@ if [istarget "loongarch32-*-*"] {
     run_dump_test "disas-jirl-32"
 }
 
-if [istarget "loongarch64-*-*"] {
-  run_ld_link_tests \
+if [check_shared_lib_support] {
+  if [istarget "loongarch64-*-*"] {
+    run_ld_link_tests \
       [list \
 	  [list \
 	      "64_pcrel" \
@@ -56,6 +57,8 @@ if [istarget "loongarch64-*-*"] {
 	      "64_pcrel" \
 	  ] \
       ]
+  }
+}
 
   run_ld_link_tests \
       [list \
@@ -68,13 +71,14 @@ if [istarget "loongarch64-*-*"] {
 	      "medium-call" \
 	  ] \
       ]
-}
 
 if [istarget "loongarch64-*-*"] {
+  if [check_shared_lib_support] {
     run_dump_test "desc-ie"
     run_dump_test "desc-le"
     run_dump_test "ie-le"
     run_dump_test "tlsdesc-dso"
     run_dump_test "desc-norelax"
     run_dump_test "desc-relax"
+  }
 }
diff --git a/ld/testsuite/ld-loongarch-elf/local-ifunc-reloc.d b/ld/testsuite/ld-loongarch-elf/local-ifunc-reloc.d
index bf73d9f2875..8e1d3f0d266 100644
--- a/ld/testsuite/ld-loongarch-elf/local-ifunc-reloc.d
+++ b/ld/testsuite/ld-loongarch-elf/local-ifunc-reloc.d
@@ -1,6 +1,7 @@
 #as:
 #ld: -shared -z combreloc
 #objdump: -R
+#skip: loongarch*-elf
 
 .*: +file format .*
 
diff --git a/ld/testsuite/ld-loongarch-elf/relax.exp b/ld/testsuite/ld-loongarch-elf/relax.exp
index 77323d8d7a3..d0faa23c57a 100644
--- a/ld/testsuite/ld-loongarch-elf/relax.exp
+++ b/ld/testsuite/ld-loongarch-elf/relax.exp
@@ -68,6 +68,7 @@ if [istarget loongarch64-*-*] {
       }
     }
 
+  if [check_shared_lib_support] {
     run_ld_link_tests \
 	[list \
 	    [list \
@@ -114,8 +115,10 @@ if [istarget loongarch64-*-*] {
 		"relax-segment-max" \
 	    ] \
 	]
+    }
   }
 
+  if [check_shared_lib_support] {
   run_ld_link_tests \
       [list \
 	  [list \
@@ -129,6 +132,7 @@ if [istarget loongarch64-*-*] {
 	      "relax-align" \
 	  ] \
       ]
+  }
 
   set objdump_flags "-s -j .data"
   run_ld_link_tests \
-- 
2.36.0


             reply	other threads:[~2023-12-27  9:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-27  9:38 Lulu Cai [this message]
2023-12-28  6:18 ` [PATCH] Fix loongarch*-elf target ld " Lulu Cai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231227093847.2133271-1-cailulu@loongson.cn \
    --to=cailulu@loongson.cn \
    --cc=binutils@sourceware.org \
    --cc=chenglulu@loongson.cn \
    --cc=hejinyang@loongson.cn \
    --cc=i.swmail@xen0n.name \
    --cc=liuzhensong@loongson.cn \
    --cc=luweining@loongson.cn \
    --cc=maskray@google.com \
    --cc=mengqinggang@loongson.cn \
    --cc=nickc@redhat.com \
    --cc=wanglei@loongson.cn \
    --cc=xry111@xry111.site \
    --cc=xuchenghua@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).