diff options
author | YunQiang Su <yunqiang.su@cipunited.com> | 2023-05-16 09:46:46 +0800 |
---|---|---|
committer | YunQiang Su <yunqiang.su@cipunited.com> | 2023-06-05 11:00:15 +0800 |
commit | a0631c1501c113c04891c9a24a9ff5276257f28d (patch) | |
tree | 7696a5432fc270ecc1fc2d5d469f7db8d9e0756b /ld/testsuite/ld-plugin | |
parent | cb81e84c72933a7fad10b75b7e270d92d8d65251 (diff) | |
download | gdb-a0631c1501c113c04891c9a24a9ff5276257f28d.zip gdb-a0631c1501c113c04891c9a24a9ff5276257f28d.tar.gz gdb-a0631c1501c113c04891c9a24a9ff5276257f28d.tar.bz2 |
MIPS: fix some ld testcases with compiler
1. config/default.exp:
use -mabi=32 not for -gnuabi64
xfail_from_runlist: remove an element and mark it xfail.
2. ld-elf/indirect.exp: xfail
indirect5a indirect5b indirect6a indirect6b
indirect5c indirect5d indirect6c indirect6d
3. ld-elf/pr23658-2: mips output is not common
4. ld-elf/shared.exp: non-run on mips: Build libpr16496b.so
5. ld-elfvers/vers.exp:
xfail vers4, vers4b
no-run on mips: vers24a, vers24b, vers24c
6. ld-gc/gc.exp: add -KPIC into asflags for pr13683, pr14265, pr19161
7. ld-mips-elf/mips-elf.exp:
use noarch for mips16-local-stubs-1, since it use -mips4
8. ld-plugin/lto.exp:
no-run on mips/linux: PR ld/12982
add -KPIC into asflags for lto-3r, lto-5r, PR ld/19317 (2)
xfail PR ld/15323 (4), PR ld/19317 (3)
9. ld-plugin/plugin.exp: xfail
plugin claimfile lost symbol
plugin claimfile replace symbol
plugin claimfile replace symbol
plugin claimfile lost symbol with source
plugin claimfile replace symbol with source
plugin claimfile resolve symbol with source
plugin 2 with source lib
load plugin 2 with source
plugin 3 with source lib
load plugin 3 with source
11. ld-selective/selective.exp: add -fno-PIC, which is needed for -mno-abicalls
12. ld-shared/shared.exp: xfail shared (non PIC), shared (PIC main, non PIC so)
Diffstat (limited to 'ld/testsuite/ld-plugin')
-rw-r--r-- | ld/testsuite/ld-plugin/lto.exp | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/plugin.exp | 15 |
2 files changed, 25 insertions, 1 deletions
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index e7e7952..a4b546d 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -557,7 +557,7 @@ if { ! [istarget "arm*-*-*"] } { # when using the LTO plugin. The HPPA target however requires an # executable stack for syscall restarts and signal returns, so we # skip this test for that target. -if { ! [istarget "hppa*-*-*"] } { +if { ! [istarget "hppa*-*-*"] && ! [istarget "mips*-linux*"] } { lappend lto_link_elf_tests \ [list "PR ld/12982" \ "-O2 -flto -fuse-linker-plugin" "-O2 -flto" \ @@ -909,6 +909,10 @@ if { [at_least_gcc_version 4 7] } { } } +set save_asflags $ASFLAGS +if { [istarget "mips*-*-linux*"] } { + append ASFLAGS " -KPIC" +} # Run "ld -r" to generate inputs for complex LTO tests. run_dump_test "lto-3r" remote_exec host "mv" "tmpdir/dump tmpdir/lto-3.o" @@ -922,7 +926,12 @@ run_ld_link_tests [list \ "-r tmpdir/pr19317.o" "" "" \ {dummy.s} {} "pr19317-r.o"] \ ] +set ASFLAGS $save_asflags +if { [istarget "mips*-*-linux*"] } { + set lto_run_tests [xfail_from_runlist $lto_run_tests "PR ld/15323 (4)"] + set lto_run_tests [xfail_from_runlist $lto_run_tests "PR ld/19317 (3)"] +} run_ld_link_exec_tests $lto_run_tests if { [is_elf_format] } { diff --git a/ld/testsuite/ld-plugin/plugin.exp b/ld/testsuite/ld-plugin/plugin.exp index bbb8ced..ce7d406 100644 --- a/ld/testsuite/ld-plugin/plugin.exp +++ b/ld/testsuite/ld-plugin/plugin.exp @@ -295,6 +295,15 @@ if { !$can_compile || $failed_compile } { return } +if { [istarget "mips*-*-linux*"] } { + set plugin_tests [xfail_from_runlist $plugin_tests "plugin claimfile lost symbol"] + set plugin_tests [xfail_from_runlist $plugin_tests "plugin claimfile replace symbol"] + set plugin_tests [xfail_from_runlist $plugin_tests "plugin claimfile resolve symbol"] + set plugin_tests [xfail_from_runlist $plugin_tests "plugin claimfile lost symbol with source"] + set plugin_tests [xfail_from_runlist $plugin_tests "plugin claimfile replace symbol with source"] + set plugin_tests [xfail_from_runlist $plugin_tests "plugin claimfile resolve symbol with source"] + set plugin_tests [xfail_from_runlist $plugin_tests "plugin claimfile resolve symbol with source"] +} run_ld_link_tests $plugin_tests if { [is_elf_format] \ @@ -355,6 +364,12 @@ if { [regexp "0+ T func" "$plugin_nm_output"] && # Check if ar --plugin works. file delete tmpdir/libfunc.a +if { [istarget "mips*-*-linux*"] } { + set plugin_src_tests [xfail_from_runlist $plugin_src_tests "plugin 2 with source lib"] + set plugin_src_tests [xfail_from_runlist $plugin_src_tests "load plugin 2 with source"] + set plugin_src_tests [xfail_from_runlist $plugin_src_tests "plugin 3 with source lib"] + set plugin_src_tests [xfail_from_runlist $plugin_src_tests "load plugin 3 with source"] +} if [ar_simple_create $ar "--plugin $plugin2_path" "tmpdir/libfunc.a" \ "tmpdir/main.o $srcdir/$subdir/func.c"] { set testname "ar --plugin" |