Hello community, here is the log from the commit of package gcc10 for openSUSE:Factory checked in at 2020-05-12 22:25:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gcc10 (Old) and /work/SRC/openSUSE:Factory/.gcc10.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gcc10" Tue May 12 22:25:28 2020 rev:3 rq:801340 version:10.1.1+git40 Changes: -------- --- /work/SRC/openSUSE:Factory/gcc10/cross-aarch64-gcc10.changes 2020-03-18 12:26:00.456220322 +0100 +++ /work/SRC/openSUSE:Factory/.gcc10.new.2738/cross-aarch64-gcc10.changes 2020-05-12 22:25:48.495052507 +0200 @@ -1,0 +2,95 @@ +Thu May 7 13:43:25 UTC 2020 - Richard Biener <[email protected]> + +- Update to gcc-10 branch head (dd38686d9c810cecbaa80bb82e), git40. + * Includes GCC 10.1 release. + +------------------------------------------------------------------- +Sat May 2 09:37:31 UTC 2020 - Richard Biener <[email protected]> + +- Update to gcc-10 branch head (2aaa1dc3c87372fd55c1c33aa7a), git5. + * Includes first release candidate for GCC 10.1. + * Includes gcc10-pr94734.patch + +------------------------------------------------------------------- +Fri Apr 24 11:43:55 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (3685c5adf5c0b30268cb8f95c89e4), git176017. +- Add gcc10-pr94734.patch + +------------------------------------------------------------------- +Fri Apr 17 12:33:31 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (b835645c7a51b7e99092abe61d677), git175845. +- Drop to 4 jobs as constraint for s390x. + +------------------------------------------------------------------- +Thu Apr 16 13:08:04 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (effcb4181e143bc390286a489ff84), git175831. +- Package arm_cde.h and arm_mve_types.h for arm. +- Alter _constraints to also constrain jobs. +- Add libzstd-devel BuildRequires to cross compiler specs. +- Switch to release checking builds. + +------------------------------------------------------------------- +Wed Apr 15 09:00:46 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (2dc9294c3c7c81a6d5e1d4dedf58f), git175805. + +------------------------------------------------------------------- +Wed Apr 8 07:59:48 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (13e41d8b9d3d7598c72c38acc86a3), git175688. + +------------------------------------------------------------------- +Mon Apr 6 07:51:47 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (c72a1b6f8b26de37d1a922a8af143), git175641. + +------------------------------------------------------------------- +Fri Mar 27 19:43:44 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (038769535a8cbdd3dd3e100bde314), git175499. + +------------------------------------------------------------------- +Tue Mar 24 07:23:45 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (75c24a08d697d6442fe6c26142f05), git175422. + +------------------------------------------------------------------- +Fri Mar 20 10:13:54 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (7d4549b2cd209eb621453ce13be7f), git175366. + +------------------------------------------------------------------- +Thu Mar 19 10:22:27 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (c7e9019681857b329bbe4c1e7ec8d), git175348. +- Package arm_mve.h for arm. + +------------------------------------------------------------------- +Wed Mar 18 08:39:57 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (4e3d3e40726e1b68bf52fa205c68495124ea60b8). +- libgphobos and libgdruntime SONAME versions were reset to 1. + +------------------------------------------------------------------- +Fri Mar 13 14:01:40 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (3604480a6fe493c51d6ebd53d9b1abeebbbb828f). + +------------------------------------------------------------------- +Mon Mar 9 14:21:19 UTC 2020 - Richard Biener <[email protected]> + +- Update embedded newlib to newlib-3.3.0.tar.xz, drop old + newlib-3.1.0.tar.xz +- Enable support for amdgcn-amdhsa OpenMP/OpenACC offloading. + +------------------------------------------------------------------- +Fri Mar 6 09:23:13 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (655e5c29ae4080666154b3e10ac81116a1b7a638). +- Re-add gcc9-reproducible-builds.patch and + gcc9-reproducible-builds-buildid-for-checksum.patch. + +------------------------------------------------------------------- New Changes file: --- /dev/null 2020-04-14 14:47:33.391806949 +0200 +++ /work/SRC/openSUSE:Factory/.gcc10.new.2738/cross-amdgcn-gcc10.changes 2020-05-12 22:25:52.107060045 +0200 @@ -0,0 +1,184 @@ +------------------------------------------------------------------- +Thu May 7 13:43:25 UTC 2020 - Richard Biener <[email protected]> + +- Update to gcc-10 branch head (dd38686d9c810cecbaa80bb82e), git40. + * Includes GCC 10.1 release. + +------------------------------------------------------------------- +Sat May 2 09:37:31 UTC 2020 - Richard Biener <[email protected]> + +- Update to gcc-10 branch head (2aaa1dc3c87372fd55c1c33aa7a), git5. + * Includes first release candidate for GCC 10.1. + * Includes gcc10-pr94734.patch + +------------------------------------------------------------------- +Fri Apr 24 11:43:55 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (3685c5adf5c0b30268cb8f95c89e4), git176017. +- Add gcc10-pr94734.patch + +------------------------------------------------------------------- +Fri Apr 17 12:33:31 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (b835645c7a51b7e99092abe61d677), git175845. +- Drop to 4 jobs as constraint for s390x. + +------------------------------------------------------------------- +Thu Apr 16 13:08:04 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (effcb4181e143bc390286a489ff84), git175831. +- Package arm_cde.h and arm_mve_types.h for arm. +- Alter _constraints to also constrain jobs. +- Add libzstd-devel BuildRequires to cross compiler specs. +- Switch to release checking builds. + +------------------------------------------------------------------- +Wed Apr 15 09:00:46 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (2dc9294c3c7c81a6d5e1d4dedf58f), git175805. + +------------------------------------------------------------------- +Wed Apr 8 07:59:48 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (13e41d8b9d3d7598c72c38acc86a3), git175688. + +------------------------------------------------------------------- +Mon Apr 6 07:51:47 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (c72a1b6f8b26de37d1a922a8af143), git175641. + +------------------------------------------------------------------- +Fri Mar 27 19:43:44 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (038769535a8cbdd3dd3e100bde314), git175499. + +------------------------------------------------------------------- +Tue Mar 24 07:23:45 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (75c24a08d697d6442fe6c26142f05), git175422. + +------------------------------------------------------------------- +Fri Mar 20 10:13:54 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (7d4549b2cd209eb621453ce13be7f), git175366. + +------------------------------------------------------------------- +Thu Mar 19 10:22:27 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (c7e9019681857b329bbe4c1e7ec8d), git175348. +- Package arm_mve.h for arm. + +------------------------------------------------------------------- +Wed Mar 18 08:39:57 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (4e3d3e40726e1b68bf52fa205c68495124ea60b8). +- libgphobos and libgdruntime SONAME versions were reset to 1. + +------------------------------------------------------------------- +Fri Mar 13 14:01:40 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (3604480a6fe493c51d6ebd53d9b1abeebbbb828f). + +------------------------------------------------------------------- +Mon Mar 9 14:21:19 UTC 2020 - Richard Biener <[email protected]> + +- Update embedded newlib to newlib-3.3.0.tar.xz, drop old + newlib-3.1.0.tar.xz +- Enable support for amdgcn-amdhsa OpenMP/OpenACC offloading. + +------------------------------------------------------------------- +Fri Mar 6 09:23:13 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (655e5c29ae4080666154b3e10ac81116a1b7a638). +- Re-add gcc9-reproducible-builds.patch and + gcc9-reproducible-builds-buildid-for-checksum.patch. + +------------------------------------------------------------------- +Mon Mar 2 10:16:06 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (778a77357cad11e8dd4c810544330af0fbe843b1). + * Includes fix for binutils version parsing [gcc#93965] + +------------------------------------------------------------------- +Tue Feb 25 13:43:17 UTC 2020 - Richard Biener <[email protected]> + +- Add libstdc++6-pp provides and conflicts to avoid file conflicts + with same minor version of libstdc++6-pp from gcc9. + +------------------------------------------------------------------- +Fri Feb 21 09:58:21 UTC 2020 - Richard Biener <[email protected]> + +- Disable zstd use for SLES15 and older. + +------------------------------------------------------------------- +Tue Feb 18 15:37:52 UTC 2020 - Martin Liška <[email protected]> + +- Bump to rfa1160f6e50500aa38162fefb43bfb10c25e0363. + +------------------------------------------------------------------- +Tue Feb 18 13:54:32 UTC 2020 - Martin Liška <[email protected]> + +- Bump to r33351ff9faa21c4c1af377d661a52ac0ce366db3. + +------------------------------------------------------------------- +Wed Feb 12 08:02:18 UTC 2020 - Richard Biener <[email protected]> + +- Adjust installed headers for arm and aarch64, enable link-mutex + for riscv64. + +------------------------------------------------------------------- +Mon Feb 10 13:52:26 UTC 2020 - Andreas Schwab <[email protected]> + +- Don't remove go tool buildid, needed for bootstrapping go +- Increase disk constraint + +------------------------------------------------------------------- +Thu Feb 6 15:04:02 UTC 2020 - Martin Liška <[email protected]> + +- Bump to rc940105cc17111be98d8d42ba48a413b0e63aebe. + +------------------------------------------------------------------- +Thu Feb 6 08:30:38 UTC 2020 - Martin Liška <[email protected]> + +- Bump libtool version of libgo. + +------------------------------------------------------------------- +Wed Feb 5 15:25:01 UTC 2020 - Martin Liška <[email protected]> + +- Bump to r269e8130b77065452698ab97e5da77d132d00276. + +------------------------------------------------------------------- +Fri Jan 17 12:01:09 UTC 2020 - Martin Liška <[email protected]> + +- Bump to r507de5ee23efdc8a16d6b0b6488e118055c711cd. + +------------------------------------------------------------------- +Mon Aug 12 11:31:02 UTC 2019 - Martin Liška <[email protected]> + +- Add lto-dump to cross packages. + +------------------------------------------------------------------- +Mon Aug 12 07:57:52 UTC 2019 - Martin Liška <[email protected]> + +- New package, inherits from gcc9 + * gcc-add-defaultsspec.diff, add the ability to provide a specs + file that is read by default + * tls-no-direct.diff, avoid direct %fs references on x86 to not + slow down Xen + * gcc43-no-unwind-tables.diff, do not produce unwind tables for + CRT files + * gcc41-ppc32-retaddr.patch, fix expansion of __builtin_return_addr + for ppc, just a testcase + * gcc44-textdomain.patch, make translation files version specific + and adjust textdomain to find them + * gcc44-rename-info-files.patch, fix cross-references in info files + when renaming them to be version specific + * gcc48-libstdc++-api-reference.patch, fix link in the installed + libstdc++ html documentation + * gcc48-remove-mpfr-2.4.0-requirement.patch, make GCC work with + earlier mpfr versions on old products + * gcc5-no-return-gcc43-workaround.patch, make build work with + host gcc 4.3 + * gcc7-remove-Wexpansion-to-defined-from-Wextra.patch, removes + new warning from -Wextra + * gcc7-avoid-fixinc-error.diff --- /work/SRC/openSUSE:Factory/gcc10/cross-arm-gcc10.changes 2020-03-18 12:26:03.600222295 +0100 +++ /work/SRC/openSUSE:Factory/.gcc10.new.2738/cross-arm-gcc10.changes 2020-05-12 22:25:53.923063835 +0200 @@ -1,0 +2,95 @@ +Thu May 7 13:43:25 UTC 2020 - Richard Biener <[email protected]> + +- Update to gcc-10 branch head (dd38686d9c810cecbaa80bb82e), git40. + * Includes GCC 10.1 release. + +------------------------------------------------------------------- +Sat May 2 09:37:31 UTC 2020 - Richard Biener <[email protected]> + +- Update to gcc-10 branch head (2aaa1dc3c87372fd55c1c33aa7a), git5. + * Includes first release candidate for GCC 10.1. + * Includes gcc10-pr94734.patch + +------------------------------------------------------------------- +Fri Apr 24 11:43:55 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (3685c5adf5c0b30268cb8f95c89e4), git176017. +- Add gcc10-pr94734.patch + +------------------------------------------------------------------- +Fri Apr 17 12:33:31 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (b835645c7a51b7e99092abe61d677), git175845. +- Drop to 4 jobs as constraint for s390x. + +------------------------------------------------------------------- +Thu Apr 16 13:08:04 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (effcb4181e143bc390286a489ff84), git175831. +- Package arm_cde.h and arm_mve_types.h for arm. +- Alter _constraints to also constrain jobs. +- Add libzstd-devel BuildRequires to cross compiler specs. +- Switch to release checking builds. + +------------------------------------------------------------------- +Wed Apr 15 09:00:46 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (2dc9294c3c7c81a6d5e1d4dedf58f), git175805. + +------------------------------------------------------------------- +Wed Apr 8 07:59:48 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (13e41d8b9d3d7598c72c38acc86a3), git175688. + +------------------------------------------------------------------- +Mon Apr 6 07:51:47 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (c72a1b6f8b26de37d1a922a8af143), git175641. + +------------------------------------------------------------------- +Fri Mar 27 19:43:44 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (038769535a8cbdd3dd3e100bde314), git175499. + +------------------------------------------------------------------- +Tue Mar 24 07:23:45 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (75c24a08d697d6442fe6c26142f05), git175422. + +------------------------------------------------------------------- +Fri Mar 20 10:13:54 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (7d4549b2cd209eb621453ce13be7f), git175366. + +------------------------------------------------------------------- +Thu Mar 19 10:22:27 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (c7e9019681857b329bbe4c1e7ec8d), git175348. +- Package arm_mve.h for arm. + +------------------------------------------------------------------- +Wed Mar 18 08:39:57 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (4e3d3e40726e1b68bf52fa205c68495124ea60b8). +- libgphobos and libgdruntime SONAME versions were reset to 1. + +------------------------------------------------------------------- +Fri Mar 13 14:01:40 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (3604480a6fe493c51d6ebd53d9b1abeebbbb828f). + +------------------------------------------------------------------- +Mon Mar 9 14:21:19 UTC 2020 - Richard Biener <[email protected]> + +- Update embedded newlib to newlib-3.3.0.tar.xz, drop old + newlib-3.1.0.tar.xz +- Enable support for amdgcn-amdhsa OpenMP/OpenACC offloading. + +------------------------------------------------------------------- +Fri Mar 6 09:23:13 UTC 2020 - Richard Biener <[email protected]> + +- Update to master head (655e5c29ae4080666154b3e10ac81116a1b7a638). +- Re-add gcc9-reproducible-builds.patch and + gcc9-reproducible-builds-buildid-for-checksum.patch. + +------------------------------------------------------------------- cross-arm-none-gcc10-bootstrap.changes: same change cross-arm-none-gcc10.changes: same change cross-avr-gcc10-bootstrap.changes: same change cross-avr-gcc10.changes: same change cross-epiphany-gcc10-bootstrap.changes: same change cross-epiphany-gcc10.changes: same change cross-hppa-gcc10.changes: same change cross-i386-gcc10.changes: same change cross-m68k-gcc10.changes: same change cross-mips-gcc10.changes: same change cross-nvptx-gcc10.changes: same change cross-ppc64-gcc10.changes: same change cross-ppc64le-gcc10.changes: same change cross-riscv64-elf-gcc10-bootstrap.changes: same change cross-riscv64-elf-gcc10.changes: same change cross-riscv64-gcc10.changes: same change cross-rx-gcc10-bootstrap.changes: same change cross-rx-gcc10.changes: same change cross-s390x-gcc10.changes: same change cross-sparc-gcc10.changes: same change cross-sparc64-gcc10.changes: same change cross-x86_64-gcc10.changes: same change gcc10-testresults.changes: same change gcc10.changes: same change Old: ---- gcc-10.0.1+git175037.tar.xz newlib-3.1.0.tar.xz New: ---- cross-amdgcn-gcc10.changes cross-amdgcn-gcc10.spec gcc-10.1.1+git40.tar.xz gcc9-reproducible-builds-buildid-for-checksum.patch gcc9-reproducible-builds.patch newlib-3.3.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cross-aarch64-gcc10.spec ++++++ --- /var/tmp/diff_new_pack.azP7xx/_old 2020-05-12 22:27:13.919230777 +0200 +++ /var/tmp/diff_new_pack.azP7xx/_new 2020-05-12 22:27:13.919230777 +0200 @@ -49,6 +49,7 @@ %define build_go 0 %define build_hsa 0 %define build_nvptx 0 +%define build_gcn 0 %define build_d 0 %define enable_plugins 0 @@ -114,7 +115,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 10.0.1+git175037 +Version: 10.1.1+git40 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,7 +128,7 @@ Source2: gcc10-rpmlintrc Source3: gcc10-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.1.0.tar.xz +Source5: newlib-3.3.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff @@ -135,6 +136,8 @@ 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 # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -176,12 +179,17 @@ %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %if "%{cross_arch}" != "nvptx" +%if "%{cross_arch}" != "amdgcn" BuildRequires: cross-%{binutils_target}-binutils Requires: cross-%{binutils_target}-binutils %endif +%endif +BuildRequires: gcc-c++ +%if %{suse_version} > 1500 +BuildRequires: libzstd-devel +%endif BuildRequires: bison BuildRequires: flex -BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel @@ -214,6 +222,16 @@ ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif +%if "%{cross_arch}" == "amdgcn" +# amdgcn uses the llvm assembler and linker +BuildRequires: lld +BuildRequires: llvm +Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} +Requires: lld +Requires: llvm +ExclusiveArch: x86_64 +%define amdgcn_newlib 1 +%endif %endif %if 0%{?gcc_icecream:1} ExclusiveArch: ppc64le ppc64 x86_64 s390x riscv64 @@ -256,9 +274,9 @@ %endif %prep -%if 0%{?nvptx_newlib:1} +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.1.0/newlib . +ln -s newlib-3.3.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -274,6 +292,8 @@ %endif %patch11 %patch15 +%patch16 +%patch17 -p1 %patch51 %patch60 %patch61 @@ -340,12 +360,22 @@ # In general we want to ship release checking enabled compilers # which is the default for released compilers #ENABLE_CHECKING="--enable-checking=yes" -#ENABLE_CHECKING="--enable-checking=release" -ENABLE_CHECKING="" +ENABLE_CHECKING="--enable-checking=release" +#ENABLE_CHECKING="" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 +%if "%{TARGET_ARCH}" == "amdgcn" +mkdir -p target-tools/bin +ln -s /usr/bin/llvm-ar target-tools/bin/amdgcn-amdhsa-ar +ln -s /usr/bin/llvm-mc target-tools/bin/amdgcn-amdhsa-as +ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/llvm-nm target-tools/bin/amdgcn-amdhsa-nm +ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" @@ -376,7 +406,10 @@ hsa,\ %endif %if %{build_nvptx} -nvptx-none=%{_prefix}/nvptx-none, \ +nvptx-none=%{_prefix}/nvptx-none,\ +%endif +%if %{build_gcn} +amdgcn-amdhsa=%{_prefix}/amdgcn-amdhsa,\ %endif %endif %if %{build_nvptx} @@ -461,6 +494,10 @@ --disable-sjlj-exceptions \ --enable-newlib-io-long-long \ %endif +%if "%{TARGET_ARCH}" == "amdgcn" + --enable-as-accelerator-for=%{GCCDIST} \ + --enable-libgomp \ +%endif %if "%{TARGET_ARCH}" == "avr" --enable-lto \ --without-gxx-include-dir \ @@ -601,7 +638,7 @@ %if 0%{?nvptx_newlib:1} %package -n cross-nvptx-newlib10-devel -Summary: newlib for the nvptx offload target +Summary: Newlib for the nvptx offload target Group: Development/Languages/C and C++ Provides: cross-nvptx-newlib-devel = %{version}-%{release} Conflicts: cross-nvptx-newlib-devel @@ -610,11 +647,27 @@ Newlib development files for the nvptx offload target compiler. %endif +%if 0%{?amdgcn_newlib:1} +%package -n cross-amdgcn-newlib10-devel +Summary: Newlib for the amdgcn offload target +Group: Development/Languages/C and C++ +Provides: cross-amdgcn-newlib-devel = %{version}-%{release} +Conflicts: cross-amdgcn-newlib-devel + +%description -n cross-amdgcn-newlib10-devel +Newlib development files for the amdgcn offload target compiler. +%endif + %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} +%if "%{TARGET_ARCH}" == "amdgcn" +# libtool needs to be able to call ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/install-tools @@ -667,6 +720,20 @@ ( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - ) rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif +# for amdgcn install the symlinks to the llvm tools +%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 /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 %{_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 +ln -s %{_prefix}/amdgcn-amdhsa/bin/nm $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-nm +ln -s %{_prefix}/amdgcn-amdhsa/bin/ranlib $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif %if 0%{?gcc_icecream:%gcc_icecream} # Build an icecream environment @@ -816,4 +883,15 @@ %{_prefix}/%{gcc_target_arch} %endif +%if 0%{?amdgcn_newlib:1} +%files -n cross-amdgcn-newlib10-devel +%defattr(-,root,root) +%{_prefix}/%{gcc_target_arch} +%{_prefix}/bin/amdgcn-amdhsa-ar +%{_prefix}/bin/amdgcn-amdhsa-as +%{_prefix}/bin/amdgcn-amdhsa-ld +%{_prefix}/bin/amdgcn-amdhsa-nm +%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif + %changelog ++++++ cross-amdgcn-gcc10.spec ++++++ ++++ 897 lines (skipped) ++++++ cross-arm-gcc10.spec ++++++ --- /var/tmp/diff_new_pack.azP7xx/_old 2020-05-12 22:27:13.999230944 +0200 +++ /var/tmp/diff_new_pack.azP7xx/_new 2020-05-12 22:27:14.003230952 +0200 @@ -49,6 +49,7 @@ %define build_go 0 %define build_hsa 0 %define build_nvptx 0 +%define build_gcn 0 %define build_d 0 %define enable_plugins 0 @@ -114,7 +115,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 10.0.1+git175037 +Version: 10.1.1+git40 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,7 +128,7 @@ Source2: gcc10-rpmlintrc Source3: gcc10-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.1.0.tar.xz +Source5: newlib-3.3.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff @@ -135,6 +136,8 @@ 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 # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -176,12 +179,17 @@ %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %if "%{cross_arch}" != "nvptx" +%if "%{cross_arch}" != "amdgcn" BuildRequires: cross-%{binutils_target}-binutils Requires: cross-%{binutils_target}-binutils %endif +%endif +BuildRequires: gcc-c++ +%if %{suse_version} > 1500 +BuildRequires: libzstd-devel +%endif BuildRequires: bison BuildRequires: flex -BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel @@ -214,6 +222,16 @@ ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif +%if "%{cross_arch}" == "amdgcn" +# amdgcn uses the llvm assembler and linker +BuildRequires: lld +BuildRequires: llvm +Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} +Requires: lld +Requires: llvm +ExclusiveArch: x86_64 +%define amdgcn_newlib 1 +%endif %endif %if 0%{?gcc_icecream:1} ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64 @@ -256,9 +274,9 @@ %endif %prep -%if 0%{?nvptx_newlib:1} +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.1.0/newlib . +ln -s newlib-3.3.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -274,6 +292,8 @@ %endif %patch11 %patch15 +%patch16 +%patch17 -p1 %patch51 %patch60 %patch61 @@ -340,12 +360,22 @@ # In general we want to ship release checking enabled compilers # which is the default for released compilers #ENABLE_CHECKING="--enable-checking=yes" -#ENABLE_CHECKING="--enable-checking=release" -ENABLE_CHECKING="" +ENABLE_CHECKING="--enable-checking=release" +#ENABLE_CHECKING="" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 +%if "%{TARGET_ARCH}" == "amdgcn" +mkdir -p target-tools/bin +ln -s /usr/bin/llvm-ar target-tools/bin/amdgcn-amdhsa-ar +ln -s /usr/bin/llvm-mc target-tools/bin/amdgcn-amdhsa-as +ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/llvm-nm target-tools/bin/amdgcn-amdhsa-nm +ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" @@ -376,7 +406,10 @@ hsa,\ %endif %if %{build_nvptx} -nvptx-none=%{_prefix}/nvptx-none, \ +nvptx-none=%{_prefix}/nvptx-none,\ +%endif +%if %{build_gcn} +amdgcn-amdhsa=%{_prefix}/amdgcn-amdhsa,\ %endif %endif %if %{build_nvptx} @@ -461,6 +494,10 @@ --disable-sjlj-exceptions \ --enable-newlib-io-long-long \ %endif +%if "%{TARGET_ARCH}" == "amdgcn" + --enable-as-accelerator-for=%{GCCDIST} \ + --enable-libgomp \ +%endif %if "%{TARGET_ARCH}" == "avr" --enable-lto \ --without-gxx-include-dir \ @@ -601,7 +638,7 @@ %if 0%{?nvptx_newlib:1} %package -n cross-nvptx-newlib10-devel -Summary: newlib for the nvptx offload target +Summary: Newlib for the nvptx offload target Group: Development/Languages/C and C++ Provides: cross-nvptx-newlib-devel = %{version}-%{release} Conflicts: cross-nvptx-newlib-devel @@ -610,11 +647,27 @@ Newlib development files for the nvptx offload target compiler. %endif +%if 0%{?amdgcn_newlib:1} +%package -n cross-amdgcn-newlib10-devel +Summary: Newlib for the amdgcn offload target +Group: Development/Languages/C and C++ +Provides: cross-amdgcn-newlib-devel = %{version}-%{release} +Conflicts: cross-amdgcn-newlib-devel + +%description -n cross-amdgcn-newlib10-devel +Newlib development files for the amdgcn offload target compiler. +%endif + %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} +%if "%{TARGET_ARCH}" == "amdgcn" +# libtool needs to be able to call ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/install-tools @@ -667,6 +720,20 @@ ( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - ) rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif +# for amdgcn install the symlinks to the llvm tools +%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 /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 %{_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 +ln -s %{_prefix}/amdgcn-amdhsa/bin/nm $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-nm +ln -s %{_prefix}/amdgcn-amdhsa/bin/ranlib $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif %if 0%{?gcc_icecream:%gcc_icecream} # Build an icecream environment @@ -816,4 +883,15 @@ %{_prefix}/%{gcc_target_arch} %endif +%if 0%{?amdgcn_newlib:1} +%files -n cross-amdgcn-newlib10-devel +%defattr(-,root,root) +%{_prefix}/%{gcc_target_arch} +%{_prefix}/bin/amdgcn-amdhsa-ar +%{_prefix}/bin/amdgcn-amdhsa-as +%{_prefix}/bin/amdgcn-amdhsa-ld +%{_prefix}/bin/amdgcn-amdhsa-nm +%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif + %changelog cross-arm-none-gcc10-bootstrap.spec: same change cross-arm-none-gcc10.spec: same change cross-avr-gcc10-bootstrap.spec: same change cross-avr-gcc10.spec: same change cross-epiphany-gcc10-bootstrap.spec: same change cross-epiphany-gcc10.spec: same change cross-hppa-gcc10.spec: same change cross-i386-gcc10.spec: same change cross-m68k-gcc10.spec: same change cross-mips-gcc10.spec: same change cross-nvptx-gcc10.spec: same change ++++++ cross-ppc64-gcc10.spec ++++++ --- /var/tmp/diff_new_pack.azP7xx/_old 2020-05-12 22:27:14.399231779 +0200 +++ /var/tmp/diff_new_pack.azP7xx/_new 2020-05-12 22:27:14.407231796 +0200 @@ -49,6 +49,7 @@ %define build_go 0 %define build_hsa 0 %define build_nvptx 0 +%define build_gcn 0 %define build_d 0 %define enable_plugins 0 @@ -114,7 +115,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 10.0.1+git175037 +Version: 10.1.1+git40 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,7 +128,7 @@ Source2: gcc10-rpmlintrc Source3: gcc10-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.1.0.tar.xz +Source5: newlib-3.3.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff @@ -135,6 +136,8 @@ 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 # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -176,12 +179,17 @@ %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %if "%{cross_arch}" != "nvptx" +%if "%{cross_arch}" != "amdgcn" BuildRequires: cross-%{binutils_target}-binutils Requires: cross-%{binutils_target}-binutils %endif +%endif +BuildRequires: gcc-c++ +%if %{suse_version} > 1500 +BuildRequires: libzstd-devel +%endif BuildRequires: bison BuildRequires: flex -BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel @@ -214,6 +222,16 @@ ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif +%if "%{cross_arch}" == "amdgcn" +# amdgcn uses the llvm assembler and linker +BuildRequires: lld +BuildRequires: llvm +Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} +Requires: lld +Requires: llvm +ExclusiveArch: x86_64 +%define amdgcn_newlib 1 +%endif %endif %if 0%{?gcc_icecream:1} ExclusiveArch: ppc64le x86_64 s390x aarch64 riscv64 @@ -256,9 +274,9 @@ %endif %prep -%if 0%{?nvptx_newlib:1} +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.1.0/newlib . +ln -s newlib-3.3.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -274,6 +292,8 @@ %endif %patch11 %patch15 +%patch16 +%patch17 -p1 %patch51 %patch60 %patch61 @@ -340,12 +360,22 @@ # In general we want to ship release checking enabled compilers # which is the default for released compilers #ENABLE_CHECKING="--enable-checking=yes" -#ENABLE_CHECKING="--enable-checking=release" -ENABLE_CHECKING="" +ENABLE_CHECKING="--enable-checking=release" +#ENABLE_CHECKING="" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 +%if "%{TARGET_ARCH}" == "amdgcn" +mkdir -p target-tools/bin +ln -s /usr/bin/llvm-ar target-tools/bin/amdgcn-amdhsa-ar +ln -s /usr/bin/llvm-mc target-tools/bin/amdgcn-amdhsa-as +ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/llvm-nm target-tools/bin/amdgcn-amdhsa-nm +ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" @@ -376,7 +406,10 @@ hsa,\ %endif %if %{build_nvptx} -nvptx-none=%{_prefix}/nvptx-none, \ +nvptx-none=%{_prefix}/nvptx-none,\ +%endif +%if %{build_gcn} +amdgcn-amdhsa=%{_prefix}/amdgcn-amdhsa,\ %endif %endif %if %{build_nvptx} @@ -461,6 +494,10 @@ --disable-sjlj-exceptions \ --enable-newlib-io-long-long \ %endif +%if "%{TARGET_ARCH}" == "amdgcn" + --enable-as-accelerator-for=%{GCCDIST} \ + --enable-libgomp \ +%endif %if "%{TARGET_ARCH}" == "avr" --enable-lto \ --without-gxx-include-dir \ @@ -601,7 +638,7 @@ %if 0%{?nvptx_newlib:1} %package -n cross-nvptx-newlib10-devel -Summary: newlib for the nvptx offload target +Summary: Newlib for the nvptx offload target Group: Development/Languages/C and C++ Provides: cross-nvptx-newlib-devel = %{version}-%{release} Conflicts: cross-nvptx-newlib-devel @@ -610,11 +647,27 @@ Newlib development files for the nvptx offload target compiler. %endif +%if 0%{?amdgcn_newlib:1} +%package -n cross-amdgcn-newlib10-devel +Summary: Newlib for the amdgcn offload target +Group: Development/Languages/C and C++ +Provides: cross-amdgcn-newlib-devel = %{version}-%{release} +Conflicts: cross-amdgcn-newlib-devel + +%description -n cross-amdgcn-newlib10-devel +Newlib development files for the amdgcn offload target compiler. +%endif + %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} +%if "%{TARGET_ARCH}" == "amdgcn" +# libtool needs to be able to call ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/install-tools @@ -667,6 +720,20 @@ ( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - ) rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif +# for amdgcn install the symlinks to the llvm tools +%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 /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 %{_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 +ln -s %{_prefix}/amdgcn-amdhsa/bin/nm $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-nm +ln -s %{_prefix}/amdgcn-amdhsa/bin/ranlib $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif %if 0%{?gcc_icecream:%gcc_icecream} # Build an icecream environment @@ -816,4 +883,15 @@ %{_prefix}/%{gcc_target_arch} %endif +%if 0%{?amdgcn_newlib:1} +%files -n cross-amdgcn-newlib10-devel +%defattr(-,root,root) +%{_prefix}/%{gcc_target_arch} +%{_prefix}/bin/amdgcn-amdhsa-ar +%{_prefix}/bin/amdgcn-amdhsa-as +%{_prefix}/bin/amdgcn-amdhsa-ld +%{_prefix}/bin/amdgcn-amdhsa-nm +%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif + %changelog ++++++ cross-ppc64le-gcc10.spec ++++++ --- /var/tmp/diff_new_pack.azP7xx/_old 2020-05-12 22:27:14.447231879 +0200 +++ /var/tmp/diff_new_pack.azP7xx/_new 2020-05-12 22:27:14.451231887 +0200 @@ -49,6 +49,7 @@ %define build_go 0 %define build_hsa 0 %define build_nvptx 0 +%define build_gcn 0 %define build_d 0 %define enable_plugins 0 @@ -114,7 +115,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 10.0.1+git175037 +Version: 10.1.1+git40 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,7 +128,7 @@ Source2: gcc10-rpmlintrc Source3: gcc10-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.1.0.tar.xz +Source5: newlib-3.3.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff @@ -135,6 +136,8 @@ 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 # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -176,12 +179,17 @@ %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %if "%{cross_arch}" != "nvptx" +%if "%{cross_arch}" != "amdgcn" BuildRequires: cross-%{binutils_target}-binutils Requires: cross-%{binutils_target}-binutils %endif +%endif +BuildRequires: gcc-c++ +%if %{suse_version} > 1500 +BuildRequires: libzstd-devel +%endif BuildRequires: bison BuildRequires: flex -BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel @@ -214,6 +222,16 @@ ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif +%if "%{cross_arch}" == "amdgcn" +# amdgcn uses the llvm assembler and linker +BuildRequires: lld +BuildRequires: llvm +Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} +Requires: lld +Requires: llvm +ExclusiveArch: x86_64 +%define amdgcn_newlib 1 +%endif %endif %if 0%{?gcc_icecream:1} ExclusiveArch: ppc64 x86_64 s390x aarch64 riscv64 @@ -256,9 +274,9 @@ %endif %prep -%if 0%{?nvptx_newlib:1} +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.1.0/newlib . +ln -s newlib-3.3.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -274,6 +292,8 @@ %endif %patch11 %patch15 +%patch16 +%patch17 -p1 %patch51 %patch60 %patch61 @@ -340,12 +360,22 @@ # In general we want to ship release checking enabled compilers # which is the default for released compilers #ENABLE_CHECKING="--enable-checking=yes" -#ENABLE_CHECKING="--enable-checking=release" -ENABLE_CHECKING="" +ENABLE_CHECKING="--enable-checking=release" +#ENABLE_CHECKING="" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 +%if "%{TARGET_ARCH}" == "amdgcn" +mkdir -p target-tools/bin +ln -s /usr/bin/llvm-ar target-tools/bin/amdgcn-amdhsa-ar +ln -s /usr/bin/llvm-mc target-tools/bin/amdgcn-amdhsa-as +ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/llvm-nm target-tools/bin/amdgcn-amdhsa-nm +ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" @@ -376,7 +406,10 @@ hsa,\ %endif %if %{build_nvptx} -nvptx-none=%{_prefix}/nvptx-none, \ +nvptx-none=%{_prefix}/nvptx-none,\ +%endif +%if %{build_gcn} +amdgcn-amdhsa=%{_prefix}/amdgcn-amdhsa,\ %endif %endif %if %{build_nvptx} @@ -461,6 +494,10 @@ --disable-sjlj-exceptions \ --enable-newlib-io-long-long \ %endif +%if "%{TARGET_ARCH}" == "amdgcn" + --enable-as-accelerator-for=%{GCCDIST} \ + --enable-libgomp \ +%endif %if "%{TARGET_ARCH}" == "avr" --enable-lto \ --without-gxx-include-dir \ @@ -601,7 +638,7 @@ %if 0%{?nvptx_newlib:1} %package -n cross-nvptx-newlib10-devel -Summary: newlib for the nvptx offload target +Summary: Newlib for the nvptx offload target Group: Development/Languages/C and C++ Provides: cross-nvptx-newlib-devel = %{version}-%{release} Conflicts: cross-nvptx-newlib-devel @@ -610,11 +647,27 @@ Newlib development files for the nvptx offload target compiler. %endif +%if 0%{?amdgcn_newlib:1} +%package -n cross-amdgcn-newlib10-devel +Summary: Newlib for the amdgcn offload target +Group: Development/Languages/C and C++ +Provides: cross-amdgcn-newlib-devel = %{version}-%{release} +Conflicts: cross-amdgcn-newlib-devel + +%description -n cross-amdgcn-newlib10-devel +Newlib development files for the amdgcn offload target compiler. +%endif + %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} +%if "%{TARGET_ARCH}" == "amdgcn" +# libtool needs to be able to call ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/install-tools @@ -667,6 +720,20 @@ ( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - ) rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif +# for amdgcn install the symlinks to the llvm tools +%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 /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 %{_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 +ln -s %{_prefix}/amdgcn-amdhsa/bin/nm $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-nm +ln -s %{_prefix}/amdgcn-amdhsa/bin/ranlib $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif %if 0%{?gcc_icecream:%gcc_icecream} # Build an icecream environment @@ -816,4 +883,15 @@ %{_prefix}/%{gcc_target_arch} %endif +%if 0%{?amdgcn_newlib:1} +%files -n cross-amdgcn-newlib10-devel +%defattr(-,root,root) +%{_prefix}/%{gcc_target_arch} +%{_prefix}/bin/amdgcn-amdhsa-ar +%{_prefix}/bin/amdgcn-amdhsa-as +%{_prefix}/bin/amdgcn-amdhsa-ld +%{_prefix}/bin/amdgcn-amdhsa-nm +%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif + %changelog ++++++ cross-riscv64-elf-gcc10-bootstrap.spec ++++++ --- /var/tmp/diff_new_pack.azP7xx/_old 2020-05-12 22:27:14.479231946 +0200 +++ /var/tmp/diff_new_pack.azP7xx/_new 2020-05-12 22:27:14.483231954 +0200 @@ -50,6 +50,7 @@ %define build_go 0 %define build_hsa 0 %define build_nvptx 0 +%define build_gcn 0 %define build_d 0 %define enable_plugins 0 @@ -115,7 +116,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 10.0.1+git175037 +Version: 10.1.1+git40 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,7 +129,7 @@ Source2: gcc10-rpmlintrc Source3: gcc10-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.1.0.tar.xz +Source5: newlib-3.3.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff @@ -136,6 +137,8 @@ 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 # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -177,12 +180,17 @@ %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %if "%{cross_arch}" != "nvptx" +%if "%{cross_arch}" != "amdgcn" BuildRequires: cross-%{binutils_target}-binutils Requires: cross-%{binutils_target}-binutils %endif +%endif +BuildRequires: gcc-c++ +%if %{suse_version} > 1500 +BuildRequires: libzstd-devel +%endif BuildRequires: bison BuildRequires: flex -BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel @@ -215,6 +223,16 @@ ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif +%if "%{cross_arch}" == "amdgcn" +# amdgcn uses the llvm assembler and linker +BuildRequires: lld +BuildRequires: llvm +Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} +Requires: lld +Requires: llvm +ExclusiveArch: x86_64 +%define amdgcn_newlib 1 +%endif %endif %if 0%{?gcc_icecream:1} ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 @@ -257,9 +275,9 @@ %endif %prep -%if 0%{?nvptx_newlib:1} +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.1.0/newlib . +ln -s newlib-3.3.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -275,6 +293,8 @@ %endif %patch11 %patch15 +%patch16 +%patch17 -p1 %patch51 %patch60 %patch61 @@ -341,12 +361,22 @@ # In general we want to ship release checking enabled compilers # which is the default for released compilers #ENABLE_CHECKING="--enable-checking=yes" -#ENABLE_CHECKING="--enable-checking=release" -ENABLE_CHECKING="" +ENABLE_CHECKING="--enable-checking=release" +#ENABLE_CHECKING="" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 +%if "%{TARGET_ARCH}" == "amdgcn" +mkdir -p target-tools/bin +ln -s /usr/bin/llvm-ar target-tools/bin/amdgcn-amdhsa-ar +ln -s /usr/bin/llvm-mc target-tools/bin/amdgcn-amdhsa-as +ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/llvm-nm target-tools/bin/amdgcn-amdhsa-nm +ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" @@ -377,7 +407,10 @@ hsa,\ %endif %if %{build_nvptx} -nvptx-none=%{_prefix}/nvptx-none, \ +nvptx-none=%{_prefix}/nvptx-none,\ +%endif +%if %{build_gcn} +amdgcn-amdhsa=%{_prefix}/amdgcn-amdhsa,\ %endif %endif %if %{build_nvptx} @@ -462,6 +495,10 @@ --disable-sjlj-exceptions \ --enable-newlib-io-long-long \ %endif +%if "%{TARGET_ARCH}" == "amdgcn" + --enable-as-accelerator-for=%{GCCDIST} \ + --enable-libgomp \ +%endif %if "%{TARGET_ARCH}" == "avr" --enable-lto \ --without-gxx-include-dir \ @@ -602,7 +639,7 @@ %if 0%{?nvptx_newlib:1} %package -n cross-nvptx-newlib10-devel -Summary: newlib for the nvptx offload target +Summary: Newlib for the nvptx offload target Group: Development/Languages/C and C++ Provides: cross-nvptx-newlib-devel = %{version}-%{release} Conflicts: cross-nvptx-newlib-devel @@ -611,11 +648,27 @@ Newlib development files for the nvptx offload target compiler. %endif +%if 0%{?amdgcn_newlib:1} +%package -n cross-amdgcn-newlib10-devel +Summary: Newlib for the amdgcn offload target +Group: Development/Languages/C and C++ +Provides: cross-amdgcn-newlib-devel = %{version}-%{release} +Conflicts: cross-amdgcn-newlib-devel + +%description -n cross-amdgcn-newlib10-devel +Newlib development files for the amdgcn offload target compiler. +%endif + %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} +%if "%{TARGET_ARCH}" == "amdgcn" +# libtool needs to be able to call ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/install-tools @@ -668,6 +721,20 @@ ( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - ) rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif +# for amdgcn install the symlinks to the llvm tools +%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 /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 %{_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 +ln -s %{_prefix}/amdgcn-amdhsa/bin/nm $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-nm +ln -s %{_prefix}/amdgcn-amdhsa/bin/ranlib $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif %if 0%{?gcc_icecream:%gcc_icecream} # Build an icecream environment @@ -817,4 +884,15 @@ %{_prefix}/%{gcc_target_arch} %endif +%if 0%{?amdgcn_newlib:1} +%files -n cross-amdgcn-newlib10-devel +%defattr(-,root,root) +%{_prefix}/%{gcc_target_arch} +%{_prefix}/bin/amdgcn-amdhsa-ar +%{_prefix}/bin/amdgcn-amdhsa-as +%{_prefix}/bin/amdgcn-amdhsa-ld +%{_prefix}/bin/amdgcn-amdhsa-nm +%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif + %changelog cross-riscv64-elf-gcc10.spec: same change cross-riscv64-gcc10.spec: same change ++++++ cross-rx-gcc10-bootstrap.spec ++++++ --- /var/tmp/diff_new_pack.azP7xx/_old 2020-05-12 22:27:14.575232146 +0200 +++ /var/tmp/diff_new_pack.azP7xx/_new 2020-05-12 22:27:14.579232155 +0200 @@ -50,6 +50,7 @@ %define build_go 0 %define build_hsa 0 %define build_nvptx 0 +%define build_gcn 0 %define build_d 0 %define enable_plugins 0 @@ -115,7 +116,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 10.0.1+git175037 +Version: 10.1.1+git40 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,7 +129,7 @@ Source2: gcc10-rpmlintrc Source3: gcc10-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.1.0.tar.xz +Source5: newlib-3.3.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff @@ -136,6 +137,8 @@ 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 # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -177,12 +180,17 @@ %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %if "%{cross_arch}" != "nvptx" +%if "%{cross_arch}" != "amdgcn" BuildRequires: cross-%{binutils_target}-binutils Requires: cross-%{binutils_target}-binutils %endif +%endif +BuildRequires: gcc-c++ +%if %{suse_version} > 1500 +BuildRequires: libzstd-devel +%endif BuildRequires: bison BuildRequires: flex -BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel @@ -215,6 +223,16 @@ ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif +%if "%{cross_arch}" == "amdgcn" +# amdgcn uses the llvm assembler and linker +BuildRequires: lld +BuildRequires: llvm +Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} +Requires: lld +Requires: llvm +ExclusiveArch: x86_64 +%define amdgcn_newlib 1 +%endif %endif %if 0%{?gcc_icecream:1} ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64 @@ -257,9 +275,9 @@ %endif %prep -%if 0%{?nvptx_newlib:1} +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.1.0/newlib . +ln -s newlib-3.3.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -275,6 +293,8 @@ %endif %patch11 %patch15 +%patch16 +%patch17 -p1 %patch51 %patch60 %patch61 @@ -341,12 +361,22 @@ # In general we want to ship release checking enabled compilers # which is the default for released compilers #ENABLE_CHECKING="--enable-checking=yes" -#ENABLE_CHECKING="--enable-checking=release" -ENABLE_CHECKING="" +ENABLE_CHECKING="--enable-checking=release" +#ENABLE_CHECKING="" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 +%if "%{TARGET_ARCH}" == "amdgcn" +mkdir -p target-tools/bin +ln -s /usr/bin/llvm-ar target-tools/bin/amdgcn-amdhsa-ar +ln -s /usr/bin/llvm-mc target-tools/bin/amdgcn-amdhsa-as +ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/llvm-nm target-tools/bin/amdgcn-amdhsa-nm +ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" @@ -377,7 +407,10 @@ hsa,\ %endif %if %{build_nvptx} -nvptx-none=%{_prefix}/nvptx-none, \ +nvptx-none=%{_prefix}/nvptx-none,\ +%endif +%if %{build_gcn} +amdgcn-amdhsa=%{_prefix}/amdgcn-amdhsa,\ %endif %endif %if %{build_nvptx} @@ -462,6 +495,10 @@ --disable-sjlj-exceptions \ --enable-newlib-io-long-long \ %endif +%if "%{TARGET_ARCH}" == "amdgcn" + --enable-as-accelerator-for=%{GCCDIST} \ + --enable-libgomp \ +%endif %if "%{TARGET_ARCH}" == "avr" --enable-lto \ --without-gxx-include-dir \ @@ -602,7 +639,7 @@ %if 0%{?nvptx_newlib:1} %package -n cross-nvptx-newlib10-devel -Summary: newlib for the nvptx offload target +Summary: Newlib for the nvptx offload target Group: Development/Languages/C and C++ Provides: cross-nvptx-newlib-devel = %{version}-%{release} Conflicts: cross-nvptx-newlib-devel @@ -611,11 +648,27 @@ Newlib development files for the nvptx offload target compiler. %endif +%if 0%{?amdgcn_newlib:1} +%package -n cross-amdgcn-newlib10-devel +Summary: Newlib for the amdgcn offload target +Group: Development/Languages/C and C++ +Provides: cross-amdgcn-newlib-devel = %{version}-%{release} +Conflicts: cross-amdgcn-newlib-devel + +%description -n cross-amdgcn-newlib10-devel +Newlib development files for the amdgcn offload target compiler. +%endif + %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} +%if "%{TARGET_ARCH}" == "amdgcn" +# libtool needs to be able to call ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/install-tools @@ -668,6 +721,20 @@ ( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - ) rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif +# for amdgcn install the symlinks to the llvm tools +%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 /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 %{_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 +ln -s %{_prefix}/amdgcn-amdhsa/bin/nm $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-nm +ln -s %{_prefix}/amdgcn-amdhsa/bin/ranlib $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif %if 0%{?gcc_icecream:%gcc_icecream} # Build an icecream environment @@ -817,4 +884,15 @@ %{_prefix}/%{gcc_target_arch} %endif +%if 0%{?amdgcn_newlib:1} +%files -n cross-amdgcn-newlib10-devel +%defattr(-,root,root) +%{_prefix}/%{gcc_target_arch} +%{_prefix}/bin/amdgcn-amdhsa-ar +%{_prefix}/bin/amdgcn-amdhsa-as +%{_prefix}/bin/amdgcn-amdhsa-ld +%{_prefix}/bin/amdgcn-amdhsa-nm +%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif + %changelog cross-rx-gcc10.spec: same change ++++++ cross-s390x-gcc10.spec ++++++ --- /var/tmp/diff_new_pack.azP7xx/_old 2020-05-12 22:27:14.631232263 +0200 +++ /var/tmp/diff_new_pack.azP7xx/_new 2020-05-12 22:27:14.639232279 +0200 @@ -49,6 +49,7 @@ %define build_go 0 %define build_hsa 0 %define build_nvptx 0 +%define build_gcn 0 %define build_d 0 %define enable_plugins 0 @@ -114,7 +115,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 10.0.1+git175037 +Version: 10.1.1+git40 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,7 +128,7 @@ Source2: gcc10-rpmlintrc Source3: gcc10-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.1.0.tar.xz +Source5: newlib-3.3.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff @@ -135,6 +136,8 @@ 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 # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -176,12 +179,17 @@ %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %if "%{cross_arch}" != "nvptx" +%if "%{cross_arch}" != "amdgcn" BuildRequires: cross-%{binutils_target}-binutils Requires: cross-%{binutils_target}-binutils %endif +%endif +BuildRequires: gcc-c++ +%if %{suse_version} > 1500 +BuildRequires: libzstd-devel +%endif BuildRequires: bison BuildRequires: flex -BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel @@ -214,6 +222,16 @@ ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif +%if "%{cross_arch}" == "amdgcn" +# amdgcn uses the llvm assembler and linker +BuildRequires: lld +BuildRequires: llvm +Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} +Requires: lld +Requires: llvm +ExclusiveArch: x86_64 +%define amdgcn_newlib 1 +%endif %endif %if 0%{?gcc_icecream:1} ExclusiveArch: ppc64le ppc64 x86_64 aarch64 riscv64 @@ -256,9 +274,9 @@ %endif %prep -%if 0%{?nvptx_newlib:1} +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.1.0/newlib . +ln -s newlib-3.3.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -274,6 +292,8 @@ %endif %patch11 %patch15 +%patch16 +%patch17 -p1 %patch51 %patch60 %patch61 @@ -340,12 +360,22 @@ # In general we want to ship release checking enabled compilers # which is the default for released compilers #ENABLE_CHECKING="--enable-checking=yes" -#ENABLE_CHECKING="--enable-checking=release" -ENABLE_CHECKING="" +ENABLE_CHECKING="--enable-checking=release" +#ENABLE_CHECKING="" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 +%if "%{TARGET_ARCH}" == "amdgcn" +mkdir -p target-tools/bin +ln -s /usr/bin/llvm-ar target-tools/bin/amdgcn-amdhsa-ar +ln -s /usr/bin/llvm-mc target-tools/bin/amdgcn-amdhsa-as +ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/llvm-nm target-tools/bin/amdgcn-amdhsa-nm +ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" @@ -376,7 +406,10 @@ hsa,\ %endif %if %{build_nvptx} -nvptx-none=%{_prefix}/nvptx-none, \ +nvptx-none=%{_prefix}/nvptx-none,\ +%endif +%if %{build_gcn} +amdgcn-amdhsa=%{_prefix}/amdgcn-amdhsa,\ %endif %endif %if %{build_nvptx} @@ -461,6 +494,10 @@ --disable-sjlj-exceptions \ --enable-newlib-io-long-long \ %endif +%if "%{TARGET_ARCH}" == "amdgcn" + --enable-as-accelerator-for=%{GCCDIST} \ + --enable-libgomp \ +%endif %if "%{TARGET_ARCH}" == "avr" --enable-lto \ --without-gxx-include-dir \ @@ -601,7 +638,7 @@ %if 0%{?nvptx_newlib:1} %package -n cross-nvptx-newlib10-devel -Summary: newlib for the nvptx offload target +Summary: Newlib for the nvptx offload target Group: Development/Languages/C and C++ Provides: cross-nvptx-newlib-devel = %{version}-%{release} Conflicts: cross-nvptx-newlib-devel @@ -610,11 +647,27 @@ Newlib development files for the nvptx offload target compiler. %endif +%if 0%{?amdgcn_newlib:1} +%package -n cross-amdgcn-newlib10-devel +Summary: Newlib for the amdgcn offload target +Group: Development/Languages/C and C++ +Provides: cross-amdgcn-newlib-devel = %{version}-%{release} +Conflicts: cross-amdgcn-newlib-devel + +%description -n cross-amdgcn-newlib10-devel +Newlib development files for the amdgcn offload target compiler. +%endif + %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} +%if "%{TARGET_ARCH}" == "amdgcn" +# libtool needs to be able to call ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/install-tools @@ -667,6 +720,20 @@ ( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - ) rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif +# for amdgcn install the symlinks to the llvm tools +%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 /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 %{_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 +ln -s %{_prefix}/amdgcn-amdhsa/bin/nm $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-nm +ln -s %{_prefix}/amdgcn-amdhsa/bin/ranlib $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif %if 0%{?gcc_icecream:%gcc_icecream} # Build an icecream environment @@ -816,4 +883,15 @@ %{_prefix}/%{gcc_target_arch} %endif +%if 0%{?amdgcn_newlib:1} +%files -n cross-amdgcn-newlib10-devel +%defattr(-,root,root) +%{_prefix}/%{gcc_target_arch} +%{_prefix}/bin/amdgcn-amdhsa-ar +%{_prefix}/bin/amdgcn-amdhsa-as +%{_prefix}/bin/amdgcn-amdhsa-ld +%{_prefix}/bin/amdgcn-amdhsa-nm +%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif + %changelog ++++++ cross-sparc-gcc10.spec ++++++ --- /var/tmp/diff_new_pack.azP7xx/_old 2020-05-12 22:27:14.671232346 +0200 +++ /var/tmp/diff_new_pack.azP7xx/_new 2020-05-12 22:27:14.671232346 +0200 @@ -49,6 +49,7 @@ %define build_go 0 %define build_hsa 0 %define build_nvptx 0 +%define build_gcn 0 %define build_d 0 %define enable_plugins 0 @@ -114,7 +115,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 10.0.1+git175037 +Version: 10.1.1+git40 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,7 +128,7 @@ Source2: gcc10-rpmlintrc Source3: gcc10-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.1.0.tar.xz +Source5: newlib-3.3.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff @@ -135,6 +136,8 @@ 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 # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -176,12 +179,17 @@ %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %if "%{cross_arch}" != "nvptx" +%if "%{cross_arch}" != "amdgcn" BuildRequires: cross-%{binutils_target}-binutils Requires: cross-%{binutils_target}-binutils %endif +%endif +BuildRequires: gcc-c++ +%if %{suse_version} > 1500 +BuildRequires: libzstd-devel +%endif BuildRequires: bison BuildRequires: flex -BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel @@ -214,6 +222,16 @@ ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif +%if "%{cross_arch}" == "amdgcn" +# amdgcn uses the llvm assembler and linker +BuildRequires: lld +BuildRequires: llvm +Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} +Requires: lld +Requires: llvm +ExclusiveArch: x86_64 +%define amdgcn_newlib 1 +%endif %endif %if 0%{?gcc_icecream:1} ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64 @@ -256,9 +274,9 @@ %endif %prep -%if 0%{?nvptx_newlib:1} +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.1.0/newlib . +ln -s newlib-3.3.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -274,6 +292,8 @@ %endif %patch11 %patch15 +%patch16 +%patch17 -p1 %patch51 %patch60 %patch61 @@ -340,12 +360,22 @@ # In general we want to ship release checking enabled compilers # which is the default for released compilers #ENABLE_CHECKING="--enable-checking=yes" -#ENABLE_CHECKING="--enable-checking=release" -ENABLE_CHECKING="" +ENABLE_CHECKING="--enable-checking=release" +#ENABLE_CHECKING="" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 +%if "%{TARGET_ARCH}" == "amdgcn" +mkdir -p target-tools/bin +ln -s /usr/bin/llvm-ar target-tools/bin/amdgcn-amdhsa-ar +ln -s /usr/bin/llvm-mc target-tools/bin/amdgcn-amdhsa-as +ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/llvm-nm target-tools/bin/amdgcn-amdhsa-nm +ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" @@ -376,7 +406,10 @@ hsa,\ %endif %if %{build_nvptx} -nvptx-none=%{_prefix}/nvptx-none, \ +nvptx-none=%{_prefix}/nvptx-none,\ +%endif +%if %{build_gcn} +amdgcn-amdhsa=%{_prefix}/amdgcn-amdhsa,\ %endif %endif %if %{build_nvptx} @@ -461,6 +494,10 @@ --disable-sjlj-exceptions \ --enable-newlib-io-long-long \ %endif +%if "%{TARGET_ARCH}" == "amdgcn" + --enable-as-accelerator-for=%{GCCDIST} \ + --enable-libgomp \ +%endif %if "%{TARGET_ARCH}" == "avr" --enable-lto \ --without-gxx-include-dir \ @@ -601,7 +638,7 @@ %if 0%{?nvptx_newlib:1} %package -n cross-nvptx-newlib10-devel -Summary: newlib for the nvptx offload target +Summary: Newlib for the nvptx offload target Group: Development/Languages/C and C++ Provides: cross-nvptx-newlib-devel = %{version}-%{release} Conflicts: cross-nvptx-newlib-devel @@ -610,11 +647,27 @@ Newlib development files for the nvptx offload target compiler. %endif +%if 0%{?amdgcn_newlib:1} +%package -n cross-amdgcn-newlib10-devel +Summary: Newlib for the amdgcn offload target +Group: Development/Languages/C and C++ +Provides: cross-amdgcn-newlib-devel = %{version}-%{release} +Conflicts: cross-amdgcn-newlib-devel + +%description -n cross-amdgcn-newlib10-devel +Newlib development files for the amdgcn offload target compiler. +%endif + %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} +%if "%{TARGET_ARCH}" == "amdgcn" +# libtool needs to be able to call ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/install-tools @@ -667,6 +720,20 @@ ( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - ) rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif +# for amdgcn install the symlinks to the llvm tools +%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 /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 %{_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 +ln -s %{_prefix}/amdgcn-amdhsa/bin/nm $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-nm +ln -s %{_prefix}/amdgcn-amdhsa/bin/ranlib $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif %if 0%{?gcc_icecream:%gcc_icecream} # Build an icecream environment @@ -816,4 +883,15 @@ %{_prefix}/%{gcc_target_arch} %endif +%if 0%{?amdgcn_newlib:1} +%files -n cross-amdgcn-newlib10-devel +%defattr(-,root,root) +%{_prefix}/%{gcc_target_arch} +%{_prefix}/bin/amdgcn-amdhsa-ar +%{_prefix}/bin/amdgcn-amdhsa-as +%{_prefix}/bin/amdgcn-amdhsa-ld +%{_prefix}/bin/amdgcn-amdhsa-nm +%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif + %changelog cross-sparc64-gcc10.spec: same change ++++++ cross-x86_64-gcc10.spec ++++++ --- /var/tmp/diff_new_pack.azP7xx/_old 2020-05-12 22:27:14.719232446 +0200 +++ /var/tmp/diff_new_pack.azP7xx/_new 2020-05-12 22:27:14.723232455 +0200 @@ -49,6 +49,7 @@ %define build_go 0 %define build_hsa 0 %define build_nvptx 0 +%define build_gcn 0 %define build_d 0 %define enable_plugins 0 @@ -114,7 +115,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 10.0.1+git175037 +Version: 10.1.1+git40 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,7 +128,7 @@ Source2: gcc10-rpmlintrc Source3: gcc10-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.1.0.tar.xz +Source5: newlib-3.3.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff @@ -135,6 +136,8 @@ 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 # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -176,12 +179,17 @@ %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} %if "%{cross_arch}" != "nvptx" +%if "%{cross_arch}" != "amdgcn" BuildRequires: cross-%{binutils_target}-binutils Requires: cross-%{binutils_target}-binutils %endif +%endif +BuildRequires: gcc-c++ +%if %{suse_version} > 1500 +BuildRequires: libzstd-devel +%endif BuildRequires: bison BuildRequires: flex -BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: glibc-devel-32bit BuildRequires: mpc-devel @@ -214,6 +222,16 @@ ExclusiveArch: %define nvptx_newlib 1 %endif +%if "%{cross_arch}" == "amdgcn" +# amdgcn uses the llvm assembler and linker +BuildRequires: lld +BuildRequires: llvm +Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} +Requires: lld +Requires: llvm +ExclusiveArch: +%define amdgcn_newlib 1 +%endif %endif %if 0%{?gcc_icecream:1} ExclusiveArch: ppc64le ppc64 s390x aarch64 riscv64 @@ -256,9 +274,9 @@ %endif %prep -%if 0%{?nvptx_newlib:1} +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.1.0/newlib . +ln -s newlib-3.3.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -274,6 +292,8 @@ %endif %patch11 %patch15 +%patch16 +%patch17 -p1 %patch51 %patch60 %patch61 @@ -340,12 +360,22 @@ # In general we want to ship release checking enabled compilers # which is the default for released compilers #ENABLE_CHECKING="--enable-checking=yes" -#ENABLE_CHECKING="--enable-checking=release" -ENABLE_CHECKING="" +ENABLE_CHECKING="--enable-checking=release" +#ENABLE_CHECKING="" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 +%if "%{TARGET_ARCH}" == "amdgcn" +mkdir -p target-tools/bin +ln -s /usr/bin/llvm-ar target-tools/bin/amdgcn-amdhsa-ar +ln -s /usr/bin/llvm-mc target-tools/bin/amdgcn-amdhsa-as +ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/llvm-nm target-tools/bin/amdgcn-amdhsa-nm +ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" @@ -376,7 +406,10 @@ hsa,\ %endif %if %{build_nvptx} -nvptx-none=%{_prefix}/nvptx-none, \ +nvptx-none=%{_prefix}/nvptx-none,\ +%endif +%if %{build_gcn} +amdgcn-amdhsa=%{_prefix}/amdgcn-amdhsa,\ %endif %endif %if %{build_nvptx} @@ -461,6 +494,10 @@ --disable-sjlj-exceptions \ --enable-newlib-io-long-long \ %endif +%if "%{TARGET_ARCH}" == "amdgcn" + --enable-as-accelerator-for=%{GCCDIST} \ + --enable-libgomp \ +%endif %if "%{TARGET_ARCH}" == "avr" --enable-lto \ --without-gxx-include-dir \ @@ -601,7 +638,7 @@ %if 0%{?nvptx_newlib:1} %package -n cross-nvptx-newlib10-devel -Summary: newlib for the nvptx offload target +Summary: Newlib for the nvptx offload target Group: Development/Languages/C and C++ Provides: cross-nvptx-newlib-devel = %{version}-%{release} Conflicts: cross-nvptx-newlib-devel @@ -610,11 +647,27 @@ Newlib development files for the nvptx offload target compiler. %endif +%if 0%{?amdgcn_newlib:1} +%package -n cross-amdgcn-newlib10-devel +Summary: Newlib for the amdgcn offload target +Group: Development/Languages/C and C++ +Provides: cross-amdgcn-newlib-devel = %{version}-%{release} +Conflicts: cross-amdgcn-newlib-devel + +%description -n cross-amdgcn-newlib10-devel +Newlib development files for the amdgcn offload target compiler. +%endif + %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} +%if "%{TARGET_ARCH}" == "amdgcn" +# libtool needs to be able to call ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/install-tools @@ -667,6 +720,20 @@ ( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - ) rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif +# for amdgcn install the symlinks to the llvm tools +%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 /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 %{_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 +ln -s %{_prefix}/amdgcn-amdhsa/bin/nm $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-nm +ln -s %{_prefix}/amdgcn-amdhsa/bin/ranlib $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif %if 0%{?gcc_icecream:%gcc_icecream} # Build an icecream environment @@ -816,4 +883,15 @@ %{_prefix}/%{gcc_target_arch} %endif +%if 0%{?amdgcn_newlib:1} +%files -n cross-amdgcn-newlib10-devel +%defattr(-,root,root) +%{_prefix}/%{gcc_target_arch} +%{_prefix}/bin/amdgcn-amdhsa-ar +%{_prefix}/bin/amdgcn-amdhsa-as +%{_prefix}/bin/amdgcn-amdhsa-ld +%{_prefix}/bin/amdgcn-amdhsa-nm +%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif + %changelog ++++++ gcc10-testresults.spec ++++++ --- /var/tmp/diff_new_pack.azP7xx/_old 2020-05-12 22:27:14.767232546 +0200 +++ /var/tmp/diff_new_pack.azP7xx/_new 2020-05-12 22:27:14.775232563 +0200 @@ -91,9 +91,11 @@ %ifarch x86_64 %define build_hsa 1 %define build_nvptx 1 +%define build_gcn 1 %else %define build_hsa 0 %define build_nvptx 0 +%define build_gcn 0 %endif %define use_lto_bootstrap 0 @@ -133,8 +135,8 @@ %define liblsan_sover 0 %define libvtv_sover 0 %define libgo_sover 16 -%define libgphobos_sover 76 -%define libgdruntime_sover 76 +%define libgphobos_sover 1 +%define libgdruntime_sover 1 # Shared library package suffix # This is used for the "non-standard" set of libraries, the standard @@ -267,7 +269,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 10.0.1+git175037 +Version: 10.1.1+git40 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/+/-/') @@ -315,7 +317,7 @@ Source2: gcc10-rpmlintrc Source3: gcc10-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.1.0.tar.xz +Source5: newlib-3.3.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff @@ -323,6 +325,8 @@ 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 # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -430,9 +434,9 @@ %endif %prep -%if 0%{?nvptx_newlib:1} +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.1.0/newlib . +ln -s newlib-3.3.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -448,6 +452,8 @@ %endif %patch11 %patch15 +%patch16 +%patch17 -p1 %patch51 %patch60 %patch61 @@ -514,12 +520,22 @@ # In general we want to ship release checking enabled compilers # which is the default for released compilers #ENABLE_CHECKING="--enable-checking=yes" -#ENABLE_CHECKING="--enable-checking=release" -ENABLE_CHECKING="" +ENABLE_CHECKING="--enable-checking=release" +#ENABLE_CHECKING="" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 +%if "%{TARGET_ARCH}" == "amdgcn" +mkdir -p target-tools/bin +ln -s /usr/bin/llvm-ar target-tools/bin/amdgcn-amdhsa-ar +ln -s /usr/bin/llvm-mc target-tools/bin/amdgcn-amdhsa-as +ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/llvm-nm target-tools/bin/amdgcn-amdhsa-nm +ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" @@ -550,7 +566,10 @@ hsa,\ %endif %if %{build_nvptx} -nvptx-none=%{_prefix}/nvptx-none, \ +nvptx-none=%{_prefix}/nvptx-none,\ +%endif +%if %{build_gcn} +amdgcn-amdhsa=%{_prefix}/amdgcn-amdhsa,\ %endif %endif %if %{build_nvptx} @@ -635,6 +654,10 @@ --disable-sjlj-exceptions \ --enable-newlib-io-long-long \ %endif +%if "%{TARGET_ARCH}" == "amdgcn" + --enable-as-accelerator-for=%{GCCDIST} \ + --enable-libgomp \ +%endif %if "%{TARGET_ARCH}" == "avr" --enable-lto \ --without-gxx-include-dir \ ++++++ gcc10.spec ++++++ --- /var/tmp/diff_new_pack.azP7xx/_old 2020-05-12 22:27:14.811232639 +0200 +++ /var/tmp/diff_new_pack.azP7xx/_new 2020-05-12 22:27:14.815232646 +0200 @@ -73,9 +73,11 @@ %ifarch x86_64 %define build_hsa 1 %define build_nvptx 1 +%define build_gcn 1 %else %define build_hsa 0 %define build_nvptx 0 +%define build_gcn 0 %endif %define use_lto_bootstrap 0 @@ -115,8 +117,8 @@ %define liblsan_sover 0 %define libvtv_sover 0 %define libgo_sover 16 -%define libgphobos_sover 76 -%define libgdruntime_sover 76 +%define libgphobos_sover 1 +%define libgdruntime_sover 1 # Shared library package suffix # This is used for the "non-standard" set of libraries, the standard @@ -249,7 +251,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 10.0.1+git175037 +Version: 10.1.1+git40 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/+/-/') @@ -297,7 +299,7 @@ Source2: gcc10-rpmlintrc Source3: gcc10-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.1.0.tar.xz +Source5: newlib-3.3.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff @@ -305,6 +307,8 @@ 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 # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -1769,9 +1773,9 @@ %endif %prep -%if 0%{?nvptx_newlib:1} +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.1.0/newlib . +ln -s newlib-3.3.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -1787,6 +1791,8 @@ %endif %patch11 %patch15 +%patch16 +%patch17 -p1 %patch51 %patch60 %patch61 @@ -1853,12 +1859,22 @@ # In general we want to ship release checking enabled compilers # which is the default for released compilers #ENABLE_CHECKING="--enable-checking=yes" -#ENABLE_CHECKING="--enable-checking=release" -ENABLE_CHECKING="" +ENABLE_CHECKING="--enable-checking=release" +#ENABLE_CHECKING="" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 +%if "%{TARGET_ARCH}" == "amdgcn" +mkdir -p target-tools/bin +ln -s /usr/bin/llvm-ar target-tools/bin/amdgcn-amdhsa-ar +ln -s /usr/bin/llvm-mc target-tools/bin/amdgcn-amdhsa-as +ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/llvm-nm target-tools/bin/amdgcn-amdhsa-nm +ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" @@ -1889,7 +1905,10 @@ hsa,\ %endif %if %{build_nvptx} -nvptx-none=%{_prefix}/nvptx-none, \ +nvptx-none=%{_prefix}/nvptx-none,\ +%endif +%if %{build_gcn} +amdgcn-amdhsa=%{_prefix}/amdgcn-amdhsa,\ %endif %endif %if %{build_nvptx} @@ -1974,6 +1993,10 @@ --disable-sjlj-exceptions \ --enable-newlib-io-long-long \ %endif +%if "%{TARGET_ARCH}" == "amdgcn" + --enable-as-accelerator-for=%{GCCDIST} \ + --enable-libgomp \ +%endif %if "%{TARGET_ARCH}" == "avr" --enable-lto \ --without-gxx-include-dir \ @@ -2126,6 +2149,7 @@ # Work around tail/head -1 changes export _POSIX2_VERSION=199209 export LIBRARY_PATH=%{buildroot}/%{libsubdir}:%{buildroot}/%{mainlibdirbi} + %make_install # verify libasan really ended up with libstdc++ as NEEDED. @@ -2140,7 +2164,8 @@ for lib in libobjc libgfortran libquadmath libcaf_single \ libgomp libgomp-plugin-hsa libstdc++ libsupc++ libgo \ libasan libatomic libitm libtsan liblsan libubsan libvtv \ - libstdc++fs libgomp-plugin-nvptx libgdruntime libgphobos; do + libstdc++fs libgomp-plugin-nvptx libgomp-plugin-gcn \ + libgdruntime libgphobos; do rm -f %{buildroot}/%{versmainlibdir}/$lib.la %if %{biarch} rm -f %{buildroot}/%{versmainlibdirbi}/$lib.la @@ -2230,6 +2255,9 @@ %if %{build_nvptx} libgomp-plugin-nvptx \ %endif +%if %{build_gcn} + libgomp-plugin-gcn \ +%endif %ifarch %atomic_arch libatomic \ %endif @@ -2542,6 +2570,9 @@ %{libsubdir}/include/mmintrin.h %{libsubdir}/include/unwind-arm-common.h %{libsubdir}/include/arm_cmse.h +%{libsubdir}/include/arm_mve.h +%{libsubdir}/include/arm_mve_types.h +%{libsubdir}/include/arm_cde.h %endif %ifarch %arm aarch64 %{libsubdir}/include/arm_neon.h @@ -2659,6 +2690,9 @@ %if %{build_nvptx} %versmainlib libgomp-plugin-nvptx.so %endif +%if %{build_gcn} +%versmainlib libgomp-plugin-gcn.so +%endif %ifarch %itm_arch %versmainlib libitm.so %versmainlib libitm.a @@ -2717,6 +2751,10 @@ %if %{build_nvptx} %versbiarchlib libgomp-plugin-nvptx.so %endif +# No 32bit gcn plugin +#%%if %{build_gcn} +#%%versbiarchlib libgomp-plugin-gcn.so +#%%endif %ifarch %itm_arch %versbiarchlib libitm.so %versbiarchlib libitm.a @@ -2866,6 +2904,9 @@ %if %{build_nvptx} %mainlib libgomp-plugin-nvptx.so.%{libgomp_sover}* %endif +%if %{build_gcn} +%mainlib libgomp-plugin-gcn.so.%{libgomp_sover}* +%endif %if %{separate_biarch} %files -n libgomp%{libgomp_sover}%{libgomp_suffix}%{separate_biarch_suffix} @@ -2875,6 +2916,9 @@ %if %{build_nvptx} %biarchlib libgomp-plugin-nvptx.so.%{libgomp_sover}* %endif +#%%if %%{build_gcn} +#%%biarchlib libgomp-plugin-gcn.so.%%{libgomp_sover}* +#%%endif %ifarch %asan_arch %files -n libasan%{libasan_sover}%{libasan_suffix} ++++++ _constraints ++++++ --- /var/tmp/diff_new_pack.azP7xx/_old 2020-05-12 22:27:14.907232839 +0200 +++ /var/tmp/diff_new_pack.azP7xx/_new 2020-05-12 22:27:14.911232847 +0200 @@ -7,12 +7,12 @@ <size unit="G">4</size> </physicalmemory> <processors>4</processors> + <jobs>4</jobs> </hardware> <overwrite> <conditions> <arch>x86_64</arch> <arch>ppc64le</arch> - <arch>s390x</arch> <arch>aarch64</arch> </conditions> <hardware> @@ -20,6 +20,7 @@ <size unit="G">8</size> </memory> <processors>8</processors> + <jobs>8</jobs> </hardware> </overwrite> </constraints> ++++++ change_spec ++++++ --- /var/tmp/diff_new_pack.azP7xx/_old 2020-05-12 22:27:14.943232914 +0200 +++ /var/tmp/diff_new_pack.azP7xx/_new 2020-05-12 22:27:14.947232922 +0200 @@ -115,8 +115,9 @@ #add_newlib_cross cross-rl78-gcc$base_ver rl78 rl78-elf add_newlib_cross cross-rx-gcc$base_ver rx rx-elf fi -# the nvptx cross is used for offloading +# the nvptx and amdgcn crosses are used for offloading add_cross cross-nvptx-gcc$base_ver nvptx nvptx-none %define gcc_accel 1 +add_cross cross-amdgcn-gcc$base_ver amdgcn amdgcn-amdhsa %define gcc_accel 1 for f in *.spec; do sed -i -e '/^# .*-\(BEGIN\|END\)$/d' $f ++++++ cross.spec.in ++++++ --- /var/tmp/diff_new_pack.azP7xx/_old 2020-05-12 22:27:15.063233164 +0200 +++ /var/tmp/diff_new_pack.azP7xx/_new 2020-05-12 22:27:15.067233172 +0200 @@ -28,6 +28,7 @@ %define build_go 0 %define build_hsa 0 %define build_nvptx 0 +%define build_gcn 0 %define build_d 0 %define enable_plugins 0 @@ -93,10 +94,15 @@ # SRC-COMMON-BEGIN # SRC-COMMON-END %if "%{cross_arch}" != "nvptx" +%if "%{cross_arch}" != "amdgcn" BuildRequires: cross-%{binutils_target}-binutils Requires: cross-%{binutils_target}-binutils %endif +%endif BuildRequires: gcc-c++ +%if %{suse_version} > 1500 +BuildRequires: libzstd-devel +%endif BuildRequires: bison BuildRequires: flex BuildRequires: gettext-devel @@ -131,6 +137,16 @@ ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif +%if "%{cross_arch}" == "amdgcn" +# amdgcn uses the llvm assembler and linker +BuildRequires: llvm +BuildRequires: lld +Requires: llvm +Requires: lld +Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} +ExclusiveArch: x86_64 +%define amdgcn_newlib 1 +%endif %endif %if 0%{?gcc_icecream:1} ExclusiveArch: ppc64le ppc64 x86_64 s390x aarch64 riscv64 @@ -193,7 +209,7 @@ %if 0%{?nvptx_newlib:1} %package -n cross-nvptx-newlib@base_ver@-devel -Summary: newlib for the nvptx offload target +Summary: Newlib for the nvptx offload target Group: Development/Languages/C and C++ Provides: cross-nvptx-newlib-devel = %{version}-%{release} Conflicts: cross-nvptx-newlib-devel @@ -202,12 +218,28 @@ Newlib development files for the nvptx offload target compiler. %endif +%if 0%{?amdgcn_newlib:1} +%package -n cross-amdgcn-newlib@base_ver@-devel +Summary: Newlib for the amdgcn offload target +Group: Development/Languages/C and C++ +Provides: cross-amdgcn-newlib-devel = %{version}-%{release} +Conflicts: cross-amdgcn-newlib-devel + +%description -n cross-amdgcn-newlib@base_ver@-devel +Newlib development files for the amdgcn offload target compiler. +%endif + %define targetlibsubdir %{_libdir}/gcc/%{gcc_target_arch}/%{gcc_dir_version} %install cd obj-%{GCCDIST} +%if "%{TARGET_ARCH}" == "amdgcn" +# libtool needs to be able to call ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + # install and fixup host parts make DESTDIR=$RPM_BUILD_ROOT install-host rm -rf $RPM_BUILD_ROOT/%{targetlibsubdir}/install-tools @@ -261,6 +293,20 @@ ( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - ) rm -rf $RPM_BUILD_ROOT%{targetlibsubdir} %endif +# for amdgcn install the symlinks to the llvm tools +%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 /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 %{_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 +ln -s %{_prefix}/amdgcn-amdhsa/bin/nm $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-nm +ln -s %{_prefix}/amdgcn-amdhsa/bin/ranlib $RPM_BUILD_ROOT%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif %if 0%{?gcc_icecream:%gcc_icecream} # Build an icecream environment @@ -410,4 +456,15 @@ %{_prefix}/%{gcc_target_arch} %endif +%if 0%{?amdgcn_newlib:1} +%files -n cross-amdgcn-newlib@base_ver@-devel +%defattr(-,root,root) +%{_prefix}/%{gcc_target_arch} +%{_prefix}/bin/amdgcn-amdhsa-ar +%{_prefix}/bin/amdgcn-amdhsa-as +%{_prefix}/bin/amdgcn-amdhsa-ld +%{_prefix}/bin/amdgcn-amdhsa-nm +%{_prefix}/bin/amdgcn-amdhsa-ranlib +%endif + %changelog -n cross-%{pkgname}-gcc@base_ver@ ++++++ gcc-10.0.1+git175037.tar.xz -> gcc-10.1.1+git40.tar.xz ++++++ /work/SRC/openSUSE:Factory/gcc10/gcc-10.0.1+git175037.tar.xz /work/SRC/openSUSE:Factory/.gcc10.new.2738/gcc-10.1.1+git40.tar.xz differ: char 26, line 1 ++++++ gcc.spec.in ++++++ --- /var/tmp/diff_new_pack.azP7xx/_old 2020-05-12 22:27:15.127233298 +0200 +++ /var/tmp/diff_new_pack.azP7xx/_new 2020-05-12 22:27:15.131233306 +0200 @@ -73,9 +73,11 @@ %ifarch x86_64 %define build_hsa 1 %define build_nvptx 1 +%define build_gcn 1 %else %define build_hsa 0 %define build_nvptx 0 +%define build_gcn 0 %endif %define use_lto_bootstrap 0 @@ -115,8 +117,8 @@ %define liblsan_sover 0 %define libvtv_sover 0 %define libgo_sover 16 -%define libgphobos_sover 76 -%define libgdruntime_sover 76 +%define libgphobos_sover 1 +%define libgdruntime_sover 1 # Shared library package suffix # This is used for the "non-standard" set of libraries, the standard @@ -253,7 +255,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 10.0.1+git175037 +Version: 10.1.1+git40 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/+/-/') @@ -303,7 +305,7 @@ Source2: gcc10-rpmlintrc Source3: gcc10-testresults-rpmlintrc Source4: README.First-for.SuSE.packagers -Source5: newlib-3.1.0.tar.xz +Source5: newlib-3.3.0.tar.xz Patch2: gcc-add-defaultsspec.diff Patch5: tls-no-direct.diff Patch6: gcc43-no-unwind-tables.diff @@ -311,6 +313,8 @@ 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 # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -1047,9 +1051,9 @@ # BUILD-COMMON-BEGIN %prep -%if 0%{?nvptx_newlib:1} +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} %setup -q -n gcc-%{version} -a 5 -ln -s newlib-3.1.0/newlib . +ln -s newlib-3.3.0/newlib . %else %setup -q -n gcc-%{version} %endif @@ -1065,6 +1069,8 @@ %endif %patch11 %patch15 +%patch16 +%patch17 -p1 %patch51 %patch60 %patch61 @@ -1131,12 +1137,22 @@ # In general we want to ship release checking enabled compilers # which is the default for released compilers #ENABLE_CHECKING="--enable-checking=yes" -#ENABLE_CHECKING="--enable-checking=release" -ENABLE_CHECKING="" +ENABLE_CHECKING="--enable-checking=release" +#ENABLE_CHECKING="" # Work around tail/head -1 changes export _POSIX2_VERSION=199209 +%if "%{TARGET_ARCH}" == "amdgcn" +mkdir -p target-tools/bin +ln -s /usr/bin/llvm-ar target-tools/bin/amdgcn-amdhsa-ar +ln -s /usr/bin/llvm-mc target-tools/bin/amdgcn-amdhsa-as +ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/llvm-nm target-tools/bin/amdgcn-amdhsa-nm +ln -s /usr/bin/llvm-ranlib target-tools/bin/amdgcn-amdhsa-ranlib +export PATH="`pwd`/target-tools/bin:$PATH" +%endif + %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" @@ -1167,7 +1183,10 @@ hsa,\ %endif %if %{build_nvptx} -nvptx-none=%{_prefix}/nvptx-none, \ +nvptx-none=%{_prefix}/nvptx-none,\ +%endif +%if %{build_gcn} +amdgcn-amdhsa=%{_prefix}/amdgcn-amdhsa,\ %endif %endif %if %{build_nvptx} @@ -1252,6 +1271,10 @@ --disable-sjlj-exceptions \ --enable-newlib-io-long-long \ %endif +%if "%{TARGET_ARCH}" == "amdgcn" + --enable-as-accelerator-for=%{GCCDIST} \ + --enable-libgomp \ +%endif %if "%{TARGET_ARCH}" == "avr" --enable-lto \ --without-gxx-include-dir \ @@ -1407,6 +1430,7 @@ # Work around tail/head -1 changes export _POSIX2_VERSION=199209 export LIBRARY_PATH=%{buildroot}/%{libsubdir}:%{buildroot}/%{mainlibdirbi} + %make_install # verify libasan really ended up with libstdc++ as NEEDED. @@ -1421,7 +1445,8 @@ for lib in libobjc libgfortran libquadmath libcaf_single \ libgomp libgomp-plugin-hsa libstdc++ libsupc++ libgo \ libasan libatomic libitm libtsan liblsan libubsan libvtv \ - libstdc++fs libgomp-plugin-nvptx libgdruntime libgphobos; do + libstdc++fs libgomp-plugin-nvptx libgomp-plugin-gcn \ + libgdruntime libgphobos; do rm -f %{buildroot}/%{versmainlibdir}/$lib.la %if %{biarch} rm -f %{buildroot}/%{versmainlibdirbi}/$lib.la @@ -1511,6 +1536,9 @@ %if %{build_nvptx} libgomp-plugin-nvptx \ %endif +%if %{build_gcn} + libgomp-plugin-gcn \ +%endif %ifarch %atomic_arch libatomic \ %endif @@ -1827,6 +1855,9 @@ %{libsubdir}/include/mmintrin.h %{libsubdir}/include/unwind-arm-common.h %{libsubdir}/include/arm_cmse.h +%{libsubdir}/include/arm_mve.h +%{libsubdir}/include/arm_mve_types.h +%{libsubdir}/include/arm_cde.h %endif %ifarch %arm aarch64 %{libsubdir}/include/arm_neon.h @@ -1944,6 +1975,9 @@ %if %{build_nvptx} %versmainlib libgomp-plugin-nvptx.so %endif +%if %{build_gcn} +%versmainlib libgomp-plugin-gcn.so +%endif %ifarch %itm_arch %versmainlib libitm.so %versmainlib libitm.a @@ -2002,6 +2036,10 @@ %if %{build_nvptx} %versbiarchlib libgomp-plugin-nvptx.so %endif +# No 32bit gcn plugin +#%%if %{build_gcn} +#%%versbiarchlib libgomp-plugin-gcn.so +#%%endif %ifarch %itm_arch %versbiarchlib libitm.so %versbiarchlib libitm.a @@ -2152,6 +2190,9 @@ %if %{build_nvptx} %mainlib libgomp-plugin-nvptx.so.%{libgomp_sover}* %endif +%if %{build_gcn} +%mainlib libgomp-plugin-gcn.so.%{libgomp_sover}* +%endif %if %{separate_biarch} %files -n libgomp%{libgomp_sover}%{libgomp_suffix}%{separate_biarch_suffix} @@ -2161,6 +2202,9 @@ %if %{build_nvptx} %biarchlib libgomp-plugin-nvptx.so.%{libgomp_sover}* %endif +#%%if %%{build_gcn} +#%%biarchlib libgomp-plugin-gcn.so.%%{libgomp_sover}* +#%%endif ++++++ gcc9-reproducible-builds-buildid-for-checksum.patch ++++++ Use the binaries build-id as checksum for PCH purposes. diff --git a/gcc/c-family/c-pch.c b/gcc/c-family/c-pch.c index a2292f46a7d..94d633d139a 100644 --- a/gcc/c-family/c-pch.c +++ b/gcc/c-family/c-pch.c @@ -65,6 +65,66 @@ static FILE *pch_outfile; static const char *get_ident (void); +#if _GNU_SOURCE +#include <link.h> + +#define ALIGN(val, align) (((val) + (align) - 1) & ~((align) - 1)) + +static int +get_build_id_1 (struct dl_phdr_info *info, size_t, void *data) +{ + for (unsigned i = 0; i < info->dlpi_phnum; ++i) + { + if (info->dlpi_phdr[i].p_type != PT_NOTE) + continue; + ElfW(Nhdr) *nhdr + = (ElfW(Nhdr) *)(info->dlpi_addr + info->dlpi_phdr[i].p_vaddr); + ptrdiff_t size = info->dlpi_phdr[i].p_filesz; + ptrdiff_t align = info->dlpi_phdr[i].p_align; + if (align != 8) + align = 4; + while (size >= (ptrdiff_t)sizeof (ElfW(Nhdr))) + { + if (nhdr->n_type == NT_GNU_BUILD_ID + && nhdr->n_namesz == 4 + && strncmp ((char *)nhdr + + sizeof (ElfW(Nhdr)), + "GNU", 4) == 0 + && nhdr->n_descsz >= 16) + { + memcpy (data, + (char *)nhdr + + ALIGN (sizeof (ElfW(Nhdr)) + + nhdr->n_namesz, align), 16); + return 1; + } + size_t offset = (ALIGN (sizeof (ElfW(Nhdr)) + + nhdr->n_namesz, align) + + ALIGN(nhdr->n_descsz, align)); + nhdr = (ElfW(Nhdr) *)((char *)nhdr + offset); + size -= offset; + } + } + + return 0; +} + +static const unsigned char * +get_build_id () +{ + static unsigned char build_id[16]; + if (!dl_iterate_phdr (get_build_id_1, build_id)) + return NULL; + return build_id; +} +#else +static const unsigned char * +get_build_id () +{ + return NULL; +} +#endif + /* Compute an appropriate 8-byte magic number for the PCH file, so that utilities like file(1) can identify it, and so that GCC can quickly ignore non-PCH files and PCH files that are of a completely different @@ -120,8 +180,11 @@ pch_init (void) v.pch_init = &pch_init; target_validity = targetm.get_pch_validity (&v.target_data_length); + const unsigned char *chksum = get_build_id (); + if (!chksum) + chksum = executable_checksum; if (fwrite (partial_pch, IDENT_LENGTH, 1, f) != 1 - || fwrite (executable_checksum, 16, 1, f) != 1 + || fwrite (chksum, 16, 1, f) != 1 || fwrite (&v, sizeof (v), 1, f) != 1 || fwrite (target_validity, v.target_data_length, 1, f) != 1) fatal_error (input_location, "cannot write to %s: %m", pch_file); @@ -237,7 +300,10 @@ c_common_valid_pch (cpp_reader *pfile, const char *name, int fd) } return 2; } - if (memcmp (ident + IDENT_LENGTH, executable_checksum, 16) != 0) + const unsigned char *chksum = get_build_id (); + if (!chksum) + chksum = executable_checksum; + if (memcmp (ident + IDENT_LENGTH, chksum, 16) != 0) { if (cpp_get_options (pfile)->warn_invalid_pch) cpp_error (pfile, CPP_DL_WARNING, diff --git a/gcc/genchecksum.c b/gcc/genchecksum.c index 09fbb63fa93..ec8b3281d53 100644 --- a/gcc/genchecksum.c +++ b/gcc/genchecksum.c @@ -113,8 +113,13 @@ main (int argc, char ** argv) puts ("#include \"config.h\""); puts ("#include \"system.h\""); fputs ("EXPORTED_CONST unsigned char executable_checksum[16] = { ", stdout); +#if _GNU_SOURCE + for (i = 0; i < 16; i++) + printf ("0x%02x%s", 0, i == 15 ? " };\n" : ", "); +#else for (i = 0; i < 16; i++) printf ("0x%02x%s", result[i], i == 15 ? " };\n" : ", "); +#endif return 0; } ++++++ gcc9-reproducible-builds.patch ++++++ Avoid leaking current data on generated file for Ada. Index: gcc/ada/gcc-interface/Makefile.in =================================================================== --- gcc/ada/gcc-interface/Makefile.in (revision 268977) +++ gcc/ada/gcc-interface/Makefile.in (working copy) @@ -2407,6 +2407,7 @@ $(RTSDIR)/s-oscons.ads: ../stamp-gnatlib $(OSCONS_CPP) ; \ $(OSCONS_EXTRACT) ; \ ../bldtools/oscons/xoscons s-oscons) + touch -r $(fsrcpfx)ada/gsocket.h $@ gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-oscons.ads test -f $(RTSDIR)/s-oscons.ads || exit 1 ++++++ newlib-3.1.0.tar.xz -> newlib-3.3.0.tar.xz ++++++ ++++ 74785 lines of diff (skipped)
