commit gcc11 for openSUSE:Factory
Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package gcc11 for openSUSE:Factory checked in at 2021-05-25 21:07:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gcc11 (Old) and /work/SRC/openSUSE:Factory/.gcc11.new.2988 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "gcc11" Tue May 25 21:07:38 2021 rev:3 rq:892216 version:11.1.1+git121 Changes: -------- --- /work/SRC/openSUSE:Factory/gcc11/cross-aarch64-gcc11.changes 2021-02-11 12:45:23.265314195 +0100 +++ /work/SRC/openSUSE:Factory/.gcc11.new.2988/cross-aarch64-gcc11.changes 2021-05-25 21:07:39.695152873 +0200 @@ -2 +2 @@ -Fri Feb 5 18:04:49 UTC 2021 - Martin Li��ka <mliska@suse.cz> +Mon May 10 12:08:19 UTC 2021 - Richard Biener <rguenther@suse.com> @@ -4 +4,69 @@ -- Bump to 7a18bc4ae62081021f4fd90d591a588cac931f77. +- Update to gcc-11 branch head (23855a176609fe8dda6abaf2b2), git121 +- Disable build-id generation on non-glibc targeting cross compilers. + +------------------------------------------------------------------- +Thu Apr 29 08:39:32 UTC 2021 - Richard Biener <rguenther@suse.com> + +- Update to gcc-11 branch head (cd0a059bd384da58d43674496a7), git67 + * Includes GCC 11.1 release +- Drop upstreamed gcc11-no-offload.patch. + +------------------------------------------------------------------- +Wed Apr 21 12:31:23 UTC 2021 - Richard Biener <rguenther@suse.com> + +- Update to gcc-11 branch head (7a7fc01b9d20afb1a2b805d93cb), git31 + * Includes GCC 11.1 RC2 +- Add gcc11-no-offload.patch and + gcc11-amdgcn-disable-hot-cold-partitioning.patch. +- Enable gfortran for offload compilers. +- BuildRequire procps from gcc11-testresults if we test go. +- Force using llvm11 for amdgcn offloading since llvm12 doesn't + yet work. Package expanded symlinks so concurrent installs do + not pull in another llvm-mc. +- Add gcc11-gdwarf-4-default.patch to default to DWARF4 generation + in SLES15 and older. + +------------------------------------------------------------------- +Tue Apr 20 14:57:07 UTC 2021 - Richard Biener <rguenther@suse.com> + +- Update to gcc-11 branch head (27350b77a92062667427100afb4), git10 + * Includes GCC 11.1 RC1 + +------------------------------------------------------------------- +Fri Apr 16 19:54:03 UTC 2021 - Martin Li��ka <mliska@suse.cz> + +- Bump to 49813aad3292f7f2bef69206274da78a9a7116ed. + +------------------------------------------------------------------- +Thu Apr 15 11:22:19 UTC 2021 - Richard Biener <rguenther@suse.com> + +- Disable nvptx offloading on aarch64 since it doesn't work. + +------------------------------------------------------------------- +Wed Apr 14 19:51:08 UTC 2021 - Martin Li��ka <mliska@suse.cz> + +- Bump to a87d3f964df31d4fbceb822c6d293e85c117d992. + +------------------------------------------------------------------- +Fri Apr 9 12:25:39 UTC 2021 - Richard Biener <rguenther@suse.com> + +- Remove gcc48-remove-mpfr-2.4.0-requirement.patch which does no + longer apply. +- Arrange for a C++ 11 capable host compiler to be available. +- Do not require ISL for cross compiler builds on old distros. + +------------------------------------------------------------------- +Thu Apr 8 19:52:03 UTC 2021 - Martin Li��ka <mliska@suse.cz> + +- Bump to 123b3e03c911a43054c1f88f5d3110e1d084dd4e. + +------------------------------------------------------------------- +Mon Mar 8 14:10:15 UTC 2021 - Richard Biener <rguenther@suse.com> + +- Update embedded newlib version from 3.3.0 to 4.1.0. + +------------------------------------------------------------------- +Mon Feb 22 10:44:40 UTC 2021 - Martin Li��ka <mliska@suse.cz> + +- Pack %{GCCDIST}-gcc%{binsuffix}. +- Add a new dependency for libgccjit. cross-amdgcn-gcc11.changes: same change cross-arm-gcc11.changes: same change cross-arm-none-gcc11-bootstrap.changes: same change cross-arm-none-gcc11.changes: same change cross-avr-gcc11-bootstrap.changes: same change cross-avr-gcc11.changes: same change cross-epiphany-gcc11-bootstrap.changes: same change cross-epiphany-gcc11.changes: same change cross-hppa-gcc11.changes: same change cross-i386-gcc11.changes: same change cross-m68k-gcc11.changes: same change cross-mips-gcc11.changes: same change cross-nvptx-gcc11.changes: same change cross-ppc64-gcc11.changes: same change cross-ppc64le-gcc11.changes: same change cross-riscv64-elf-gcc11-bootstrap.changes: same change cross-riscv64-elf-gcc11.changes: same change cross-riscv64-gcc11.changes: same change cross-rx-gcc11-bootstrap.changes: same change cross-rx-gcc11.changes: same change cross-s390x-gcc11.changes: same change cross-sparc-gcc11.changes: same change cross-sparc64-gcc11.changes: same change cross-x86_64-gcc11.changes: same change gcc11-testresults.changes: same change --- /work/SRC/openSUSE:Factory/gcc11/gcc11.changes 2021-02-11 12:45:34.601330700 +0100 +++ /work/SRC/openSUSE:Factory/.gcc11.new.2988/gcc11.changes 2021-05-25 21:07:41.647144308 +0200 @@ -2 +2 @@ -Mon Feb 8 17:41:34 UTC 2021 - Martin Li��ka <mliska@suse.cz> +Mon May 10 12:08:19 UTC 2021 - Richard Biener <rguenther@suse.com> @@ -4 +4,2 @@ -- Bump to efcd941e86b507d77e90a1b13f621e036eacdb45. +- Update to gcc-11 branch head (23855a176609fe8dda6abaf2b2), git121 +- Disable build-id generation on non-glibc targeting cross compilers. @@ -7 +8 @@ -Fri Feb 5 18:04:49 UTC 2021 - Martin Li��ka <mliska@suse.cz> +Thu Apr 29 08:39:32 UTC 2021 - Richard Biener <rguenther@suse.com> @@ -9 +10,63 @@ -- Bump to 7a18bc4ae62081021f4fd90d591a588cac931f77. +- Update to gcc-11 branch head (cd0a059bd384da58d43674496a7), git67 + * Includes GCC 11.1 release +- Drop upstreamed gcc11-no-offload.patch. + +------------------------------------------------------------------- +Wed Apr 21 12:31:23 UTC 2021 - Richard Biener <rguenther@suse.com> + +- Update to gcc-11 branch head (7a7fc01b9d20afb1a2b805d93cb), git31 + * Includes GCC 11.1 RC2 +- Add gcc11-no-offload.patch and + gcc11-amdgcn-disable-hot-cold-partitioning.patch. +- Enable gfortran for offload compilers. +- BuildRequire procps from gcc11-testresults if we test go. +- Force using llvm11 for amdgcn offloading since llvm12 doesn't + yet work. Package expanded symlinks so concurrent installs do + not pull in another llvm-mc. +- Add gcc11-gdwarf-4-default.patch to default to DWARF4 generation + in SLES15 and older. + +------------------------------------------------------------------- +Tue Apr 20 14:57:07 UTC 2021 - Richard Biener <rguenther@suse.com> + +- Update to gcc-11 branch head (27350b77a92062667427100afb4), git10 + * Includes GCC 11.1 RC1 + +------------------------------------------------------------------- +Fri Apr 16 19:54:03 UTC 2021 - Martin Li��ka <mliska@suse.cz> + +- Bump to 49813aad3292f7f2bef69206274da78a9a7116ed. + +------------------------------------------------------------------- +Thu Apr 15 11:22:19 UTC 2021 - Richard Biener <rguenther@suse.com> + +- Disable nvptx offloading on aarch64 since it doesn't work. + +------------------------------------------------------------------- +Wed Apr 14 19:51:08 UTC 2021 - Martin Li��ka <mliska@suse.cz> + +- Bump to a87d3f964df31d4fbceb822c6d293e85c117d992. + +------------------------------------------------------------------- +Fri Apr 9 12:25:39 UTC 2021 - Richard Biener <rguenther@suse.com> + +- Remove gcc48-remove-mpfr-2.4.0-requirement.patch which does no + longer apply. +- Arrange for a C++ 11 capable host compiler to be available. +- Do not require ISL for cross compiler builds on old distros. + +------------------------------------------------------------------- +Thu Apr 8 19:52:03 UTC 2021 - Martin Li��ka <mliska@suse.cz> + +- Bump to 123b3e03c911a43054c1f88f5d3110e1d084dd4e. + +------------------------------------------------------------------- +Mon Mar 8 14:10:15 UTC 2021 - Richard Biener <rguenther@suse.com> + +- Update embedded newlib version from 3.3.0 to 4.1.0. + +------------------------------------------------------------------- +Mon Feb 22 10:44:40 UTC 2021 - Martin Li��ka <mliska@suse.cz> + +- Pack %{GCCDIST}-gcc%{binsuffix}. +- Add a new dependency for libgccjit. Old: ---- gcc-11.0.0+git183291.tar.xz gcc48-remove-mpfr-2.4.0-requirement.patch newlib-3.3.0.tar.xz New: ---- gcc-11.1.1+git121.tar.xz gcc11-amdgcn-disable-hot-cold-partitioning.patch gcc11-gdwarf-4-default.patch newlib-4.1.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cross-aarch64-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.299137059 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.303137041 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch aarch64-suse-linux %define gcc_icecream 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -224,12 +233,13 @@ %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-amdgcn-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.319136971 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.323136953 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch amdgcn-amdhsa %define gcc_accel 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-arm-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.343136866 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.347136848 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch arm-suse-linux-gnueabi %define gcc_icecream 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-arm-none-gcc11-bootstrap.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.371136743 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.375136725 +0200 @@ -22,12 +22,12 @@ %define gcc_target_newlib 1 %define gcc_libc_bootstrap 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -44,7 +44,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -115,7 +115,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -128,17 +128,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -186,7 +187,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -202,8 +209,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -221,16 +230,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -284,7 +294,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -295,9 +305,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -305,6 +312,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -391,16 +403,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -463,7 +477,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -752,13 +772,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-arm-none-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.395136638 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.395136638 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch arm-none-eabi %define gcc_target_newlib 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-avr-gcc11-bootstrap.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.415136550 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.415136550 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch avr %define gcc_libc_bootstrap 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-avr-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.443136427 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.447136409 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch avr # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-epiphany-gcc11-bootstrap.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.471136304 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.475136287 +0200 @@ -22,12 +22,12 @@ %define gcc_target_newlib 1 %define gcc_libc_bootstrap 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -44,7 +44,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -115,7 +115,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -128,17 +128,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -186,7 +187,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -202,8 +209,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -221,16 +230,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -284,7 +294,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -295,9 +305,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -305,6 +312,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -391,16 +403,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -463,7 +477,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -752,13 +772,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-epiphany-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.499136181 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.503136164 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch epiphany-elf %define gcc_target_newlib 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-hppa-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.527136058 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.531136041 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch hppa-suse-linux %define gcc_icecream 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-i386-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.555135935 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.559135918 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch i586-suse-linux %define gcc_icecream 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-m68k-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.591135778 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.591135778 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch m68k-suse-linux %define gcc_icecream 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-mips-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.619135654 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.623135637 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch mips-suse-linux %define gcc_icecream 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-nvptx-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.655135497 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.655135497 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch nvptx-none %define gcc_accel 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-ppc64-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.687135356 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.691135339 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch powerpc64-suse-linux %define gcc_icecream 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-ppc64le-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.719135216 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.723135198 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch powerpc64le-suse-linux %define gcc_icecream 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-riscv64-elf-gcc11-bootstrap.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.747135093 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.751135076 +0200 @@ -22,12 +22,12 @@ %define gcc_target_newlib 1 %define gcc_libc_bootstrap 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -44,7 +44,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -115,7 +115,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -128,17 +128,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -186,7 +187,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -202,8 +209,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -221,16 +230,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -284,7 +294,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -295,9 +305,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -305,6 +312,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -391,16 +403,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -463,7 +477,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -752,13 +772,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-riscv64-elf-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.775134970 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.779134953 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch riscv64-elf %define gcc_target_newlib 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-riscv64-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.803134847 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.807134830 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch riscv64-suse-linux %define gcc_icecream 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-rx-gcc11-bootstrap.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.827134742 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.827134742 +0200 @@ -22,12 +22,12 @@ %define gcc_target_newlib 1 %define gcc_libc_bootstrap 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -44,7 +44,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -115,7 +115,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -128,17 +128,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -186,7 +187,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -202,8 +209,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -221,16 +230,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -284,7 +294,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -295,9 +305,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -305,6 +312,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -391,16 +403,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -463,7 +477,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -752,13 +772,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-rx-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.847134654 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.847134654 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch rx-elf %define gcc_target_newlib 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-s390x-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.871134549 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.875134532 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch s390x-suse-linux %define gcc_icecream 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-sparc-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.895134444 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.899134426 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch sparc-suse-linux %define gcc_icecream 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-sparc64-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.919134338 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.923134321 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch sparc64-suse-linux %define gcc_icecream 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ cross-x86_64-gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.947134215 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.947134215 +0200 @@ -21,12 +21,12 @@ %define gcc_target_arch x86_64-suse-linux %define gcc_icecream 1 # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -43,7 +43,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -114,7 +114,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 +Version: 11.1.1+git121 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -127,17 +127,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -185,7 +186,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -201,8 +208,10 @@ %else BuildRequires: texinfo %endif -BuildRequires: isl-devel BuildRequires: zlib-devel +%if %{suse_version} >= 1230 +BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -220,16 +229,17 @@ BuildRequires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} Requires: nvptx-tools -ExclusiveArch: aarch64 +ExclusiveArch: %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 BuildRequires: lld -BuildRequires: llvm +BuildRequires: llvm11 Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm +Requires: llvm11 # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -283,7 +293,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -294,9 +304,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -304,6 +311,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -390,16 +402,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -462,7 +476,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -751,13 +771,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ gcc11-testresults.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.979134075 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:43.983134058 +0200 @@ -19,7 +19,7 @@ %define building_testsuite 1 %define run_tests 1 # -# spec file for package gcc9 +# spec file for package gcc${version} # # # All modifications and additions to the file contributed by third parties @@ -99,7 +99,7 @@ %define build_d 0 %endif -%ifarch x86_64 aarch64 +%ifarch x86_64 %define build_nvptx 1 %else %define build_nvptx 0 @@ -203,6 +203,15 @@ %define selfconflict() otherproviders(%1) %endif +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 11.1.1+git121 +Release: 0 +%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) +%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') +%define binsuffix -11 + Name: gcc11-testresults BuildRequires: xz %if %{suse_version} > 1500 @@ -231,6 +240,7 @@ %if %{suse_version} >= 1230 BuildRequires: isl-devel %endif +%define hostsuffix %{nil} %if %{build_ada} %if 0%{?gcc_version:%{gcc_version}} > 11 %define hostsuffix %{binsuffix} @@ -247,6 +257,11 @@ %endif %endif %endif +# We now require a C++ 11 capable compiler for bootstrapping +%if %{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%endif %if 0%{?building_testsuite:1} # For building the libstdc++ API reference BuildRequires: doxygen @@ -259,6 +274,9 @@ BuildRequires: dejagnu BuildRequires: expect BuildRequires: gdb +%if %{build_go} +BuildRequires: procps +%endif %if %{build_nvptx} BuildRequires: cross-nvptx-gcc11 BuildRequires: cross-nvptx-newlib11-devel @@ -299,15 +317,6 @@ %define build_primary_64bit 0 %endif -%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 - -URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 -Release: 0 -%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) -%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') -%define binsuffix -11 - %if !0%{?building_testsuite:1} Requires: binutils Requires: cpp11 = %{version}-%{release} @@ -353,17 +362,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -474,7 +484,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -485,9 +495,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -495,6 +502,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -581,16 +593,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -653,7 +667,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} + --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc ++++++ gcc11.spec ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:43.999133987 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:44.007133952 +0200 @@ -81,7 +81,7 @@ %define build_d 0 %endif -%ifarch x86_64 aarch64 +%ifarch x86_64 %define build_nvptx 1 %else %define build_nvptx 0 @@ -185,6 +185,15 @@ %define selfconflict() otherproviders(%1) %endif +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 11.1.1+git121 +Release: 0 +%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) +%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') +%define binsuffix -11 + Name: gcc11 BuildRequires: xz %if %{suse_version} > 1500 @@ -213,6 +222,7 @@ %if %{suse_version} >= 1230 BuildRequires: isl-devel %endif +%define hostsuffix %{nil} %if %{build_ada} %if 0%{?gcc_version:%{gcc_version}} > 11 %define hostsuffix %{binsuffix} @@ -229,6 +239,11 @@ %endif %endif %endif +# We now require a C++ 11 capable compiler for bootstrapping +%if %{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%endif %if 0%{?building_testsuite:1} # For building the libstdc++ API reference BuildRequires: doxygen @@ -241,6 +256,9 @@ BuildRequires: dejagnu BuildRequires: expect BuildRequires: gdb +%if %{build_go} +BuildRequires: procps +%endif %if %{build_nvptx} BuildRequires: cross-nvptx-gcc11 BuildRequires: cross-nvptx-newlib11-devel @@ -281,15 +299,6 @@ %define build_primary_64bit 0 %endif -%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 - -URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 -Release: 0 -%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) -%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') -%define binsuffix -11 - %if !0%{?building_testsuite:1} Requires: binutils Requires: cpp11 = %{version}-%{release} @@ -335,17 +344,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -946,9 +956,11 @@ License: GPL-3.0 WITH GCC-exception-3.1 Group: System/Libraries Provides: libgnarl-11 = %{version}-%{release} -Conflicts: %selfconflict libgnarl-11 +# FIXME: remove %{after} service-format_spec_file is fixed +# https://github.com/openSUSE/obs-service-format_spec_file/issues/46 +Conflicts: %selfconflict libgnarl-11%{nil} Provides: libgnat-11 = %{version}-%{release} -Conflicts: %selfconflict libgnat-11 +Conflicts: %selfconflict libgnat-11%{nil} %description -n libada11 This package contains the shared libraries required to run programs @@ -966,9 +978,11 @@ License: GPL-3.0 WITH GCC-exception-3.1 Group: System/Libraries Provides: libgnarl-11-32bit = %{version}-%{release} -Conflicts: %selfconflict libgnarl-11-32bit +# FIXME: remove %{after} service-format_spec_file is fixed +# https://github.com/openSUSE/obs-service-format_spec_file/issues/46 +Conflicts: %selfconflict libgnarl-11-32bit%{nil} Provides: libgnat-11-32bit = %{version}-%{release} -Conflicts: %selfconflict libgnat-11-32bit +Conflicts: %selfconflict libgnat-11-32bit%{nil} %description -n libada11-32bit This package contains the shared libraries required to run programs @@ -986,9 +1000,11 @@ License: GPL-3.0 WITH GCC-exception-3.1 Group: System/Libraries Provides: libgnarl-11-64bit = %{version}-%{release} -Conflicts: %selfconflict libgnarl-11-64bit +# FIXME: remove %{after} service-format_spec_file is fixed +# https://github.com/openSUSE/obs-service-format_spec_file/issues/46 +Conflicts: %selfconflict libgnarl-11-64bit%{nil} Provides: libgnat-11-64bit = %{version}-%{release} -Conflicts: %selfconflict libgnat-11-64bit +Conflicts: %selfconflict libgnat-11-64bit%{nil} %description -n libada11-64bit This package contains the shared libraries required to run programs @@ -1766,6 +1782,7 @@ License: GPL-3.0-or-later Group: Development/Languages/C and C++ Provides: libgccjit%{libgccjit_sover} = %{version}-%{release} +Requires: gcc11 %description -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} Support for embedding GCC inside programs and libraries @@ -1886,7 +1903,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -1897,9 +1914,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -1907,6 +1921,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -1993,16 +2012,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -2065,7 +2086,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} + --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -2528,7 +2555,12 @@ chmod 644 ../testresults/* %endif # Remove files that we do not need to clean up filelist + +# Preserve %{GCCDIST}-gcc%{binsuffix} binary for libgccjit as it is used as a driver +mv %{buildroot}/%{_prefix}/bin/%{GCCDIST}-gcc%{binsuffix} %{buildroot} rm -f %{buildroot}/%{_prefix}/bin/%{GCCDIST}-* +mv %{buildroot}/%{GCCDIST}-gcc%{binsuffix} %{buildroot}/%{_prefix}/bin/ + rm -rf %{buildroot}/%{libsubdir}/install-tools rm -f %{buildroot}/%{libsubdir}/include-fixed/zutil.h rm -f %{buildroot}/%{libsubdir}/include-fixed/linux/a.out.h @@ -2646,6 +2678,7 @@ %endif %endif %{_prefix}/bin/gcc%{binsuffix} +%{_prefix}/bin/%{GCCDIST}-gcc%{binsuffix} %{_prefix}/bin/gcov%{binsuffix} %{_prefix}/bin/gcov-dump%{binsuffix} %{_prefix}/bin/gcov-tool%{binsuffix} ++++++ cross.spec.in ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:44.143133356 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:44.143133356 +0200 @@ -1,11 +1,11 @@ # -# spec file for package gcc (Version 4.0.1) +# spec file template for cross packages of gcc${version} # -# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # -# Please submit bugfixes or comments via http://www.suse.de/feedback/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # # nospeccleaner @@ -22,7 +22,7 @@ %define build_libjava 0 %define build_java 0 -%define build_fortran 0 +%define build_fortran 0%{?gcc_accel:1} %define build_objc 0 %define build_objcp 0 %define build_go 0 @@ -98,7 +98,13 @@ Requires: cross-%{binutils_target}-binutils %endif %endif +%define hostsuffix %{nil} +%if 0%{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%else BuildRequires: gcc-c++ +%endif %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -115,7 +121,9 @@ BuildRequires: texinfo %endif BuildRequires: zlib-devel +%if %{suse_version} >= 1230 BuildRequires: isl-devel +%endif %ifarch ia64 BuildRequires: libunwind-devel %endif @@ -133,14 +141,15 @@ BuildRequires: nvptx-tools Requires: nvptx-tools Requires: cross-nvptx-newlib-devel >= %{version}-%{release} -ExclusiveArch: x86_64 aarch64 +ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker -BuildRequires: llvm +# amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't +# work at the moment so require llvm11 +BuildRequires: llvm11 BuildRequires: lld -Requires: llvm +Requires: llvm11 Requires: lld Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does @@ -179,7 +188,6 @@ Requires(post): update-alternatives Requires(preun): update-alternatives Summary: The GNU Compiler Collection targeting %{cross_arch} -License: GPL-3.0-or-later %description The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}. @@ -299,13 +307,14 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif # for amdgcn install the symlinks to the llvm tools +# follow alternatives symlinks to the hardcoded version requirement %if "%{TARGET_ARCH}" == "amdgcn" mkdir -p $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin -ln -s /usr/bin/llvm-ar $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar -ln -s /usr/bin/llvm-mc $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as +ln -s `readlink -f /usr/bin/llvm-ar` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ar +ln -s `readlink -f /usr/bin/llvm-mc` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/as ln -s /usr/bin/lld $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ld -ln -s /usr/bin/llvm-nm $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm -ln -s /usr/bin/llvm-ranlib $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib +ln -s `readlink -f /usr/bin/llvm-nm` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/nm +ln -s `readlink -f /usr/bin/llvm-ranlib` $RPM_BUILD_ROOT%{_prefix}/amdgcn-amdhsa/bin/ranlib ln -s %{_prefix}/amdgcn-amdhsa/bin/ar $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ar ln -s %{_prefix}/amdgcn-amdhsa/bin/as $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-as ln -s %{_prefix}/amdgcn-amdhsa/bin/ld $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ld ++++++ gcc-11.0.0+git183291.tar.xz -> gcc-11.1.1+git121.tar.xz ++++++ /work/SRC/openSUSE:Factory/gcc11/gcc-11.0.0+git183291.tar.xz /work/SRC/openSUSE:Factory/.gcc11.new.2988/gcc-11.1.1+git121.tar.xz differ: char 15, line 1 ++++++ gcc.spec.in ++++++ --- /var/tmp/diff_new_pack.UtOecL/_old 2021-05-25 21:07:44.191133145 +0200 +++ /var/tmp/diff_new_pack.UtOecL/_new 2021-05-25 21:07:44.195133127 +0200 @@ -1,7 +1,7 @@ # -# spec file for package gcc9 +# spec file for package gcc${version} # -# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -80,7 +80,7 @@ %define build_d 0 %endif -%ifarch x86_64 aarch64 +%ifarch x86_64 %define build_nvptx 1 %else %define build_nvptx 0 @@ -186,6 +186,16 @@ %define selfconflict() otherproviders(%1) %endif +# SRC-COMMON-BEGIN +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 11.1.1+git121 +Release: 1 +%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) +%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') +%define binsuffix -@base_ver@ +# SRC-COMMON-END Name: gcc@base_ver@ BuildRequires: xz @@ -215,6 +225,7 @@ %if %{suse_version} >= 1230 BuildRequires: isl-devel %endif +%define hostsuffix %{nil} %if %{build_ada} %if 0%{?gcc_version:%{gcc_version}} > @base_ver@ %define hostsuffix %{binsuffix} @@ -231,6 +242,11 @@ %endif %endif %endif +# We now require a C++ 11 capable compiler for bootstrapping +%if %{suse_version} < 1220 +%define hostsuffix -4.8 +BuildRequires: gcc48-c++ +%endif %if 0%{?building_testsuite:1} # For building the libstdc++ API reference BuildRequires: doxygen @@ -243,6 +259,9 @@ BuildRequires: dejagnu BuildRequires: expect BuildRequires: gdb +%if %{build_go} +BuildRequires: procps +%endif %if %{build_nvptx} BuildRequires: cross-nvptx-gcc@base_ver@ BuildRequires: cross-nvptx-newlib@base_ver@-devel @@ -283,17 +302,6 @@ %define build_primary_64bit 0 %endif -# SRC-COMMON-BEGIN -%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 - -URL: https://gcc.gnu.org/ -Version: 11.0.0+git183291 -Release: 1 -%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) -%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') -%define binsuffix -@base_ver@ -# SRC-COMMON-END - %if !0%{?building_testsuite:1} Requires: binutils glibc-devel Requires: cpp@base_ver@ = %{version}-%{release} @@ -340,17 +348,18 @@ Source2: gcc11-rpmlintrc Source3: gcc11-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.3.0.tar.xz +Source5: newlib-4.1.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch Patch15: gcc7-avoid-fixinc-error.diff Patch16: gcc9-reproducible-builds.patch Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch Patch18: gcc10-amdgcn-llvm-as.patch +Patch19: gcc11-gdwarf-4-default.patch +Patch20: gcc11-amdgcn-disable-hot-cold-partitioning.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch Patch52: gcc10-foffload-default.patch @@ -679,9 +688,11 @@ License: GPL-3.0 WITH GCC-exception-3.1 Group: System/Libraries Provides: libgnarl-@base_ver@@variant@ = %{version}-%{release} -Conflicts: %selfconflict libgnarl-@base_ver@@variant@ +# FIXME: remove %{after} service-format_spec_file is fixed +# https://github.com/openSUSE/obs-service-format_spec_file/issues/46 +Conflicts: %selfconflict libgnarl-@base_ver@@variant@%{nil} Provides: libgnat-@base_ver@@variant@ = %{version}-%{release} -Conflicts: %selfconflict libgnat-@base_ver@@variant@ +Conflicts: %selfconflict libgnat-@base_ver@@variant@%{nil} %description -n libada@base_ver@@variant@ This package contains the shared libraries required to run programs @@ -1005,6 +1016,7 @@ Summary: The GNU Compiler Collection JIT library License: GPL-3.0-or-later Provides: libgccjit%{libgccjit_sover} = %{version}-%{release} +Requires: gcc@base_ver@ %description -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} Support for embedding GCC inside programs and libraries @@ -1132,7 +1144,7 @@ %prep %if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.3.0/newlib . +ln -s newlib-4.1.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -1143,9 +1155,6 @@ %patch5 %patch6 %patch7 -%if %{suse_version} < 1310 -%patch9 -%endif %patch11 %patch15 %patch16 @@ -1153,6 +1162,11 @@ %if "%{TARGET_ARCH}" == "amdgcn" %patch18 -p1 %endif +# In SLE15 and earlier default to dwarf4, not dwarf5 +%if %{suse_version} < 1550 +%patch19 -p1 +%endif +%patch20 -p1 %patch51 %patch52 -p1 %patch60 -p1 @@ -1239,16 +1253,18 @@ export PATH="`pwd`/target-tools/bin:$PATH" %endif -%if %{build_ada} +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin +%if %{build_ada} cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind +%endif cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} @@ -1311,7 +1327,13 @@ %endif --enable-version-specific-runtime-libs \ --with-gcc-major-version-only \ +%if 0%{!?gcc_target_arch:1} + --enable-linker-build-id \ +%else +%if 0%{?gcc_target_glibc:1} --enable-linker-build-id \ +%endif +%endif --enable-linux-futex \ %if %{suse_version} >= 1315 %ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc @@ -1779,7 +1801,12 @@ %endif # GCC-TESTSUITE-DELETE-BEGIN # Remove files that we do not need to clean up filelist + +# Preserve %{GCCDIST}-gcc%{binsuffix} binary for libgccjit as it is used as a driver +mv %{buildroot}/%{_prefix}/bin/%{GCCDIST}-gcc%{binsuffix} %{buildroot} rm -f %{buildroot}/%{_prefix}/bin/%{GCCDIST}-* +mv %{buildroot}/%{GCCDIST}-gcc%{binsuffix} %{buildroot}/%{_prefix}/bin/ + rm -rf %{buildroot}/%{libsubdir}/install-tools rm -f %{buildroot}/%{libsubdir}/include-fixed/zutil.h rm -f %{buildroot}/%{libsubdir}/include-fixed/linux/a.out.h @@ -1899,6 +1926,7 @@ %endif %endif %{_prefix}/bin/gcc%{binsuffix} +%{_prefix}/bin/%{GCCDIST}-gcc%{binsuffix} %{_prefix}/bin/gcov%{binsuffix} %{_prefix}/bin/gcov-dump%{binsuffix} %{_prefix}/bin/gcov-tool%{binsuffix} ++++++ gcc11-amdgcn-disable-hot-cold-partitioning.patch ++++++ diff --git a/gcc/config/gcn/gcn.c b/gcc/config/gcn/gcn.c index 9660ca6eaa4..7635644a7b7 100644 --- a/gcc/config/gcn/gcn.c +++ b/gcc/config/gcn/gcn.c @@ -6251,9 +6251,17 @@ gcn_dwarf_register_span (rtx rtl) return p; } +static void +gcn_override_options_after_change (void) +{ + flag_reorder_blocks_and_partition = 0; +} + /* }}} */ /* {{{ TARGET hook overrides. */ +#undef TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE +#define TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE gcn_override_options_after_change #undef TARGET_ADDR_SPACE_ADDRESS_MODE #define TARGET_ADDR_SPACE_ADDRESS_MODE gcn_addr_space_address_mode #undef TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P ++++++ gcc11-gdwarf-4-default.patch ++++++ diff --git a/gcc/common.opt b/gcc/common.opt index a75b44ee47e..2d33861ad1f 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -3175,7 +3175,7 @@ Common Driver JoinedOrMissing Negative(gdwarf-) Generate debug information in default version of DWARF format. gdwarf- -Common Driver Joined UInteger Var(dwarf_version) Init(5) Negative(gstabs) +Common Driver Joined UInteger Var(dwarf_version) Init(4) Negative(gstabs) Generate debug information in DWARF v2 (or later) format. gdwarf32 diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 4a87b9ef8e8..4f1adcfe621 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -9638,9 +9638,8 @@ possible. @opindex gdwarf Produce debugging information in DWARF format (if that is supported). The value of @var{version} may be either 2, 3, 4 or 5; the default -version for most targets is 5 (with the exception of VxWorks, TPF and -Darwin/Mac OS X, which default to version 2, and AIX, which defaults -to version 4). +version for most targets is 4 (with the exception of VxWorks, TPF and +Darwin/Mac OS X, which default to version 2). Note that with DWARF Version 2, some ports require and always use some non-conflicting DWARF 3 extensions in the unwind tables. ++++++ newlib-3.3.0.tar.xz -> newlib-4.1.0.tar.xz ++++++ ++++ 57543 lines of diff (skipped)
participants (1)
-
Source-Sync