diff options
author | Alan Modra <amodra@gmail.com> | 2025-04-14 10:03:22 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2025-04-15 06:59:15 +0930 |
commit | a4224b4ce14224ff81bd70f134254a088aca3931 (patch) | |
tree | fb0655d9d42ae069a24f900b43622df97c674b24 | |
parent | f844b66ad075678cb9b8326469e695bc71d37bb3 (diff) | |
download | binutils-a4224b4ce14224ff81bd70f134254a088aca3931.zip binutils-a4224b4ce14224ff81bd70f134254a088aca3931.tar.gz binutils-a4224b4ce14224ff81bd70f134254a088aca3931.tar.bz2 |
Re: ld: Skip the LTO archive member only for the earlier DSO
Add -fPIC when compiling the test, to fix complaints on some targets
about certains relocation not being valid for shared libraries.
-rw-r--r-- | ld/testsuite/ld-plugin/lto.exp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp index 726dd93..3a56fb5 100644 --- a/ld/testsuite/ld-plugin/lto.exp +++ b/ld/testsuite/ld-plugin/lto.exp @@ -1215,24 +1215,24 @@ if { [is_elf_format] && [check_lto_shared_available] } { if { [check_lto_fat_available] } { run_cc_link_tests [list \ [list \ - "Build libpr32846a.a" \ - "$plug_opt" "-O2 -flto $lto_no_fat" \ - {pr32846a.c pr32846b.c} {} "libpr32846a.a" \ + "Build libpr32846a.a" \ + "$plug_opt" "-fPIC -O2 -flto $lto_no_fat" \ + {pr32846a.c pr32846b.c} {} "libpr32846a.a" \ ] \ [list \ "Build libpr32846b.a" \ - "$plug_opt" "-O2 -flto $lto_no_fat" \ + "$plug_opt" "-fPIC -O2 -flto $lto_no_fat" \ {pr32846a.c pr32846b.c pr32846c.c} {} "libpr32846b.a" \ ] \ [list \ - "Build pr32846d.o" \ - "$plug_opt" "-O2 -flto $lto_no_fat" \ - {pr32846d.c} {} \ + "Build pr32846d.o" \ + "$plug_opt" "-fPIC -O2 -flto $lto_no_fat" \ + {pr32846d.c} {} \ ] \ [list \ - "Build pr32846e.o" \ - "$plug_opt" "-O2 -flto $lto_no_fat" \ - {pr32846e.c} {} \ + "Build pr32846e.o" \ + "$plug_opt" "-fPIC -O2 -flto $lto_no_fat" \ + {pr32846e.c} {} \ ] \ [list \ "Build pr32846" \ |