public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Ian Lance Taylor <ian@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r14-5173] libstdc++: use -D_GNU_SOURCE when building libbacktrace Date: Mon, 6 Nov 2023 23:11:58 +0000 (GMT) [thread overview] Message-ID: <20231106231158.0B5333858D35@sourceware.org> (raw) https://gcc.gnu.org/g:2b64e4a54042fb8f75f1c1429eb1c13afb9fa118 commit r14-5173-g2b64e4a54042fb8f75f1c1429eb1c13afb9fa118 Author: Ian Lance Taylor <iant@golang.org> Date: Mon Nov 6 15:09:18 2023 -0800 libstdc++: use -D_GNU_SOURCE when building libbacktrace PR libbacktrace/111315 PR libbacktrace/112263 * acinclude.m4: Set -D_GNU_SOURCE in BACKTRACE_CPPFLAGS and when grepping link.h for dl_iterate_phdr. * configure: Regenerate. Diff: --- libstdc++-v3/acinclude.m4 | 5 ++++- libstdc++-v3/configure | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 654b99e92d7..77569d5bb59 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -5443,7 +5443,7 @@ AC_DEFUN([GLIBCXX_ENABLE_BACKTRACE], [ # Most of this is adapted from libsanitizer/configure.ac - BACKTRACE_CPPFLAGS= + BACKTRACE_CPPFLAGS="-D_GNU_SOURCE" # libbacktrace only needs atomics for int, which we've already tested if test "$glibcxx_cv_atomic_int" = "yes"; then @@ -5471,8 +5471,11 @@ AC_DEFUN([GLIBCXX_ENABLE_BACKTRACE], [ have_dl_iterate_phdr=no else # When built as a GCC target library, we can't do a link test. + ac_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" AC_EGREP_HEADER([dl_iterate_phdr], [link.h], [have_dl_iterate_phdr=yes], [have_dl_iterate_phdr=no]) + CPPFLAGS="$ac_save_CPPFLAGS" fi if test "$have_dl_iterate_phdr" = "yes"; then BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_DL_ITERATE_PHDR=1" diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index a4b12de1f8a..155faf51922 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -73299,7 +73299,7 @@ fi # Most of this is adapted from libsanitizer/configure.ac - BACKTRACE_CPPFLAGS= + BACKTRACE_CPPFLAGS="-D_GNU_SOURCE" # libbacktrace only needs atomics for int, which we've already tested if test "$glibcxx_cv_atomic_int" = "yes"; then @@ -73382,6 +73382,8 @@ done have_dl_iterate_phdr=no else # When built as a GCC target library, we can't do a link test. + ac_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <link.h> @@ -73395,6 +73397,7 @@ else fi rm -f conftest* + CPPFLAGS="$ac_save_CPPFLAGS" fi if test "$have_dl_iterate_phdr" = "yes"; then BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_DL_ITERATE_PHDR=1"
reply other threads:[~2023-11-06 23:11 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20231106231158.0B5333858D35@sourceware.org \ --to=ian@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).