[PATCH] libstdc++: Build libbacktrace and 19_diagnostics/stacktrace with -funwind-tables [PR111641]
Jonathan Wakely
jwakely@redhat.com
Tue May 28 14:34:20 GMT 2024
On Tue, 28 May 2024 at 15:25, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
>
> Several of the 19_diagnostics/stacktrace tests FAIL on Solaris/SPARC (32
> and 64-bit), Solaris/x86 (32-bit only), and several other targets:
>
> FAIL: 19_diagnostics/stacktrace/current.cc -std=gnu++23 execution test
> FAIL: 19_diagnostics/stacktrace/current.cc -std=gnu++26 execution test
> FAIL: 19_diagnostics/stacktrace/entry.cc -std=gnu++23 execution test
> FAIL: 19_diagnostics/stacktrace/entry.cc -std=gnu++26 execution test
> FAIL: 19_diagnostics/stacktrace/output.cc -std=gnu++23 execution test
> FAIL: 19_diagnostics/stacktrace/output.cc -std=gnu++26 execution test
> FAIL: 19_diagnostics/stacktrace/stacktrace.cc -std=gnu++23 execution test
> FAIL: 19_diagnostics/stacktrace/stacktrace.cc -std=gnu++26 execution test
>
> As it turns out, both the copy of libbacktrace in libstdc++ and the
> testcases proper need to compiled with -funwind-tables, as is done for
> libbacktrace itself.
>
> This isn't an issue on Linux/x86_64 and Solaris/amd64 since 64-bit x86
> always defaults to -funwind-tables. 32-bit x86 does, too, when
> -fomit-frame-pointer is enabled as on Linux/i686, but unlike
> Solaris/i386.
>
> So this patch always enables the option both for the libbacktrace copy
> and the testcases.
>
> Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11, and
> x86_64-pc-linux-gnu.
>
> Ok for trunk?
OK for trunk and gcc-14. Thanks for figuring out the problem here!
>
> Rainer
>
> --
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
>
>
> 2024-05-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
>
> libstdc++-v3:
> PR libstdc++/111641
> * src/libbacktrace/Makefile.am (AM_CFLAGS): Add -funwind-tables.
> * src/libbacktrace/Makefile.in: Regenerate.
>
> * testsuite/19_diagnostics/stacktrace/current.cc (dg-options): Add
> -funwind-tables.
> * testsuite/19_diagnostics/stacktrace/entry.cc: Likewise.
> * testsuite/19_diagnostics/stacktrace/hash.cc: Likewise.
> * testsuite/19_diagnostics/stacktrace/output.cc: Likewise.
> * testsuite/19_diagnostics/stacktrace/stacktrace.cc: Likewise.
>
More information about the Libstdc++
mailing list