* [PATCH] Skip libstdc++ debug build in early bootstrap stages
@ 2019-06-20 14:23 Jonathan Wakely
2019-06-20 14:37 ` Jonathan Wakely
0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Wakely @ 2019-06-20 14:23 UTC (permalink / raw)
To: libstdc++, gcc-patches; +Cc: Matthias Klose
[-- Attachment #1: Type: text/plain, Size: 638 bytes --]
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.
Tested x86_64-linux, committed to trunk.
[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 2039 bytes --]
commit 6473c6e506298bba6111df73fc9810642113a321
Author: redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu Jun 20 14:17:57 2019 +0000
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@272509 138bc75d-0d04-0410-961f-82ee72b054a4
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 19e9f14b0f5..fad390ba322 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)
])
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Skip libstdc++ debug build in early bootstrap stages
2019-06-20 14:23 [PATCH] Skip libstdc++ debug build in early bootstrap stages Jonathan Wakely
@ 2019-06-20 14:37 ` Jonathan Wakely
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2019-06-20 14:37 UTC (permalink / raw)
To: libstdc++, gcc-patches; +Cc: Matthias Klose
On 20/06/19 15:23 +0100, Jonathan Wakely wrote:
>As mentioned in PR 90770, this is a patch that Debian have been carrying
Oops, Ubuntu, not Debian, sorry.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-20 14:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-20 14:23 [PATCH] Skip libstdc++ debug build in early bootstrap stages Jonathan Wakely
2019-06-20 14:37 ` 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).