diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2024-05-29 10:08:07 +0200 |
---|---|---|
committer | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2024-05-29 10:08:07 +0200 |
commit | a99ebb88f8f25e76ebed5afc22e64fa77a2f0d3f (patch) | |
tree | 1c453cc997b5269f19c298ca7bd001a2a8acd4f8 /libstdc++-v3/testsuite/19_diagnostics | |
parent | 241a6cc88d866fb36bd35ddb3edb659453d6322e (diff) | |
download | gcc-a99ebb88f8f25e76ebed5afc22e64fa77a2f0d3f.zip gcc-a99ebb88f8f25e76ebed5afc22e64fa77a2f0d3f.tar.gz gcc-a99ebb88f8f25e76ebed5afc22e64fa77a2f0d3f.tar.bz2 |
libstdc++: Build libbacktrace and 19_diagnostics/stacktrace with -funwind-tables [PR111641]
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.
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.
Diffstat (limited to 'libstdc++-v3/testsuite/19_diagnostics')
5 files changed, 5 insertions, 5 deletions
diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc index b1af5f7..cdebd5f 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/current.cc @@ -1,4 +1,4 @@ -// { dg-options "-lstdc++exp" } +// { dg-options "-funwind-tables -lstdc++exp" } // { dg-do run { target c++23 } } // { dg-require-cpp-feature-test __cpp_lib_stacktrace } diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc index bb348eb..90671e6 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/entry.cc @@ -1,4 +1,4 @@ -// { dg-options "-lstdc++exp" } +// { dg-options "-funwind-tables -lstdc++exp" } // { dg-do run { target c++23 } } // { dg-require-cpp-feature-test __cpp_lib_stacktrace } diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/hash.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/hash.cc index 2176596..3c296a6 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/hash.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/hash.cc @@ -1,4 +1,4 @@ -// { dg-options "-lstdc++exp" } +// { dg-options "-funwind-tables -lstdc++exp" } // { dg-do run { target c++23 } } // { dg-require-cpp-feature-test __cpp_lib_stacktrace } diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc index e27aea1..ea9da7f 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/output.cc @@ -1,4 +1,4 @@ -// { dg-options "-lstdc++exp" } +// { dg-options "-funwind-tables -lstdc++exp" } // { dg-do run { target c++23 } } // { dg-require-cpp-feature-test __cpp_lib_stacktrace } // { dg-add-options no_pch } diff --git a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc index a49cddf..6bb22ea 100644 --- a/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc +++ b/libstdc++-v3/testsuite/19_diagnostics/stacktrace/stacktrace.cc @@ -1,4 +1,4 @@ -// { dg-options "-lstdc++exp" } +// { dg-options "-funwind-tables -lstdc++exp" } // { dg-do run { target c++23 } } // { dg-require-cpp-feature-test __cpp_lib_stacktrace } |