diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2022-01-19 14:20:52 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2022-01-19 14:23:13 +0000 |
commit | 6a26ad67367a889a9fb6d0cc30e1e608e794d298 (patch) | |
tree | 4ae46607efde0853bdf926b7ad13f9c2a2e11434 /libstdc++-v3/src/Makefile.in | |
parent | f4ca0a53be18dfc7162fd5dcc1e73c4203805e14 (diff) |
libstdc++: Fix libbacktrace build files
This makes it possible to combine --enable-libstdcxx-debug with
--enable-libstdcxx-backtrace, by adding a rule to src/Makefile to copy
the backtrace-supported.h header into the src/debug/libbacktrace
directory.
Add libbacktrace path to testsuite flags so the tests can link without
having the library installed.
Also fix some warnings when running automake for the libbacktrace
makefile.
Use a per-library CPPFLAGS variable to fix:
src/libbacktrace/Makefile.am:38: warning: AM_CPPFLAGS multiply defined in condition TRUE ...
fragment.am:43: ... 'AM_CPPFLAGS' previously defined here
src/libbacktrace/Makefile.am:32: 'fragment.am' included from here
Create symlinks to the libbacktrace sources to fix:
src/libbacktrace/Makefile.am:55: warning: source file '../../../libbacktrace/atomic.c' is in a subdirectory,
src/libbacktrace/Makefile.am:55: but option 'subdir-objects' is disabled
libstdc++-v3/ChangeLog:
* scripts/testsuite_flags.in: Add src/libbacktrace/.libs to
linker search paths.
* src/Makefile.am: Fix src/debug/libbacktrace build.
* src/Makefile.in: Regenerate.
* src/libbacktrace/Makefile.am: Use per-library CPPFLAGS
variable. Use symlinks for the source files.
* src/libbacktrace/Makefile.in: Regenerate.
Diffstat (limited to 'libstdc++-v3/src/Makefile.in')
-rw-r--r-- | libstdc++-v3/src/Makefile.in | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in index 429f3d17967..eeafb892386 100644 --- a/libstdc++-v3/src/Makefile.in +++ b/libstdc++-v3/src/Makefile.in @@ -482,6 +482,8 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) $(CPPFLAGS) @ENABLE_FILESYSTEM_TS_TRUE@filesystem_dir = filesystem @ENABLE_BACKTRACE_FALSE@backtrace_dir = @ENABLE_BACKTRACE_TRUE@backtrace_dir = libbacktrace +@ENABLE_BACKTRACE_FALSE@backtrace_supported_h = +@ENABLE_BACKTRACE_TRUE@backtrace_supported_h = $(backtrace_dir)/backtrace-supported.h SUBDIRS = c++98 c++11 c++17 c++20 $(filesystem_dir) $(backtrace_dir) @VTV_CYGMIN_FALSE@toolexeclib_LTLIBRARIES = libstdc++.la @@ -668,6 +670,8 @@ CXXLINK = \ # Build a debug variant. # Take care to fix all possibly-relative paths. debugdir = ${glibcxx_builddir}/src/debug +@ENABLE_BACKTRACE_FALSE@debug_backtrace_supported_h = +@ENABLE_BACKTRACE_TRUE@debug_backtrace_supported_h = ${debugdir}/$(backtrace_supported_h) all: all-recursive .SUFFIXES: @@ -1125,7 +1129,10 @@ stamp-debug: Makefile $(foreach dir,$(SUBDIRS),$(dir)/Makefile) fi; \ echo `date` > stamp-debug; -build-debug: stamp-debug +@ENABLE_BACKTRACE_TRUE@${debugdir}/$(backtrace_supported_h): $(backtrace_supported_h) stamp-debug +@ENABLE_BACKTRACE_TRUE@ cp $< $@ + +build-debug: stamp-debug $(debug_backtrace_supported_h) (cd ${debugdir}; \ mv Makefile Makefile.tmp; \ sed -e 's,all-local: all-once,all-local:,' \ |