summaryrefslogtreecommitdiff
path: root/debian/patches/skip-bootstrap-multilib.diff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-05-13 13:54:49 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-05-13 13:54:49 +0300
commit42156b5190f4fa150e1fab6777eb81e69d4db8c9 (patch)
tree3bf47de81cf1f89892789535a036d2d55d93a136 /debian/patches/skip-bootstrap-multilib.diff
downloadgcc-6-debian.tar.gz
Imported gcc-6 (6.3.0-17)debian/6.3.0-17debian
Diffstat (limited to 'debian/patches/skip-bootstrap-multilib.diff')
-rw-r--r--debian/patches/skip-bootstrap-multilib.diff49
1 files changed, 49 insertions, 0 deletions
diff --git a/debian/patches/skip-bootstrap-multilib.diff b/debian/patches/skip-bootstrap-multilib.diff
new file mode 100644
index 0000000..8567224
--- /dev/null
+++ b/debian/patches/skip-bootstrap-multilib.diff
@@ -0,0 +1,49 @@
+# DP: Skip non-default multilib and libstdc++-v3 debug builds in bootstrap builds
+
+Index: b/src/config-ml.in
+===================================================================
+--- a/src/config-ml.in
++++ b/src/config-ml.in
+@@ -479,6 +479,17 @@ esac
+ # Tests like `if [ -n "$multidirs" ]' require it.
+ multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ][ ]*/ /g'`
+
++# stage1 and stage2 builds of the non-default multilib configurations
++# are not needed; skip these to save some build time.
++if [ -f ../../stage_final ] && [ -f ../../stage_current ]; then
++ stage_final=`cat ../../stage_final`
++ stage_current=`cat ../../stage_current`
++ if [ "$stage_current" != "$stage_final" ]; then
++ echo "Skip `basename $ml_realsrcdir` non-default multilibs for bootstrap stage $stage_current"
++ multidirs=
++ fi
++fi
++
+ # Add code to library's top level makefile to handle building the multilib
+ # subdirs.
+
+Index: b/src/libstdc++-v3/acinclude.m4
+===================================================================
+--- a/src/libstdc++-v3/acinclude.m4
++++ b/src/libstdc++-v3/acinclude.m4
+@@ -2901,7 +2901,20 @@ dnl
+ AC_DEFUN([GLIBCXX_ENABLE_DEBUG], [
+ AC_MSG_CHECKING([for additional debug build])
+ GLIBCXX_ENABLE(libstdcxx-debug,$1,,[build extra debug library])
++ 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=yes
++ enable_libstdcxx_debug=no
++ fi
++ fi
++ fi
+ AC_MSG_RESULT($enable_libstdcxx_debug)
++ if test x$skip_debug_build = xyes ; then
++ AC_MSG_NOTICE([Skip libstdc++-v3 debug build for bootstrap stage $stage_current])
++ fi
+ GLIBCXX_CONDITIONAL(GLIBCXX_BUILD_DEBUG, test $enable_libstdcxx_debug = yes)
+ ])
+