diff --git a/cross-aarch64-gcc13-bootstrap.spec b/cross-aarch64-gcc13-bootstrap.spec index 4e3dd32..9dad799 100644 --- a/cross-aarch64-gcc13-bootstrap.spec +++ b/cross-aarch64-gcc13-bootstrap.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-aarch64-gcc13.spec b/cross-aarch64-gcc13.spec index 3178457..435ca0f 100644 --- a/cross-aarch64-gcc13.spec +++ b/cross-aarch64-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-amdgcn-gcc13.spec b/cross-amdgcn-gcc13.spec index 093954a..8117d2e 100644 --- a/cross-amdgcn-gcc13.spec +++ b/cross-amdgcn-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-arm-gcc13.spec b/cross-arm-gcc13.spec index 1a696d5..167b553 100644 --- a/cross-arm-gcc13.spec +++ b/cross-arm-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-arm-none-gcc13-bootstrap.spec b/cross-arm-none-gcc13-bootstrap.spec index ffd0b4e..d147da7 100644 --- a/cross-arm-none-gcc13-bootstrap.spec +++ b/cross-arm-none-gcc13-bootstrap.spec @@ -342,6 +342,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-arm-none-gcc13.spec b/cross-arm-none-gcc13.spec index 0462f0a..0f9ae6d 100644 --- a/cross-arm-none-gcc13.spec +++ b/cross-arm-none-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-avr-gcc13-bootstrap.spec b/cross-avr-gcc13-bootstrap.spec index 5ef2482..8e68a55 100644 --- a/cross-avr-gcc13-bootstrap.spec +++ b/cross-avr-gcc13-bootstrap.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-avr-gcc13.spec b/cross-avr-gcc13.spec index 2285e1e..9a347e9 100644 --- a/cross-avr-gcc13.spec +++ b/cross-avr-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-bpf-gcc13.spec b/cross-bpf-gcc13.spec index cb05ab7..81ba1bc 100644 --- a/cross-bpf-gcc13.spec +++ b/cross-bpf-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-epiphany-gcc13-bootstrap.spec b/cross-epiphany-gcc13-bootstrap.spec index 7a1d450..1feb0de 100644 --- a/cross-epiphany-gcc13-bootstrap.spec +++ b/cross-epiphany-gcc13-bootstrap.spec @@ -342,6 +342,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-epiphany-gcc13.spec b/cross-epiphany-gcc13.spec index 8bdc898..c61bc4b 100644 --- a/cross-epiphany-gcc13.spec +++ b/cross-epiphany-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-hppa-gcc13-bootstrap.spec b/cross-hppa-gcc13-bootstrap.spec index 3fdd87a..46017e8 100644 --- a/cross-hppa-gcc13-bootstrap.spec +++ b/cross-hppa-gcc13-bootstrap.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-hppa-gcc13.spec b/cross-hppa-gcc13.spec index e40ad43..7208ef4 100644 --- a/cross-hppa-gcc13.spec +++ b/cross-hppa-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-m68k-gcc13.spec b/cross-m68k-gcc13.spec index 1057ca6..b2fb893 100644 --- a/cross-m68k-gcc13.spec +++ b/cross-m68k-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-mips-gcc13.spec b/cross-mips-gcc13.spec index 74da4f8..fda9173 100644 --- a/cross-mips-gcc13.spec +++ b/cross-mips-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-nvptx-gcc13.spec b/cross-nvptx-gcc13.spec index 5120e12..050deb5 100644 --- a/cross-nvptx-gcc13.spec +++ b/cross-nvptx-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-ppc64-gcc13.spec b/cross-ppc64-gcc13.spec index ab38835..c577a00 100644 --- a/cross-ppc64-gcc13.spec +++ b/cross-ppc64-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-ppc64le-gcc13.spec b/cross-ppc64le-gcc13.spec index f957af9..6cd9979 100644 --- a/cross-ppc64le-gcc13.spec +++ b/cross-ppc64le-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-pru-gcc13-bootstrap.spec b/cross-pru-gcc13-bootstrap.spec index 1139177..bb2691c 100644 --- a/cross-pru-gcc13-bootstrap.spec +++ b/cross-pru-gcc13-bootstrap.spec @@ -342,6 +342,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-pru-gcc13.spec b/cross-pru-gcc13.spec index 14f794b..dbde193 100644 --- a/cross-pru-gcc13.spec +++ b/cross-pru-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-riscv64-elf-gcc13-bootstrap.spec b/cross-riscv64-elf-gcc13-bootstrap.spec index 76068f9..4e8933e 100644 --- a/cross-riscv64-elf-gcc13-bootstrap.spec +++ b/cross-riscv64-elf-gcc13-bootstrap.spec @@ -342,6 +342,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-riscv64-elf-gcc13.spec b/cross-riscv64-elf-gcc13.spec index 7fba437..23f8213 100644 --- a/cross-riscv64-elf-gcc13.spec +++ b/cross-riscv64-elf-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-riscv64-gcc13-bootstrap.spec b/cross-riscv64-gcc13-bootstrap.spec index f62a2d3..16a483c 100644 --- a/cross-riscv64-gcc13-bootstrap.spec +++ b/cross-riscv64-gcc13-bootstrap.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-riscv64-gcc13.spec b/cross-riscv64-gcc13.spec index fd4bbc3..0c564bb 100644 --- a/cross-riscv64-gcc13.spec +++ b/cross-riscv64-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-rx-gcc13-bootstrap.spec b/cross-rx-gcc13-bootstrap.spec index 110e6d8..8411668 100644 --- a/cross-rx-gcc13-bootstrap.spec +++ b/cross-rx-gcc13-bootstrap.spec @@ -342,6 +342,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-rx-gcc13.spec b/cross-rx-gcc13.spec index 29144a9..02ea402 100644 --- a/cross-rx-gcc13.spec +++ b/cross-rx-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-s390x-gcc13.spec b/cross-s390x-gcc13.spec index 938a67f..9343d13 100644 --- a/cross-s390x-gcc13.spec +++ b/cross-s390x-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-sparc-gcc13.spec b/cross-sparc-gcc13.spec index 77604b8..6952706 100644 --- a/cross-sparc-gcc13.spec +++ b/cross-sparc-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-sparc64-gcc13.spec b/cross-sparc64-gcc13.spec index c7d5b9c..92c97ef 100644 --- a/cross-sparc64-gcc13.spec +++ b/cross-sparc64-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/cross-x86_64-gcc13.spec b/cross-x86_64-gcc13.spec index 48e1e9c..3542c74 100644 --- a/cross-x86_64-gcc13.spec +++ b/cross-x86_64-gcc13.spec @@ -341,6 +341,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/gcc.spec.in b/gcc.spec.in index 950f6ec..3a46566 100644 --- a/gcc.spec.in +++ b/gcc.spec.in @@ -17,6 +17,8 @@ # nospeccleaner +%global flavor @BUILD_FLAVOR@%{nil} + %if 0%{?suse_version} < 1550 %define _slibdir /%{_lib} %define slibdir /lib @@ -127,6 +129,13 @@ %define build_jit 0 %endif +# Limit the number of parallel jobs to avoid OOM for gcc13 +%if "%{flavor}" == "" +%bcond_without limitbuild +%else +%bcond_with limitbuild +%endif + # Shared library SONAME versions %ifarch hppa %define libgcc_s 4 @@ -229,6 +238,9 @@ BuildRequires: texinfo # until here, but at least renaming and patching info files breaks this BuildRequires: gcc-c++ BuildRequires: glibc-devel-32bit +%if %{with limitbuild} +BuildRequires: memory-constraints +%endif BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl @@ -1353,6 +1365,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/gcc13-testresults.spec b/gcc13-testresults.spec index b3953a2..9cba812 100644 --- a/gcc13-testresults.spec +++ b/gcc13-testresults.spec @@ -37,6 +37,8 @@ # nospeccleaner +%global flavor @BUILD_FLAVOR@%{nil} + %if 0%{?suse_version} < 1550 %define _slibdir /%{_lib} %define slibdir /lib @@ -147,6 +149,13 @@ %define build_jit 0 %endif +# Limit the number of parallel jobs to avoid OOM for gcc13 +%if "%{flavor}" == "" +%bcond_without limitbuild +%else +%bcond_with limitbuild +%endif + # Shared library SONAME versions %ifarch hppa %define libgcc_s 4 @@ -245,6 +254,9 @@ BuildRequires: texinfo # until here, but at least renaming and patching info files breaks this BuildRequires: gcc-c++ BuildRequires: glibc-devel-32bit +%if %{with limitbuild} +BuildRequires: memory-constraints +%endif BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl @@ -544,6 +556,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch diff --git a/gcc13.changes b/gcc13.changes index 8a909ae..56fe25c 100644 --- a/gcc13.changes +++ b/gcc13.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Mar 24 14:44:48 UTC 2023 - Guillaume GARDET + +- Add %limit_build for gcc13 to avoid OOM + ------------------------------------------------------------------- Fri Mar 24 13:37:38 UTC 2023 - Martin Liška diff --git a/gcc13.spec b/gcc13.spec index bbfd3cf..484ffcc 100644 --- a/gcc13.spec +++ b/gcc13.spec @@ -16,6 +16,8 @@ # +%global flavor @BUILD_FLAVOR@%{nil} + %if 0%{?suse_version} < 1550 %define _slibdir /%{_lib} %define slibdir /lib @@ -126,6 +128,13 @@ %define build_jit 0 %endif +# Limit the number of parallel jobs to avoid OOM for gcc13 +%if "%{flavor}" == "" +%bcond_without limitbuild +%else +%bcond_with limitbuild +%endif + # Shared library SONAME versions %ifarch hppa %define libgcc_s 4 @@ -224,6 +233,9 @@ BuildRequires: texinfo # until here, but at least renaming and patching info files breaks this BuildRequires: gcc-c++ BuildRequires: glibc-devel-32bit +%if %{with limitbuild} +BuildRequires: memory-constraints +%endif BuildRequires: mpc-devel BuildRequires: mpfr-devel BuildRequires: perl @@ -2361,6 +2373,9 @@ ln -s newlib-4.3.0.20230120/newlib . #test patching end %build +%if %{with limitbuild} +%limit_build -m 900 +%endif %define _lto_cflags %{nil} # Avoid rebuilding of generated files contrib/gcc_update --touch