Commit 56378d0e by Benjamin Kosnik Committed by Benjamin Kosnik

configure.ac (GLIBCXX_ENABLE_DEBUG_FLAGS): Use -gdwarf-4 -g3 -O0.

2012-01-27  Benjamin Kosnik  <bkoz@redhat.com>
	    Matthias Klose  <doko@ubuntu.com>

	* configure.ac (GLIBCXX_ENABLE_DEBUG_FLAGS): Use -gdwarf-4 -g3 -O0.
	* configure.in: Regenerated.
	* src/Makefile.am (all-once, install-data-once): New rules.
	(all-local, install-data-local): Use them.
	(build-debug, install-debug): Tweak.
	* src/Makefile.in: Regenerate.

Co-Authored-By: Matthias Klose <doko@ubuntu.com>

From-SVN: r183599
parent 7031e9dc
2012-01-27 Benjamin Kosnik <bkoz@redhat.com>
Matthias Klose <doko@ubuntu.com>
* configure.ac (GLIBCXX_ENABLE_DEBUG_FLAGS): Use -gdwarf-4 -g3 -O0.
* configure.in: Regenerated.
* src/Makefile.am (all-once, install-data-once): New rules.
(all-local, install-data-local): Use them.
(build-debug, install-debug): Tweak.
* src/Makefile.in: Regenerate.
2012-01-27 Richard Henderson <rth@redhat.com> 2012-01-27 Richard Henderson <rth@redhat.com>
* include/bits/atomic_base.h (__atomic_flag_base): Define _M_i * include/bits/atomic_base.h (__atomic_flag_base): Define _M_i
......
...@@ -1534,7 +1534,7 @@ Optional Features: ...@@ -1534,7 +1534,7 @@ Optional Features:
--enable-concept-checks use Boost-derived template checks [default=no] --enable-concept-checks use Boost-derived template checks [default=no]
--enable-libstdcxx-debug-flags=FLAGS --enable-libstdcxx-debug-flags=FLAGS
pass compiler FLAGS when building debug library pass compiler FLAGS when building debug library
[default="-g3 -O0"] [default="-gdwarf-4 -g3 -O0"]
--enable-libstdcxx-debug --enable-libstdcxx-debug
build extra debug library [default=no] build extra debug library [default=no]
--enable-cxx-flags=FLAGS --enable-cxx-flags=FLAGS
...@@ -17096,7 +17096,7 @@ if test "${enable_libstdcxx_debug_flags+set}" = set; then : ...@@ -17096,7 +17096,7 @@ if test "${enable_libstdcxx_debug_flags+set}" = set; then :
*) as_fn_error "--enable-libstdcxx-debug-flags needs compiler flags as arguments" "$LINENO" 5 ;; *) as_fn_error "--enable-libstdcxx-debug-flags needs compiler flags as arguments" "$LINENO" 5 ;;
esac esac
else else
enable_libstdcxx_debug_flags="-g3 -O0" enable_libstdcxx_debug_flags="-gdwarf-4 -g3 -O0"
fi fi
...@@ -124,7 +124,7 @@ GLIBCXX_ENABLE_LONG_LONG([yes]) ...@@ -124,7 +124,7 @@ GLIBCXX_ENABLE_LONG_LONG([yes])
GLIBCXX_ENABLE_WCHAR_T([yes]) GLIBCXX_ENABLE_WCHAR_T([yes])
GLIBCXX_ENABLE_C99([yes]) GLIBCXX_ENABLE_C99([yes])
GLIBCXX_ENABLE_CONCEPT_CHECKS([no]) GLIBCXX_ENABLE_CONCEPT_CHECKS([no])
GLIBCXX_ENABLE_DEBUG_FLAGS(["-g3 -O0"]) GLIBCXX_ENABLE_DEBUG_FLAGS(["-gdwarf-4 -g3 -O0"])
GLIBCXX_ENABLE_DEBUG([no]) GLIBCXX_ENABLE_DEBUG([no])
GLIBCXX_ENABLE_PARALLEL([yes]) GLIBCXX_ENABLE_PARALLEL([yes])
GLIBCXX_ENABLE_CXX_FLAGS GLIBCXX_ENABLE_CXX_FLAGS
......
...@@ -168,16 +168,16 @@ version_arg = ...@@ -168,16 +168,16 @@ version_arg =
version_dep = version_dep =
endif endif
# Added rules.
# 1 debug library # Control additional build primary rules.
# 2 supra-convenience library # EXTRA_LTLIBRARIES =
if GLIBCXX_BUILD_DEBUG all-once: libstdc++convenience.la $(STAMP_DEBUG)
all-local: libstdc++convenience.la build_debug install-data-once: $(STAMP_INSTALL_DEBUG)
install-data-local: install_debug
else all-local: all-once
all-local: libstdc++convenience.la install-data-local: install-data-once
install-data-local: clean-local:
endif rm -rf libstdc++convenience.la stamp* $(CLEAN_DEBUG)
# Make a non-installed convenience library, so that --disable-static # Make a non-installed convenience library, so that --disable-static
# may work. # may work.
...@@ -188,13 +188,26 @@ libstdc++convenience.la: $(toolexeclib_LTLIBRARIES) ...@@ -188,13 +188,26 @@ libstdc++convenience.la: $(toolexeclib_LTLIBRARIES)
fi; \ fi; \
echo `date` > stamp-libstdc++convenience; echo `date` > stamp-libstdc++convenience;
debugdir = debug # Added rules.
# 1 debug library
# 2 supra-convenience library
if GLIBCXX_BUILD_DEBUG
STAMP_DEBUG = build-debug
STAMP_INSTALL_DEBUG = install-debug
CLEAN_DEBUG = debug
else
STAMP_DEBUG =
STAMP_INSTALL_DEBUG =
CLEAN_DEBUG =
endif
# Build a set of debug objects here. # Build a debug variant.
# Take care to fix all possibly-relative paths. # Take care to fix all possibly-relative paths.
debugdir = ${glibcxx_builddir}/src/debug
stamp-debug: stamp-debug:
if test ! -d ${debugdir}; then \ if test ! -d ${debugdir}; then \
mkdir -p ${debugdir}; \ mkdir -p ${debugdir}; \
for d in $(SUBDIRS); do mkdir -p ${debugdir}/$$d; done; \
(cd ${debugdir}; \ (cd ${debugdir}; \
sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \ sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \
-e 's/top_build_prefix = \.\./top_build_prefix = ..\/../' \ -e 's/top_build_prefix = \.\./top_build_prefix = ..\/../' \
...@@ -202,16 +215,30 @@ stamp-debug: ...@@ -202,16 +215,30 @@ stamp-debug:
-e 's/VPATH = \.\./VPATH = ..\/../' \ -e 's/VPATH = \.\./VPATH = ..\/../' \
-e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \ -e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \
-e 's/MKDIR_P = \.\./MKDIR_P = ..\/../' \ -e 's/MKDIR_P = \.\./MKDIR_P = ..\/../' \
-e 's/all-local: build_debug/all-local:/' \ < ../Makefile > Makefile ; \
-e 's/install-data-local: install_debug/install-data-local:/' \ for d in . $(SUBDIRS); do \
< ../Makefile > Makefile) ; \ sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \
-e 's/top_build_prefix = \.\./top_build_prefix = ..\/../' \
-e 's/srcdir = \.\./srcdir = ..\/../' \
-e 's/VPATH = \.\./VPATH = ..\/../' \
-e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \
-e 's/MKDIR_P = \.\./MKDIR_P = ..\/../' \
< ../$$d/Makefile > $$d/Makefile ; \
done) ; \
fi; \ fi; \
echo `date` > stamp-debug; echo `date` > stamp-debug;
build_debug: stamp-debug build-debug: stamp-debug
(cd ${debugdir} && $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' all) (cd ${debugdir}; \
mv Makefile Makefile.tmp; \
# Install debug library here. sed -e 's,all-local: all-once,all-local:,' \
install_debug: -e 's,install-data-local: install-data-once,install-data-local:,' \
(cd ${debugdir} && $(MAKE) \ -e 's,src/c,src/debug/c,' \
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) < Makefile.tmp > Makefile ; \
$(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' \
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug all) ;
# Install debug library.
install-debug: build-debug
(cd ${debugdir} && $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' \
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) ;
...@@ -405,7 +405,20 @@ CXXLINK = $(LIBTOOL) --tag CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ ...@@ -405,7 +405,20 @@ CXXLINK = $(LIBTOOL) --tag CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \
@ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_SOL2_FALSE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver @ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_SOL2_FALSE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver
@ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_SOL2_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver-sol2 @ENABLE_SYMVERS_GNU_TRUE@@ENABLE_SYMVERS_SOL2_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver-sol2
@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver-sun @ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@version_dep = libstdc++-symbols.ver-sun
debugdir = debug @GLIBCXX_BUILD_DEBUG_FALSE@STAMP_DEBUG =
# Added rules.
# 1 debug library
# 2 supra-convenience library
@GLIBCXX_BUILD_DEBUG_TRUE@STAMP_DEBUG = build-debug
@GLIBCXX_BUILD_DEBUG_FALSE@STAMP_INSTALL_DEBUG =
@GLIBCXX_BUILD_DEBUG_TRUE@STAMP_INSTALL_DEBUG = install-debug
@GLIBCXX_BUILD_DEBUG_FALSE@CLEAN_DEBUG =
@GLIBCXX_BUILD_DEBUG_TRUE@CLEAN_DEBUG = debug
# Build a debug variant.
# Take care to fix all possibly-relative paths.
debugdir = ${glibcxx_builddir}/src/debug
all: all-recursive all: all-recursive
.SUFFIXES: .SUFFIXES:
...@@ -655,8 +668,8 @@ maintainer-clean-generic: ...@@ -655,8 +668,8 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive clean: clean-recursive
clean-am: clean-generic clean-libtool clean-toolexeclibLTLIBRARIES \ clean-am: clean-generic clean-libtool clean-local \
mostlyclean-am clean-toolexeclibLTLIBRARIES mostlyclean-am
distclean: distclean-recursive distclean: distclean-recursive
-rm -f Makefile -rm -f Makefile
...@@ -727,7 +740,7 @@ uninstall-am: uninstall-toolexeclibLTLIBRARIES ...@@ -727,7 +740,7 @@ uninstall-am: uninstall-toolexeclibLTLIBRARIES
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am all-local check check-am clean clean-generic \ all all-am all-local check check-am clean clean-generic \
clean-libtool clean-toolexeclibLTLIBRARIES ctags \ clean-libtool clean-local clean-toolexeclibLTLIBRARIES ctags \
ctags-recursive distclean distclean-compile distclean-generic \ ctags-recursive distclean distclean-compile distclean-generic \
distclean-libtool distclean-tags dvi dvi-am html html-am info \ distclean-libtool distclean-tags dvi dvi-am html html-am info \
info-am install install-am install-data install-data-am \ info-am install install-am install-data install-data-am \
...@@ -785,13 +798,15 @@ vpath % $(top_srcdir) ...@@ -785,13 +798,15 @@ vpath % $(top_srcdir)
@ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \ @ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
@ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@ > $@ || (rm -f $@ ; exit 1) @ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@ > $@ || (rm -f $@ ; exit 1)
# Added rules. # Control additional build primary rules.
# 1 debug library # EXTRA_LTLIBRARIES =
# 2 supra-convenience library all-once: libstdc++convenience.la $(STAMP_DEBUG)
@GLIBCXX_BUILD_DEBUG_TRUE@all-local: libstdc++convenience.la build_debug install-data-once: $(STAMP_INSTALL_DEBUG)
@GLIBCXX_BUILD_DEBUG_TRUE@install-data-local: install_debug
@GLIBCXX_BUILD_DEBUG_FALSE@all-local: libstdc++convenience.la all-local: all-once
@GLIBCXX_BUILD_DEBUG_FALSE@install-data-local: install-data-local: install-data-once
clean-local:
rm -rf libstdc++convenience.la stamp* $(CLEAN_DEBUG)
# Make a non-installed convenience library, so that --disable-static # Make a non-installed convenience library, so that --disable-static
# may work. # may work.
...@@ -801,12 +816,10 @@ libstdc++convenience.la: $(toolexeclib_LTLIBRARIES) ...@@ -801,12 +816,10 @@ libstdc++convenience.la: $(toolexeclib_LTLIBRARIES)
cp .libs/libstdc++convenience.a .libs/libstdc++.a; \ cp .libs/libstdc++convenience.a .libs/libstdc++.a; \
fi; \ fi; \
echo `date` > stamp-libstdc++convenience; echo `date` > stamp-libstdc++convenience;
# Build a set of debug objects here.
# Take care to fix all possibly-relative paths.
stamp-debug: stamp-debug:
if test ! -d ${debugdir}; then \ if test ! -d ${debugdir}; then \
mkdir -p ${debugdir}; \ mkdir -p ${debugdir}; \
for d in $(SUBDIRS); do mkdir -p ${debugdir}/$$d; done; \
(cd ${debugdir}; \ (cd ${debugdir}; \
sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \ sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \
-e 's/top_build_prefix = \.\./top_build_prefix = ..\/../' \ -e 's/top_build_prefix = \.\./top_build_prefix = ..\/../' \
...@@ -814,19 +827,33 @@ stamp-debug: ...@@ -814,19 +827,33 @@ stamp-debug:
-e 's/VPATH = \.\./VPATH = ..\/../' \ -e 's/VPATH = \.\./VPATH = ..\/../' \
-e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \ -e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \
-e 's/MKDIR_P = \.\./MKDIR_P = ..\/../' \ -e 's/MKDIR_P = \.\./MKDIR_P = ..\/../' \
-e 's/all-local: build_debug/all-local:/' \ < ../Makefile > Makefile ; \
-e 's/install-data-local: install_debug/install-data-local:/' \ for d in . $(SUBDIRS); do \
< ../Makefile > Makefile) ; \ sed -e 's/top_builddir = \.\./top_builddir = ..\/../' \
-e 's/top_build_prefix = \.\./top_build_prefix = ..\/../' \
-e 's/srcdir = \.\./srcdir = ..\/../' \
-e 's/VPATH = \.\./VPATH = ..\/../' \
-e 's/glibcxx_basedir = \.\./glibcxx_basedir = ..\/../' \
-e 's/MKDIR_P = \.\./MKDIR_P = ..\/../' \
< ../$$d/Makefile > $$d/Makefile ; \
done) ; \
fi; \ fi; \
echo `date` > stamp-debug; echo `date` > stamp-debug;
build_debug: stamp-debug build-debug: stamp-debug
(cd ${debugdir} && $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' all) (cd ${debugdir}; \
mv Makefile Makefile.tmp; \
# Install debug library here. sed -e 's,all-local: all-once,all-local:,' \
install_debug: -e 's,install-data-local: install-data-once,install-data-local:,' \
(cd ${debugdir} && $(MAKE) \ -e 's,src/c,src/debug/c,' \
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) < Makefile.tmp > Makefile ; \
$(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' \
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug all) ;
# Install debug library.
install-debug: build-debug
(cd ${debugdir} && $(MAKE) CXXFLAGS='$(DEBUG_FLAGS)' \
toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install) ;
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment