diff options
author | Sam James <sam@gentoo.org> | 2024-06-29 11:07:18 +0100 |
---|---|---|
committer | Andreas K. Hüttel <dilfridge@gentoo.org> | 2024-06-29 18:41:42 +0200 |
commit | a55d7656c66aed1182055c4b88d063e9dd43680a (patch) | |
tree | ff71b66a455cd89cc2c434772475df7c71713c61 | |
parent | Revert "Gentoo: Pass --hash-style=sysv to ld in the testsuite" (diff) | |
download | binutils-gdb-a55d7656c66aed1182055c4b88d063e9dd43680a.tar.gz binutils-gdb-a55d7656c66aed1182055c4b88d063e9dd43680a.tar.bz2 binutils-gdb-a55d7656c66aed1182055c4b88d063e9dd43680a.zip |
ld: pass -g for ld-elf testsgentoo/binutils-2.42-6gentoo/binutils-2.42
The "DWARF parse during linker error" and "Build warn libbar.so" tests
require debug information.
configure defaults to "-O2 -g" but if overriding *FLAGS when building
tests, this might be lost. Explicitly pass -g given these tests require
it.
Originally reported downstream in Gentoo at https://bugs.gentoo.org/934149.
ld/
* testsuite/ld-elf/dwarf.exp: Pass -g for "DWARF parse during linker error".
* testsuite/ld-elf/shared.exp: Ditto for "Build warn libbar.so".
(cherry picked from commit 17c78a23491ce76fd6d21cdbf2db3c0cf02145e0)
(cherry picked from commit 68ae8e2a84993ab77fdc48a61e1875cdc9db740a)
-rw-r--r-- | ld/testsuite/ld-elf/dwarf.exp | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/shared.exp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/ld/testsuite/ld-elf/dwarf.exp b/ld/testsuite/ld-elf/dwarf.exp index 6a63269562c..670551f88ad 100644 --- a/ld/testsuite/ld-elf/dwarf.exp +++ b/ld/testsuite/ld-elf/dwarf.exp @@ -50,7 +50,7 @@ set build_tests { "-s -shared" "-fPIC -g -feliminate-dwarf2-dups" {dwarf1.c} {} "libdwarf1.so"} {"DWARF parse during linker error" - "" "-fno-toplevel-reorder" + "" "-g -fno-toplevel-reorder" {dwarf2a.c dwarf2b.c} {{error_output "dwarf2.err"}} "dwarf2.x"} {"Handle no DWARF information" "" "-g0" diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp index 277dc7bf2de..d811738de76 100644 --- a/ld/testsuite/ld-elf/shared.exp +++ b/ld/testsuite/ld-elf/shared.exp @@ -552,7 +552,7 @@ set build_tests { "-shared" "-fPIC" {begin.c end.c} {} "libbar.so"} {"Build warn libbar.so" - "-shared" "-fPIC" + "-shared" "-fPIC -g" {beginwarn.c end.c} {{readelf {-S --wide} libbarw.rd} {warning {^.*beginwarn.c:7:\(.*\): warning: function foo is deprecated\n?$}}} |