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