From c3f12e0d2a1cc8b2b46c9d83b36fe4c85b5cbbd6 Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Thu, 23 Oct 2008 15:57:20 +0000 Subject: [PATCH] Stefan Fiedler: gcc: add Config option for disabling bootstrapping in native builds [2008100710354349580] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@9088 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/gcc/config-300.hlp | 24 ++++++++++++++++++++++++ package/base/gcc/config-300.in | 13 ++++++++++--- package/base/gcc/gcc.conf | 13 +++++++++---- 3 files changed, 43 insertions(+), 7 deletions(-) diff --git a/package/base/gcc/config-300.hlp b/package/base/gcc/config-300.hlp index 0d366889c..50a63a1ca 100644 --- a/package/base/gcc/config-300.hlp +++ b/package/base/gcc/config-300.hlp @@ -87,3 +87,27 @@ ROCKCFG_PKG_GCC41_NO_JAVA ROCKCFG_PKG_GCC41_PROFILED Enables profiling during GCC bootstrap and so yields an optimised compiler. Build speedup might be 5-10%. + +ROCKCFG_PKG_GCC40_BOOTSTRAP + Enables bootstrapping the GCC compiler in native builds. GCC builds itself 3 + times, using the previously built compiler for the 2nd and 3rd build. This + is a good way to check if the GCC you build actually works, at the cost of + increased build time. + +ROCKCFG_PKG_GCC41_BOOTSTRAP + Enables bootstrapping the GCC compiler in native builds. GCC builds itself 3 + times, using the previously built compiler for the 2nd and 3rd build. This + is a good way to check if the GCC you build actually works, at the cost of + increased build time. + +ROCKCFG_PKG_GCC42_BOOTSTRAP + Enables bootstrapping the GCC compiler in native builds. GCC builds itself 3 + times, using the previously built compiler for the 2nd and 3rd build. This + is a good way to check if the GCC you build actually works, at the cost of + increased build time. + +ROCKCFG_PKG_GCC43_BOOTSTRAP + Enables bootstrapping the GCC compiler in native builds. GCC builds itself 3 + times, using the previously built compiler for the 2nd and 3rd build. This + is a good way to check if the GCC you build actually works, at the cost of + increased build time. diff --git a/package/base/gcc/config-300.in b/package/base/gcc/config-300.in index d49e38ab8..a8da9fc35 100644 --- a/package/base/gcc/config-300.in +++ b/package/base/gcc/config-300.in @@ -53,9 +53,16 @@ if pkgcheck "gcc=.*" X ; then fi include "package/*/*/subconfig-gcc{$pkg_gcc_version}.in" - if [[ $gcc_version -ge 34 ]] ; then - bool 'Do profiled bootstrap' \ - ROCKCFG_PKG_GCC${gcc_version}_PROFILED 1 + if [[ $gcc_version -ge 40 ]] ; then + bool 'Bootstrap the C compiler' \ + ROCKCFG_PKG_GCC${gcc_version}_BOOTSTRAP 1 + fi + x="ROCKCFG_PKG_GCC${gcc_version}_BOOTSTRAP" + if [ "${!x}" != 0 ] ; then + if [[ $gcc_version -ge 34 ]] ; then + bool 'Do profiled bootstrap' \ + ROCKCFG_PKG_GCC${gcc_version}_PROFILED 1 + fi fi fi done diff --git a/package/base/gcc/gcc.conf b/package/base/gcc/gcc.conf index e8a477bfe..8a76f18a6 100644 --- a/package/base/gcc/gcc.conf +++ b/package/base/gcc/gcc.conf @@ -120,10 +120,15 @@ elif [ $stagelevel -ge 2 ] ; then --disable-libstdcxx-pch" else var_append extraconfopt ' ' '--enable-languages=$languages' - x="ROCKCFG_PKG_GCC${pkg_gcc_version}_PROFILED" - if [ "${!x}" = 1 ] ; then - var_append makeopt ' ' "GCJFLAGS=\"\$CXXFLAGS\" \ - profiledbootstrap" + x="ROCKCFG_PKG_GCC${pkg_gcc_version}_BOOTSTRAP" + if [ "${!x}" = 0 ] ; then + var_append extraconfopt ' ' '--disable-bootstrap' + else + x="ROCKCFG_PKG_GCC${pkg_gcc_version}_PROFILED" + if [ "${!x}" = 1 ] ; then + var_append makeopt ' ' "GCJFLAGS=\"\$CXXFLAGS\" \ + profiledbootstrap" + fi fi fi