[Bug lto/84847] [8 Regression] Incompatibility between early LTO debug and "-Wl,--gc-sections" leads to corrupt DWARF debuginfo
rguenther at suse dot de
gcc-bugzilla@gcc.gnu.org
Tue Mar 13 15:26:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84847
--- Comment #11 from rguenther at suse dot de <rguenther at suse dot de> ---
On Tue, 13 Mar 2018, hjl.tools at gmail dot com wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84847
>
> --- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> ---
> (In reply to rguenther@suse.de from comment #6)
> >
> > make check-target-libstdc++-v3 RUNTESTFLAGS="prettyprinters.exp"
>
> I tried:
>
> diff --git a/libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp
> b/libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp
> index c51b1ffb21c..fab6ef11947 100644
> --- a/libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp
> +++ b/libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp
> @@ -47,14 +47,6 @@ global PCH_CXXFLAGS
> gdb-dg-runtest [lsort [glob $srcdir/$subdir/*.cc]] \
> "" "$DEFAULT_CXXFLAGS $PCH_CXXFLAGS"
>
> -if { [check_effective_target_lto] } {
> - append cxxflags " -flto"
> - # work around sourceware.org 20882
> - regsub {^(.*)-Wl,--gc-sections(.*)$} $cxxldflags {\1\2} cxxldflags
> - gdb-dg-runtest [lsort [glob $srcdir/$subdir/*.cc]] \
> - "" "$DEFAULT_CXXFLAGS -flto $PCH_CXXFLAGS"
> -}
> -
> if [info exists guality_gdb_name] {
> unsetenv GUALITY_GDB_NAME
> }
Nah, just the following - you removed LTO testing of prettyprinters
Index: libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp
===================================================================
--- libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp
(revision 258481)
+++ libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp
(working copy)
@@ -50,7 +50,7 @@ gdb-dg-runtest [lsort [glob $srcdir/$sub
if { [check_effective_target_lto] } {
append cxxflags " -flto"
# work around sourceware.org 20882
- regsub {^(.*)-Wl,--gc-sections(.*)$} $cxxldflags {\1\2} cxxldflags
+ #regsub {^(.*)-Wl,--gc-sections(.*)$} $cxxldflags {\1\2} cxxldflags
gdb-dg-runtest [lsort [glob $srcdir/$subdir/*.cc]] \
"" "$DEFAULT_CXXFLAGS -flto $PCH_CXXFLAGS"
}
More information about the Gcc-bugs
mailing list