diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-06-20 15:17:57 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-06-20 15:17:57 +0100 |
commit | 86f73527aa3556b7d5ead9b03d8a5c91d351a409 (patch) | |
tree | 0604cda3573398f131595dab0039ed64be1c0c6a /libstdc++-v3 | |
parent | d306dee31dc030d1a9992927eb17b8171aaf8308 (diff) | |
download | gcc-86f73527aa3556b7d5ead9b03d8a5c91d351a409.zip gcc-86f73527aa3556b7d5ead9b03d8a5c91d351a409.tar.gz gcc-86f73527aa3556b7d5ead9b03d8a5c91d351a409.tar.bz2 |
Skip libstdc++ debug build in early bootstrap stages
As mentioned in PR 90770, this is a patch that Debian have been carrying
for some time. The additional unoptimized copies of libstdc++ libs that
get built during each stage are never going to be used, so don't bother
building them.
For a profiled bootstrap this means we won't train the compiler on the
unoptimized library code with assertions enabled, but that doesn't seem
like a big problem, as the same code has already been compiled once for
the main libstdc++ library.
* acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final
stage of bootstrap.
* configure: Regenerate.
From-SVN: r272509
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 4 | ||||
-rw-r--r-- | libstdc++-v3/acinclude.m4 | 14 | ||||
-rwxr-xr-x | libstdc++-v3/configure | 16 |
3 files changed, 31 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index d5e4c85..ac98c0d 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2019-06-20 Jonathan Wakely <jwakely@redhat.com> + * acinclude.m4 (GLIBCXX_ENABLE_DEBUG): Only do debug build for final + stage of bootstrap. + * configure: Regenerate. + * include/std/variant (_Variant_storage, _Extra_visit_slot_needed): Qualify calls to __never_valueless. diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 19e9f14..fad390b 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -2899,8 +2899,20 @@ dnl Where DEFAULT is either `yes' or `no'. dnl AC_DEFUN([GLIBCXX_ENABLE_DEBUG], [ AC_MSG_CHECKING([for additional debug build]) + skip_debug_build= GLIBCXX_ENABLE(libstdcxx-debug,$1,,[build extra debug library]) - AC_MSG_RESULT($enable_libstdcxx_debug) + if test x$enable_libstdcxx_debug = xyes; then + if test -f $toplevel_builddir/../stage_final \ + && test -f $toplevel_builddir/../stage_current; then + stage_final=`cat $toplevel_builddir/../stage_final` + stage_current=`cat $toplevel_builddir/../stage_current` + if test x$stage_current != x$stage_final ; then + skip_debug_build=" (skipped for bootstrap stage $stage_current)" + enable_libstdcxx_debug=no + fi + fi + fi + AC_MSG_RESULT($enable_libstdcxx_debug$skip_debug_build) GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_DEBUG, test $enable_libstdcxx_debug = yes) ]) diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 4788acb..62d9cb4 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -18257,6 +18257,7 @@ $as_echo "$as_me: Debug build flags set to $DEBUG_FLAGS" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for additional debug build" >&5 $as_echo_n "checking for additional debug build... " >&6; } + skip_debug_build= # Check whether --enable-libstdcxx-debug was given. if test "${enable_libstdcxx_debug+set}" = set; then : enableval=$enable_libstdcxx_debug; @@ -18270,8 +18271,19 @@ else fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_libstdcxx_debug" >&5 -$as_echo "$enable_libstdcxx_debug" >&6; } + if test x$enable_libstdcxx_debug = xyes; then + if test -f $toplevel_builddir/../stage_final \ + && test -f $toplevel_builddir/../stage_current; then + stage_final=`cat $toplevel_builddir/../stage_final` + stage_current=`cat $toplevel_builddir/../stage_current` + if test x$stage_current != x$stage_final ; then + skip_debug_build=" (skipped for bootstrap stage $stage_current)" + enable_libstdcxx_debug=no + fi + fi + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_libstdcxx_debug$skip_debug_build" >&5 +$as_echo "$enable_libstdcxx_debug$skip_debug_build" >&6; } |