public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libstdc++: enable <stacktrace> on windows
@ 2022-12-12 17:27 Björn Schäpers
  2023-01-14 22:02 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: Björn Schäpers @ 2022-12-12 17:27 UTC (permalink / raw)
  To: gcc-patches, libstdc++; +Cc: Björn Schäpers

From: Björn Schäpers <bjoern@hazardy.de>

libstdc++-v3/Changelog
	* acinclude.m4: Add check for windows.h.
	* acinclude.m4: Add pecoff as FORMAT_FILE.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* src/libbacktrace/Makefile.am: Regenerate.
	* src/libbacktrace/Makefile.in: Add pecoff.c as FORMAT_FILE.

Signed-off-by: Björn Schäpers <bjoern@hazardy.de>
---
 libstdc++-v3/acinclude.m4                 | 2 ++
 libstdc++-v3/src/libbacktrace/Makefile.am | 1 +
 2 files changed, 3 insertions(+)

diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index b957c728ba1..1cfe704e637 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -4981,6 +4981,7 @@ AC_DEFUN([GLIBCXX_ENABLE_BACKTRACE], [
   if test "$have_dl_iterate_phdr" = "yes"; then
     BACKTRACE_CPPFLAGS="$BACKTRACE_CPPFLAGS -DHAVE_DL_ITERATE_PHDR=1"
   fi
+  AC_CHECK_HEADERS(windows.h)
 
   # Check for the fcntl function.
   if test -n "${with_target_subdir}"; then
@@ -5026,6 +5027,7 @@ glibcxx_cv_sys_filetype=$filetype])
 FORMAT_FILE=
 case "$glibcxx_cv_sys_filetype" in
 elf*) FORMAT_FILE="elf.lo" ;;
+pecoff*) FORMAT_FILE="pecoff.lo" ;;
 *) AC_MSG_WARN([could not determine output file type])
    FORMAT_FILE="unknown.lo"
    enable_libstdcxx_backtrace=no
diff --git a/libstdc++-v3/src/libbacktrace/Makefile.am b/libstdc++-v3/src/libbacktrace/Makefile.am
index 52d8f81b97b..b34a429a21d 100644
--- a/libstdc++-v3/src/libbacktrace/Makefile.am
+++ b/libstdc++-v3/src/libbacktrace/Makefile.am
@@ -71,6 +71,7 @@ libstdc___libbacktrace_la_SOURCES = \
 
 FORMAT_FILES = \
 	elf.c \
+	pecoff.c \
 	unknown.c
 
 VIEW_FILES = \
-- 
2.38.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-14 22:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-12 17:27 [PATCH] libstdc++: enable <stacktrace> on windows Björn Schäpers
2023-01-14 22:02 ` Jonathan Wakely

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).