libstdc++: enable <stacktrace> on windows
Checks
Commit Message
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(+)
Comments
On Mon, 12 Dec 2022 at 17:28, Björn Schäpers <gcc@hazardy.de> wrote:
>
> 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.
Thanks, I've pushed this one too.
>
> 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
>
@@ -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
@@ -71,6 +71,7 @@ libstdc___libbacktrace_la_SOURCES = \
FORMAT_FILES = \
elf.c \
+ pecoff.c \
unknown.c
VIEW_FILES = \