From 47544fef5474107c6b4ebb2212183d62f7122b9b9568262b0b6fc84be9767263 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 23 Jan 2023 15:24:29 +0000 Subject: [PATCH] - Add bootstrap conditional to allow --without=bootstrap to be specified to speed up local builds for testing. OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc13?expand=0&rev=19 --- cross-aarch64-gcc13-bootstrap.spec | 4 ++++ cross-aarch64-gcc13.spec | 4 ++++ cross-amdgcn-gcc13.spec | 4 ++++ cross-arm-gcc13.spec | 4 ++++ cross-arm-none-gcc13-bootstrap.spec | 4 ++++ cross-arm-none-gcc13.spec | 4 ++++ cross-avr-gcc13-bootstrap.spec | 4 ++++ cross-avr-gcc13.spec | 4 ++++ cross-epiphany-gcc13-bootstrap.spec | 4 ++++ cross-epiphany-gcc13.spec | 4 ++++ cross-hppa-gcc13-bootstrap.spec | 4 ++++ cross-hppa-gcc13.spec | 4 ++++ cross-m68k-gcc13.spec | 4 ++++ cross-mips-gcc13.spec | 4 ++++ cross-nvptx-gcc13.spec | 4 ++++ cross-ppc64-gcc13.spec | 4 ++++ cross-ppc64le-gcc13.spec | 4 ++++ cross-pru-gcc13-bootstrap.spec | 4 ++++ cross-pru-gcc13.spec | 4 ++++ cross-riscv64-elf-gcc13-bootstrap.spec | 4 ++++ cross-riscv64-elf-gcc13.spec | 4 ++++ cross-riscv64-gcc13-bootstrap.spec | 4 ++++ cross-riscv64-gcc13.spec | 4 ++++ cross-rx-gcc13-bootstrap.spec | 4 ++++ cross-rx-gcc13.spec | 4 ++++ cross-s390x-gcc13.spec | 4 ++++ cross-sparc-gcc13.spec | 4 ++++ cross-sparc64-gcc13.spec | 4 ++++ cross-x86_64-gcc13.spec | 4 ++++ gcc.spec.in | 10 +++++++++- gcc13-testresults.spec | 10 +++++++++- gcc13.changes | 6 ++++++ gcc13.spec | 10 +++++++++- 33 files changed, 149 insertions(+), 3 deletions(-) diff --git a/cross-aarch64-gcc13-bootstrap.spec b/cross-aarch64-gcc13-bootstrap.spec index e2747e8..849c53e 100644 --- a/cross-aarch64-gcc13-bootstrap.spec +++ b/cross-aarch64-gcc13-bootstrap.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-aarch64-gcc13.spec b/cross-aarch64-gcc13.spec index fa51b4d..523f718 100644 --- a/cross-aarch64-gcc13.spec +++ b/cross-aarch64-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-amdgcn-gcc13.spec b/cross-amdgcn-gcc13.spec index 30391f7..f473f5d 100644 --- a/cross-amdgcn-gcc13.spec +++ b/cross-amdgcn-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-arm-gcc13.spec b/cross-arm-gcc13.spec index 4497658..03717c6 100644 --- a/cross-arm-gcc13.spec +++ b/cross-arm-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-arm-none-gcc13-bootstrap.spec b/cross-arm-none-gcc13-bootstrap.spec index ac318f7..a639c52 100644 --- a/cross-arm-none-gcc13-bootstrap.spec +++ b/cross-arm-none-gcc13-bootstrap.spec @@ -687,10 +687,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-arm-none-gcc13.spec b/cross-arm-none-gcc13.spec index cda5838..cb54cc0 100644 --- a/cross-arm-none-gcc13.spec +++ b/cross-arm-none-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-avr-gcc13-bootstrap.spec b/cross-avr-gcc13-bootstrap.spec index 36e18b8..5ec6f80 100644 --- a/cross-avr-gcc13-bootstrap.spec +++ b/cross-avr-gcc13-bootstrap.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-avr-gcc13.spec b/cross-avr-gcc13.spec index bbc3ab9..9cefa60 100644 --- a/cross-avr-gcc13.spec +++ b/cross-avr-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-epiphany-gcc13-bootstrap.spec b/cross-epiphany-gcc13-bootstrap.spec index f679002..651bd3e 100644 --- a/cross-epiphany-gcc13-bootstrap.spec +++ b/cross-epiphany-gcc13-bootstrap.spec @@ -687,10 +687,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-epiphany-gcc13.spec b/cross-epiphany-gcc13.spec index 2973256..ae90c2a 100644 --- a/cross-epiphany-gcc13.spec +++ b/cross-epiphany-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-hppa-gcc13-bootstrap.spec b/cross-hppa-gcc13-bootstrap.spec index fc09802..d9d3156 100644 --- a/cross-hppa-gcc13-bootstrap.spec +++ b/cross-hppa-gcc13-bootstrap.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-hppa-gcc13.spec b/cross-hppa-gcc13.spec index e000e8d..a2efb3d 100644 --- a/cross-hppa-gcc13.spec +++ b/cross-hppa-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-m68k-gcc13.spec b/cross-m68k-gcc13.spec index 2f39d96..2260cc3 100644 --- a/cross-m68k-gcc13.spec +++ b/cross-m68k-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-mips-gcc13.spec b/cross-mips-gcc13.spec index 6e85fad..8cc3300 100644 --- a/cross-mips-gcc13.spec +++ b/cross-mips-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-nvptx-gcc13.spec b/cross-nvptx-gcc13.spec index c422259..07360b0 100644 --- a/cross-nvptx-gcc13.spec +++ b/cross-nvptx-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-ppc64-gcc13.spec b/cross-ppc64-gcc13.spec index 710a347..54804a4 100644 --- a/cross-ppc64-gcc13.spec +++ b/cross-ppc64-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-ppc64le-gcc13.spec b/cross-ppc64le-gcc13.spec index 8a2836a..d2291f7 100644 --- a/cross-ppc64le-gcc13.spec +++ b/cross-ppc64le-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-pru-gcc13-bootstrap.spec b/cross-pru-gcc13-bootstrap.spec index 7f293ab..fc58132 100644 --- a/cross-pru-gcc13-bootstrap.spec +++ b/cross-pru-gcc13-bootstrap.spec @@ -687,10 +687,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-pru-gcc13.spec b/cross-pru-gcc13.spec index b9e1f18..e32a672 100644 --- a/cross-pru-gcc13.spec +++ b/cross-pru-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-riscv64-elf-gcc13-bootstrap.spec b/cross-riscv64-elf-gcc13-bootstrap.spec index e14c333..33b16de 100644 --- a/cross-riscv64-elf-gcc13-bootstrap.spec +++ b/cross-riscv64-elf-gcc13-bootstrap.spec @@ -687,10 +687,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-riscv64-elf-gcc13.spec b/cross-riscv64-elf-gcc13.spec index 06f38e2..a9c6875 100644 --- a/cross-riscv64-elf-gcc13.spec +++ b/cross-riscv64-elf-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-riscv64-gcc13-bootstrap.spec b/cross-riscv64-gcc13-bootstrap.spec index bd9acb8..e3dc255 100644 --- a/cross-riscv64-gcc13-bootstrap.spec +++ b/cross-riscv64-gcc13-bootstrap.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-riscv64-gcc13.spec b/cross-riscv64-gcc13.spec index e189674..2229227 100644 --- a/cross-riscv64-gcc13.spec +++ b/cross-riscv64-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-rx-gcc13-bootstrap.spec b/cross-rx-gcc13-bootstrap.spec index e7190aa..793aaf9 100644 --- a/cross-rx-gcc13-bootstrap.spec +++ b/cross-rx-gcc13-bootstrap.spec @@ -687,10 +687,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-rx-gcc13.spec b/cross-rx-gcc13.spec index 425d941..5bd09dd 100644 --- a/cross-rx-gcc13.spec +++ b/cross-rx-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-s390x-gcc13.spec b/cross-s390x-gcc13.spec index 9402da8..4c935a2 100644 --- a/cross-s390x-gcc13.spec +++ b/cross-s390x-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-sparc-gcc13.spec b/cross-sparc-gcc13.spec index 40c18a0..159d856 100644 --- a/cross-sparc-gcc13.spec +++ b/cross-sparc-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-sparc64-gcc13.spec b/cross-sparc64-gcc13.spec index db7d837..9f126b7 100644 --- a/cross-sparc64-gcc13.spec +++ b/cross-sparc64-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/cross-x86_64-gcc13.spec b/cross-x86_64-gcc13.spec index 8347422..5539587 100644 --- a/cross-x86_64-gcc13.spec +++ b/cross-x86_64-gcc13.spec @@ -686,10 +686,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif diff --git a/gcc.spec.in b/gcc.spec.in index 4fd727f..5bfdda3 100644 --- a/gcc.spec.in +++ b/gcc.spec.in @@ -28,6 +28,8 @@ %define usrmerged 1 %endif +%bcond_without bootstrap + # Ada currently fails to build on a few platforms, enable it only # on those that work %if %{suse_version} >= 1310 @@ -102,7 +104,7 @@ %define use_lto_bootstrap 0 %ifarch x86_64 ppc64le s390x aarch64 %if %{suse_version} > 1500 -%define use_lto_bootstrap 1 +%define use_lto_bootstrap %{with bootstrap} %endif %endif @@ -1561,10 +1563,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif @@ -1585,9 +1591,11 @@ amdgcn-amdhsa,\ STAGE1_FLAGS="-g -O2" %if 0%{?do_profiling} && !0%{?building_testsuite:1} %ifarch x86_64 %ix86 ppc64le s390x aarch64 +%if %{with bootstrap} %define use_pgo_bootstrap 1 %endif %endif +%endif %{?use_pgo_bootstrap:setarch `arch` -R} make %{?make_output_sync} %{?use_pgo_bootstrap:profiledbootstrap} STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} make info %if 0%{?run_tests:1} diff --git a/gcc13-testresults.spec b/gcc13-testresults.spec index 1116aac..48bde2b 100644 --- a/gcc13-testresults.spec +++ b/gcc13-testresults.spec @@ -48,6 +48,8 @@ %define usrmerged 1 %endif +%bcond_without bootstrap + # Ada currently fails to build on a few platforms, enable it only # on those that work %if %{suse_version} >= 1310 @@ -122,7 +124,7 @@ %define use_lto_bootstrap 0 %ifarch x86_64 ppc64le s390x aarch64 %if %{suse_version} > 1500 -%define use_lto_bootstrap 1 +%define use_lto_bootstrap %{with bootstrap} %endif %endif @@ -881,10 +883,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif @@ -902,9 +908,11 @@ amdgcn-amdhsa,\ STAGE1_FLAGS="-g -O2" %if 0%{?do_profiling} && !0%{?building_testsuite:1} %ifarch x86_64 %ix86 ppc64le s390x aarch64 +%if %{with bootstrap} %define use_pgo_bootstrap 1 %endif %endif +%endif %{?use_pgo_bootstrap:setarch `arch` -R} make %{?make_output_sync} %{?use_pgo_bootstrap:profiledbootstrap} STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} make info %if 0%{?run_tests:1} diff --git a/gcc13.changes b/gcc13.changes index d4cfd42..9526d6c 100644 --- a/gcc13.changes +++ b/gcc13.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 23 15:19:53 UTC 2023 - Richard Biener + +- Add bootstrap conditional to allow --without=bootstrap to be + specified to speed up local builds for testing. + ------------------------------------------------------------------- Mon Jan 23 08:45:24 UTC 2023 - Richard Biener diff --git a/gcc13.spec b/gcc13.spec index 238f424..c0373d7 100644 --- a/gcc13.spec +++ b/gcc13.spec @@ -27,6 +27,8 @@ %define usrmerged 1 %endif +%bcond_without bootstrap + # Ada currently fails to build on a few platforms, enable it only # on those that work %if %{suse_version} >= 1310 @@ -101,7 +103,7 @@ %define use_lto_bootstrap 0 %ifarch x86_64 ppc64le s390x aarch64 %if %{suse_version} > 1500 -%define use_lto_bootstrap 1 +%define use_lto_bootstrap %{with bootstrap} %endif %endif @@ -2382,10 +2384,14 @@ amdgcn-amdhsa,\ %if "%{TARGET_ARCH}" == "riscv64" --disable-multilib \ %endif +%if %{with bootstrap} %if %{use_lto_bootstrap} && !0%{?building_testsuite:1} --with-build-config=bootstrap-lto-lean \ --enable-link-mutex \ %endif +%else + --disable-bootstrap \ +%endif %ifarch riscv64 --enable-link-mutex \ %endif @@ -2403,9 +2409,11 @@ amdgcn-amdhsa,\ STAGE1_FLAGS="-g -O2" %if 0%{?do_profiling} && !0%{?building_testsuite:1} %ifarch x86_64 %ix86 ppc64le s390x aarch64 +%if %{with bootstrap} %define use_pgo_bootstrap 1 %endif %endif +%endif %{?use_pgo_bootstrap:setarch `arch` -R} make %{?make_output_sync} %{?use_pgo_bootstrap:profiledbootstrap} STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} make info %if 0%{?run_tests:1}