Fix loongarch*-elf target gld testsuite failure.
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_binutils_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 |
fail
|
Testing failed
|
linaro-tcwg-bot/tcwg_binutils_check--master-arm |
fail
|
Testing failed
|
Commit Message
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(-)
@@ -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"
+ }
}
@@ -1,6 +1,7 @@
#as:
#ld: -shared -z combreloc
#objdump: -R
+#skip: loongarch*-elf
.*: +file format .*
@@ -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 \