]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
ld: pass -g for ld-elf tests
authorSam James <sam@gentoo.org>
Sat, 29 Jun 2024 10:07:18 +0000 (11:07 +0100)
committerSam James <sam@gentoo.org>
Sat, 29 Jun 2024 16:13:14 +0000 (17:13 +0100)
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".

ld/testsuite/ld-elf/dwarf.exp
ld/testsuite/ld-elf/shared.exp

index a4748a47c988fa5e0496c2567fd32b33380bba45..1ca1ec54763256b1fa0c4ebd7c8924a37456e449 100644 (file)
@@ -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"}
 }
 
index 9e89077af89b51cae3a48eecaa3e278efba42288..97ca778bc8e63699b25833ddfc2e2898ff9ce74e 100644 (file)
@@ -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?$}}}