Hello community, here is the log from the commit of package gcc9 for openSUSE:Factory checked in at 2019-09-23 12:01:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gcc9 (Old) and /work/SRC/openSUSE:Factory/.gcc9.new.7948 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gcc9" Mon Sep 23 12:01:37 2019 rev:8 rq:731720 version:9.2.1+r275327 Changes: -------- --- /work/SRC/openSUSE:Factory/gcc9/cross-aarch64-gcc9.changes 2019-08-27 12:01:04.495653601 +0200 +++ /work/SRC/openSUSE:Factory/.gcc9.new.7948/cross-aarch64-gcc9.changes 2019-09-23 12:01:41.349962049 +0200 @@ -1,0 +2,38 @@ +Wed Sep 18 08:15:19 UTC 2019 - Richard Biener <[email protected]> + +- Add gcc9-pr91772.patch and gcc9-pr91763.patch to fix fallout + of gcc9-autodetect-g-at-lto-link.patch. + +------------------------------------------------------------------- +Wed Sep 11 11:22:02 UTC 2019 - Richard Biener <[email protected]> + +- Add gcc9-autodetect-g-at-lto-link.patch. [bsc#1149995] + +------------------------------------------------------------------- +Mon Sep 9 07:25:31 UTC 2019 - Richard Biener <[email protected]> + +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. +- Revert removal of defattr, it breaks building on SLES12. + +------------------------------------------------------------------- +Tue Sep 3 08:01:01 UTC 2019 - Richard Biener <[email protected]> + +- Update to gcc-9-branch head (r275327). + * Pulls fix for POWER9 DARN miscompilation. + (bsc#1149145, CVE-2019-15847) + +------------------------------------------------------------------- +Wed Aug 28 13:21:47 UTC 2019 - Richard Biener <[email protected]> + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] + +------------------------------------------------------------------- +Tue Aug 27 07:54:34 UTC 2019 - Jan Engelhardt <[email protected]> + +- Replace old $RPM_* shell vars by macros (where possible). +- Drop defattr and BuildRoot. + +------------------------------------------------------------------- @@ -18 +56 @@ - * Includes GCC 9.2 release. [jsc#SLE-6536, jsc#SLE-6533] + * Includes GCC 9.2 release. [jsc#SLE-6536, jsc#SLE-6533, jsc#ECO-368] cross-arm-gcc9.changes: same change cross-arm-none-gcc9-bootstrap.changes: same change cross-arm-none-gcc9.changes: same change cross-avr-gcc9-bootstrap.changes: same change cross-avr-gcc9.changes: same change cross-epiphany-gcc9-bootstrap.changes: same change cross-epiphany-gcc9.changes: same change cross-hppa-gcc9.changes: same change cross-i386-gcc9.changes: same change cross-m68k-gcc9.changes: same change cross-mips-gcc9.changes: same change cross-nvptx-gcc9.changes: same change cross-ppc64-gcc9.changes: same change cross-ppc64le-gcc9.changes: same change cross-riscv64-elf-gcc9-bootstrap.changes: same change cross-riscv64-elf-gcc9.changes: same change cross-riscv64-gcc9.changes: same change cross-rx-gcc9-bootstrap.changes: same change cross-rx-gcc9.changes: same change cross-s390x-gcc9.changes: same change cross-sparc-gcc9.changes: same change cross-sparc64-gcc9.changes: same change cross-x86_64-gcc9.changes: same change gcc9-testresults.changes: same change gcc9.changes: same change Old: ---- gcc-9.2.1+r274709.tar.xz New: ---- gcc-9.2.1+r275327.tar.xz gcc9-autodetect-g-at-lto-link.patch gcc9-pr91763.patch gcc9-pr91772.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cross-aarch64-gcc9.spec ++++++ --- /var/tmp/diff_new_pack.fZ7NmF/_old 2019-09-23 12:02:08.369957588 +0200 +++ /var/tmp/diff_new_pack.fZ7NmF/_new 2019-09-23 12:02:08.381957587 +0200 @@ -111,6 +111,75 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 9.2.1+r275327 +Release: 0 +%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) +%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') +%define binsuffix -9 +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source2: gcc9-rpmlintrc +Source3: gcc9-testresults-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: newlib-3.1.0.tar.xz +Patch2: gcc-add-defaultsspec.diff +Patch5: tls-no-direct.diff +Patch6: gcc43-no-unwind-tables.diff +Patch7: gcc48-libstdc++-api-reference.patch +Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch15: gcc7-avoid-fixinc-error.diff +Patch16: gcc9-reproducible-builds.patch +Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch +Patch18: gcc9-value-prof.patch +Patch19: gcc9-add-flto=auto.patch +Patch20: gcc9-pr91307.patch +Patch21: gcc9-autodetect-g-at-lto-link.patch +Patch22: gcc9-pr91772.patch +Patch23: gcc9-pr91763.patch +# A set of patches from the RH srpm +Patch51: gcc41-ppc32-retaddr.patch +# Some patches taken from Debian +Patch60: gcc44-textdomain.patch +Patch61: gcc44-rename-info-files.patch + +# Define the canonical target and host architecture +# %%gcc_target_arch is supposed to be the full target triple +# %%cross_arch is supposed to be the rpm target variant arch +# %%TARGET_ARCH will be the canonicalized target CPU part +# %%HOST_ARCH will be the canonicalized host CPU part +%if 0%{?gcc_target_arch:1} +%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") +%else +%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") +%endif +%if 0%{?disable_32bit:1} +%define biarch 0 +%else +%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%endif + +%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") +%ifarch ppc +%define GCCDIST powerpc64-suse-linux +%else +%ifarch %sparc +%define GCCDIST sparc64-suse-linux +%else +%ifarch %arm +%define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi +%else +%define GCCDIST %{HOST_ARCH}-suse-linux +%endif +%endif +%endif + +%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} +%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} + %if "%{cross_arch}" != "nvptx" BuildRequires: cross-%{binutils_target}-binutils Requires: cross-%{binutils_target}-binutils @@ -176,88 +245,21 @@ BuildRequires: update-alternatives Requires(post): update-alternatives Requires(preun): update-alternatives - -%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 - -URL: https://gcc.gnu.org/ -Version: 9.2.1+r274709 -Release: 0 -%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) -%define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') -%define binsuffix -9 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source2: gcc9-rpmlintrc -Source3: gcc9-testresults-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: newlib-3.1.0.tar.xz -Patch2: gcc-add-defaultsspec.diff -Patch5: tls-no-direct.diff -Patch6: gcc43-no-unwind-tables.diff -Patch7: gcc48-libstdc++-api-reference.patch -Patch9: gcc48-remove-mpfr-2.4.0-requirement.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch15: gcc7-avoid-fixinc-error.diff -Patch16: gcc9-reproducible-builds.patch -Patch17: gcc9-reproducible-builds-buildid-for-checksum.patch -Patch18: gcc9-value-prof.patch -Patch19: gcc9-add-flto=auto.patch -Patch20: gcc9-pr91307.patch -# A set of patches from the RH srpm -Patch51: gcc41-ppc32-retaddr.patch -# Some patches taken from Debian -Patch60: gcc44-textdomain.patch -Patch61: gcc44-rename-info-files.patch - -Summary: The GNU C Compiler and Support Files +Summary: The GNU Compiler Collection targeting %{cross_arch} License: GPL-3.0-or-later Group: Development/Languages/C and C++ %description -Core package for the GNU Compiler Collection, including the C language -frontend. - -Language frontends other than C are split to different sub-packages, -namely gcc-ada, gcc-c++, gcc-fortran, gcc-obj, gcc-obj-c++ and gcc-go. - - - - -# Define the canonical target and host architecture -# %%gcc_target_arch is supposed to be the full target triple -# %%cross_arch is supposed to be the rpm target variant arch -# %%TARGET_ARCH will be the canonicalized target CPU part -# %%HOST_ARCH will be the canonicalized host CPU part -%if 0%{?gcc_target_arch:1} -%define TARGET_ARCH %(echo %{cross_arch} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") -%else -%define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") -%endif -%if 0%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) -%endif - -%define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;") -%ifarch ppc -%define GCCDIST powerpc64-suse-linux -%else -%ifarch %sparc -%define GCCDIST sparc64-suse-linux -%else -%ifarch %arm -%define GCCDIST %{HOST_ARCH}-suse-linux-gnueabi -%else -%define GCCDIST %{HOST_ARCH}-suse-linux -%endif +The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}. +%if 0%{?gcc_icecream:1} +Note this is only useful for building freestanding things like the +kernel since it fails to include target libraries and headers. %endif +%if 0%{?gcc_libc_bootstrap:1} +This is a package that is necessary for bootstrapping another package +only, it is not intended for any other use. %endif -%define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} -%define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 @@ -282,6 +284,9 @@ %patch18 -p1 %patch19 -p1 %patch20 +%patch21 +%patch22 +%patch23 %patch51 %patch60 %patch61 cross-arm-gcc9.spec: same change cross-arm-none-gcc9-bootstrap.spec: same change cross-arm-none-gcc9.spec: same change cross-avr-gcc9-bootstrap.spec: same change cross-avr-gcc9.spec: same change cross-epiphany-gcc9-bootstrap.spec: same change cross-epiphany-gcc9.spec: same change cross-hppa-gcc9.spec: same change cross-i386-gcc9.spec: same change cross-m68k-gcc9.spec: same change cross-mips-gcc9.spec: same change cross-nvptx-gcc9.spec: same change cross-ppc64-gcc9.spec: same change cross-ppc64le-gcc9.spec: same change cross-riscv64-elf-gcc9-bootstrap.spec: same change cross-riscv64-elf-gcc9.spec: same change cross-riscv64-gcc9.spec: same change cross-rx-gcc9-bootstrap.spec: same change cross-rx-gcc9.spec: same change cross-s390x-gcc9.spec: same change cross-sparc-gcc9.spec: same change cross-sparc64-gcc9.spec: same change cross-x86_64-gcc9.spec: same change ++++++ gcc9-testresults.spec ++++++ --- /var/tmp/diff_new_pack.fZ7NmF/_old 2019-09-23 12:02:09.217957448 +0200 +++ /var/tmp/diff_new_pack.fZ7NmF/_new 2019-09-23 12:02:09.221957448 +0200 @@ -194,8 +194,10 @@ BuildRequires: mpfr-devel BuildRequires: perl BuildRequires: zlib-devel +%if %{suse_version} >= 1500 # for SDT markers in the C++ unwinder and gdb breakpoints on exceptions BuildRequires: systemtap-headers +%endif %if %{suse_version} >= 1230 BuildRequires: isl-devel %endif @@ -262,7 +264,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 9.2.1+r274709 +Version: 9.2.1+r275327 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/+/-/') @@ -302,7 +304,6 @@ Suggests: gcc9-info gcc9-locale %endif -BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{version}.tar.xz Source1: change_spec Source2: gcc9-rpmlintrc @@ -321,6 +322,9 @@ Patch18: gcc9-value-prof.patch Patch19: gcc9-add-flto=auto.patch Patch20: gcc9-pr91307.patch +Patch21: gcc9-autodetect-g-at-lto-link.patch +Patch22: gcc9-pr91772.patch +Patch23: gcc9-pr91763.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -451,6 +455,9 @@ %patch18 -p1 %patch19 -p1 %patch20 +%patch21 +%patch22 +%patch23 %patch51 %patch60 %patch61 ++++++ gcc9.spec ++++++ --- /var/tmp/diff_new_pack.fZ7NmF/_old 2019-09-23 12:02:09.245957443 +0200 +++ /var/tmp/diff_new_pack.fZ7NmF/_new 2019-09-23 12:02:09.249957443 +0200 @@ -176,8 +176,10 @@ BuildRequires: mpfr-devel BuildRequires: perl BuildRequires: zlib-devel +%if %{suse_version} >= 1500 # for SDT markers in the C++ unwinder and gdb breakpoints on exceptions BuildRequires: systemtap-headers +%endif %if %{suse_version} >= 1230 BuildRequires: isl-devel %endif @@ -244,7 +246,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 9.2.1+r274709 +Version: 9.2.1+r275327 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/+/-/') @@ -284,7 +286,6 @@ Suggests: gcc9-info gcc9-locale %endif -BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{version}.tar.xz Source1: change_spec Source2: gcc9-rpmlintrc @@ -303,6 +304,9 @@ Patch18: gcc9-value-prof.patch Patch19: gcc9-add-flto=auto.patch Patch20: gcc9-pr91307.patch +Patch21: gcc9-autodetect-g-at-lto-link.patch +Patch22: gcc9-pr91772.patch +Patch23: gcc9-pr91763.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -440,7 +444,7 @@ %package -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix} Summary: Include Files and Libraries mandatory for Development -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: Development/Languages/C and C++ Requires: glibc-devel Requires: libstdc++%{libstdcxx_sover} >= %{version}-%{release} @@ -457,7 +461,7 @@ library. It is needed for compiling C++ code. %package -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}-32bit Summary: Include Files and Libraries mandatory for Development -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: Development/Languages/C and C++ Requires: glibc-devel-32bit Requires: libstdc++%{libstdcxx_sover}-32bit >= %{version}-%{release} @@ -474,7 +478,7 @@ library. It is needed for compiling C++ code. %package -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}-64bit Summary: Include Files and Libraries mandatory for Development -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: Development/Languages/C and C++ Requires: glibc-devel-64bit Requires: libstdc++%{libstdcxx_sover}-64bit >= %{version}-%{release} @@ -536,7 +540,7 @@ %package -n libgcc_s%{libgcc_s}%{libgcc_s_suffix} Summary: C compiler runtime library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Base Provides: libgcc_s%{libgcc_s} = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -551,7 +555,7 @@ %postun -n libgcc_s%{libgcc_s}%{libgcc_s_suffix} -p /sbin/ldconfig %package -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit Summary: C compiler runtime library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Base Provides: libgcc_s%{libgcc_s}-32bit = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -566,7 +570,7 @@ %postun -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit -p /sbin/ldconfig %package -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-64bit Summary: C compiler runtime library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Base Provides: libgcc_s%{libgcc_s}-64bit = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -582,7 +586,7 @@ %package -n libgomp%{libgomp_sover}%{libgomp_suffix} Summary: The GNU compiler collection OpenMP runtime library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Base Provides: libgomp%{libgomp_sover} = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -601,7 +605,7 @@ %postun -n libgomp%{libgomp_sover}%{libgomp_suffix} -p /sbin/ldconfig %package -n libgomp%{libgomp_sover}%{libgomp_suffix}-32bit Summary: The GNU compiler collection OpenMP runtime library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Base Provides: libgomp%{libgomp_sover}-32bit = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -620,7 +624,7 @@ %postun -n libgomp%{libgomp_sover}%{libgomp_suffix}-32bit -p /sbin/ldconfig %package -n libgomp%{libgomp_sover}%{libgomp_suffix}-64bit Summary: The GNU compiler collection OpenMP runtime library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Base Provides: libgomp%{libgomp_sover}-64bit = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -640,7 +644,7 @@ %package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix} Summary: The standard C++ shared library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Libraries Suggests: libstdc++%{libstdcxx_sover}-locale Provides: libstdc++%{libstdcxx_sover} = %{version}-%{release} @@ -657,7 +661,7 @@ %postun -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix} -p /sbin/ldconfig %package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-32bit Summary: The standard C++ shared library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Libraries Suggests: libstdc++%{libstdcxx_sover}-locale Provides: libstdc++%{libstdcxx_sover}-32bit = %{version}-%{release} @@ -674,7 +678,7 @@ %postun -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-32bit -p /sbin/ldconfig %package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-64bit Summary: The standard C++ shared library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Libraries Suggests: libstdc++%{libstdcxx_sover}-locale Provides: libstdc++%{libstdcxx_sover}-64bit = %{version}-%{release} @@ -692,7 +696,7 @@ %package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale Summary: Standard C++ Library Locales -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Libraries Provides: libstdc++%{libstdcxx_sover}-locale = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -756,7 +760,7 @@ %package -n libobjc%{libobjc_sover}%{libobjc_suffix} Summary: Library for the GNU Objective C Compiler -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: Development/Libraries/Other Provides: libobjc%{libobjc_sover} = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -771,7 +775,7 @@ %postun -n libobjc%{libobjc_sover}%{libobjc_suffix} -p /sbin/ldconfig %package -n libobjc%{libobjc_sover}%{libobjc_suffix}-32bit Summary: Library for the GNU Objective C Compiler -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: Development/Libraries/Other Provides: libobjc%{libobjc_sover}-32bit = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -786,7 +790,7 @@ %postun -n libobjc%{libobjc_sover}%{libobjc_suffix}-32bit -p /sbin/ldconfig %package -n libobjc%{libobjc_sover}%{libobjc_suffix}-64bit Summary: Library for the GNU Objective C Compiler -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: Development/Libraries/Other Provides: libobjc%{libobjc_sover}-64bit = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -884,7 +888,7 @@ %package -n libada9 Summary: GNU Ada Runtime Libraries -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Libraries Provides: libgnarl-9 = %{version}-%{release} Conflicts: %selfconflict libgnarl-9 @@ -904,7 +908,7 @@ %postun -n libada9 -p /sbin/ldconfig %package -n libada9-32bit Summary: GNU Ada Runtime Libraries -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Libraries Provides: libgnarl-9-32bit = %{version}-%{release} Conflicts: %selfconflict libgnarl-9-32bit @@ -924,7 +928,7 @@ %postun -n libada9-32bit -p /sbin/ldconfig %package -n libada9-64bit Summary: GNU Ada Runtime Libraries -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Libraries Provides: libgnarl-9-64bit = %{version}-%{release} Conflicts: %selfconflict libgnarl-9-64bit @@ -985,7 +989,7 @@ %package -n libgfortran%{libgfortran_sover}%{libgfortran_suffix} Summary: The GNU Fortran Compiler Runtime Library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: Development/Languages/Fortran %ifarch %quadmath_arch Requires: libquadmath%{libquadmath_sover} >= %{version}-%{release} @@ -1004,7 +1008,7 @@ %postun -n libgfortran%{libgfortran_sover}%{libgfortran_suffix} -p /sbin/ldconfig %package -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-32bit Summary: The GNU Fortran Compiler Runtime Library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: Development/Languages/Fortran %ifarch %quadmath_arch Requires: libquadmath%{libquadmath_sover}-32bit >= %{version}-%{release} @@ -1023,7 +1027,7 @@ %postun -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-32bit -p /sbin/ldconfig %package -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-64bit Summary: The GNU Fortran Compiler Runtime Library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: Development/Languages/Fortran %ifarch %quadmath_arch Requires: libquadmath%{libquadmath_sover}-64bit >= %{version}-%{release} @@ -1242,7 +1246,7 @@ %package -n libatomic%{libatomic_sover}%{libatomic_suffix} Summary: The GNU Compiler Atomic Operations Runtime Library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: Development/Languages/C and C++ Provides: libatomic%{libatomic_sover} = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -1257,7 +1261,7 @@ %postun -n libatomic%{libatomic_sover}%{libatomic_suffix} -p /sbin/ldconfig %package -n libatomic%{libatomic_sover}%{libatomic_suffix}-32bit Summary: The GNU Compiler Atomic Operations Runtime Library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: Development/Languages/C and C++ Provides: libatomic%{libatomic_sover}-32bit = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -1272,7 +1276,7 @@ %postun -n libatomic%{libatomic_sover}%{libatomic_suffix}-32bit -p /sbin/ldconfig %package -n libatomic%{libatomic_sover}%{libatomic_suffix}-64bit Summary: The GNU Compiler Atomic Operations Runtime Library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: Development/Languages/C and C++ Provides: libatomic%{libatomic_sover}-64bit = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -1778,6 +1782,9 @@ %patch18 -p1 %patch19 -p1 %patch20 +%patch21 +%patch22 +%patch23 %patch51 %patch60 %patch61 @@ -2113,14 +2120,14 @@ cd obj-%{GCCDIST} # Work around tail/head -1 changes export _POSIX2_VERSION=199209 -export LIBRARY_PATH=$RPM_BUILD_ROOT%{libsubdir}:$RPM_BUILD_ROOT%{mainlibdirbi} -make install DESTDIR=$RPM_BUILD_ROOT +export LIBRARY_PATH=%{buildroot}/%{libsubdir}:%{buildroot}/%{mainlibdirbi} +%make_install # verify libasan really ended up with libstdc++ as NEEDED. %ifarch %asan_arch - readelf -d $RPM_BUILD_ROOT%{versmainlibdir}/libasan.so.%{libasan_sover}* | grep 'NEEDED.*libstdc++' || exit 1 + readelf -d %{buildroot}/%{versmainlibdir}/libasan.so.%{libasan_sover}* | grep 'NEEDED.*libstdc++' || exit 1 %if %{biarch} - readelf -d $RPM_BUILD_ROOT%{versmainlibdirbi}/libasan.so.%{libasan_sover}* | grep 'NEEDED.*libstdc++' || exit 1 + readelf -d %{buildroot}/%{versmainlibdirbi}/libasan.so.%{libasan_sover}* | grep 'NEEDED.*libstdc++' || exit 1 %endif %endif @@ -2129,18 +2136,18 @@ libgomp libgomp-plugin-hsa libstdc++ libsupc++ libgo \ libasan libatomic libitm libtsan liblsan libubsan libvtv \ libstdc++fs libgomp-plugin-nvptx libgdruntime libgphobos; do - rm -f $RPM_BUILD_ROOT%{versmainlibdir}/$lib.la + rm -f %{buildroot}/%{versmainlibdir}/$lib.la %if %{biarch} - rm -f $RPM_BUILD_ROOT%{versmainlibdirbi}/$lib.la + rm -f %{buildroot}/%{versmainlibdirbi}/$lib.la %endif done -mkdir -p $RPM_BUILD_ROOT%{_libdir} +mkdir -p %{buildroot}/%{_libdir} %if %{biarch} %if %{build_primary_64bit} -mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib +mkdir -p %{buildroot}/%{_prefix}/lib %else -mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib64 +mkdir -p %{buildroot}/%{_prefix}/lib64 %endif %endif @@ -2170,7 +2177,7 @@ exit 1 fi - cat > $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/bits/c++config.h <<EOF + cat > %{buildroot}/%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/bits/c++config.h <<EOF #ifndef _CPP_CPPCONFIG_WRAPPER #define _CPP_CPPCONFIG_WRAPPER 1 #include <bits/wordsize.h> @@ -2184,9 +2191,9 @@ break fi done -rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/[36]* +rm -rf %{buildroot}/%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/[36]* if ! test -z "$dir_ml"; then - ln -s . $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/$dir_ml + ln -s . %{buildroot}/%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/$dir_ml fi %endif @@ -2240,21 +2247,21 @@ libvtv \ %endif ; do - for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name $libname.so.*`; do - mv $lib $RPM_BUILD_ROOT%{mainlibdir}/ + for lib in `find %{buildroot}/%{versmainlibdir} -maxdepth 1 -name $libname.so.*`; do + mv $lib %{buildroot}/%{mainlibdir}/ done - if test -L $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so; then - ln -sf %{mainlibdir}/`readlink $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \ - $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so + if test -L %{buildroot}/%{versmainlibdir}/$libname.so; then + ln -sf %{mainlibdir}/`readlink %{buildroot}/%{versmainlibdir}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \ + %{buildroot}/%{versmainlibdir}/$libname.so fi %if %{biarch} - if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then - for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name "$libname.so.*"`; do - mv $lib $RPM_BUILD_ROOT%{mainlibdirbi}/ + if test -d %{buildroot}/%{versmainlibdirbi}; then + for lib in `find %{buildroot}/%{versmainlibdirbi} -maxdepth 1 -name "$libname.so.*"`; do + mv $lib %{buildroot}/%{mainlibdirbi}/ done - if test -L $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so; then - ln -sf %{mainlibdirbi}/`readlink $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \ - $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so + if test -L %{buildroot}/%{versmainlibdirbi}/$libname.so; then + ln -sf %{mainlibdirbi}/`readlink %{buildroot}/%{versmainlibdirbi}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \ + %{buildroot}/%{versmainlibdirbi}/$libname.so fi fi %endif @@ -2262,66 +2269,66 @@ %if %{build_cp} # And we want to move the shlib gdb pretty printers to a more sane # place so ldconfig does not complain -mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir} -mv $RPM_BUILD_ROOT%{mainlibdir}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/ -sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/libstdc++.so.*-gdb.py +mkdir -p %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdir} +mv %{buildroot}/%{mainlibdir}/libstdc++.so.*-gdb.py %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdir}/ +sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdir}/libstdc++.so.*-gdb.py %if %{biarch} - if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then - mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi} - mv $RPM_BUILD_ROOT%{mainlibdirbi}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/ - sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/libstdc++.so.*-gdb.py + if test -d %{buildroot}/%{versmainlibdirbi}; then + mkdir -p %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdirbi} + mv %{buildroot}/%{mainlibdirbi}/libstdc++.so.*-gdb.py %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdirbi}/ + sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdirbi}/libstdc++.so.*-gdb.py fi %endif %endif # Move libgcc_s around -if test -L $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so; then - rm -f $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so - ln -sf /%{_lib}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdir}/libgcc_s.so +if test -L %{buildroot}/%{_lib}/libgcc_s.so; then + rm -f %{buildroot}/%{_lib}/libgcc_s.so + ln -sf /%{_lib}/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdir}/libgcc_s.so else - mv $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdir}/ + mv %{buildroot}/%{_lib}/libgcc_s.so %{buildroot}/%{versmainlibdir}/ fi -chmod a+x $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so.%{libgcc_s} +chmod a+x %{buildroot}/%{_lib}/libgcc_s.so.%{libgcc_s} %if %{biarch} %if %{build_primary_64bit} -if test -L $RPM_BUILD_ROOT/lib/libgcc_s.so; then - rm -f $RPM_BUILD_ROOT/lib/libgcc_s.so - ln -sf /lib/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s.so +if test -L %{buildroot}/lib/libgcc_s.so; then + rm -f %{buildroot}/lib/libgcc_s.so + ln -sf /lib/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi32}/libgcc_s.so else - mv $RPM_BUILD_ROOT/lib/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/ + mv %{buildroot}/lib/libgcc_s.so %{buildroot}/%{versmainlibdirbi32}/ fi -ln -sf %{versmainlibdirbi32}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s_32.so -chmod a+x $RPM_BUILD_ROOT/lib/libgcc_s.so.%{libgcc_s} +ln -sf %{versmainlibdirbi32}/libgcc_s.so %{buildroot}/%{versmainlibdirbi32}/libgcc_s_32.so +chmod a+x %{buildroot}/lib/libgcc_s.so.%{libgcc_s} %else # 32-bit biarch systems -if test -L $RPM_BUILD_ROOT/lib64/libgcc_s.so; then - rm -f $RPM_BUILD_ROOT/lib64/libgcc_s.so - ln -sf /lib64/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s.so +if test -L %{buildroot}/lib64/libgcc_s.so; then + rm -f %{buildroot}/lib64/libgcc_s.so + ln -sf /lib64/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi64}/libgcc_s.so else - mv $RPM_BUILD_ROOT/lib64/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/ + mv %{buildroot}/lib64/libgcc_s.so %{buildroot}/%{versmainlibdirbi64}/ fi -ln -sf %{versmainlibdirbi64}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s_64.so -chmod a+x $RPM_BUILD_ROOT/lib64/libgcc_s.so.%{libgcc_s} +ln -sf %{versmainlibdirbi64}/libgcc_s.so %{buildroot}/%{versmainlibdirbi64}/libgcc_s_64.so +chmod a+x %{buildroot}/lib64/libgcc_s.so.%{libgcc_s} %endif %endif %if %{build_ada} -mv $RPM_BUILD_ROOT%{libsubdir}/adalib/lib*-*.so $RPM_BUILD_ROOT%{_libdir} -ln -sf %{_libdir}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnarl.so -ln -sf %{_libdir}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnat.so -chmod a+x $RPM_BUILD_ROOT%{_libdir}/libgna*-*.so +mv %{buildroot}/%{libsubdir}/adalib/lib*-*.so %{buildroot}/%{_libdir} +ln -sf %{_libdir}/libgnarl%{binsuffix}.so %{buildroot}/%{libsubdir}/adalib/libgnarl.so +ln -sf %{_libdir}/libgnat%{binsuffix}.so %{buildroot}/%{libsubdir}/adalib/libgnat.so +chmod a+x %{buildroot}/%{_libdir}/libgna*-*.so %if %{biarch} -mv $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/lib*-*.so $RPM_BUILD_ROOT%{mainlibdirbi}/ -ln -sf %{mainlibdirbi}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so -ln -sf %{mainlibdirbi}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so -chmod a+x $RPM_BUILD_ROOT%{mainlibdirbi}/libgna*-*.so +mv %{buildroot}/%{versmainlibdirbi}/adalib/lib*-*.so %{buildroot}/%{mainlibdirbi}/ +ln -sf %{mainlibdirbi}/libgnarl%{binsuffix}.so %{buildroot}/%{versmainlibdirbi}/adalib/libgnarl.so +ln -sf %{mainlibdirbi}/libgnat%{binsuffix}.so %{buildroot}/%{versmainlibdirbi}/adalib/libgnarl.so +chmod a+x %{buildroot}/%{mainlibdirbi}/libgna*-*.so %endif %endif -rm -f $RPM_BUILD_ROOT%{_prefix}/bin/c++%{binsuffix} +rm -f %{buildroot}/%{_prefix}/bin/c++%{binsuffix} # Remove some crap from the .la files: -for l in `find $RPM_BUILD_ROOT -name '*.la'`; do +for l in `find %{buildroot} -name '*.la'`; do echo "changing $l" sed -e '/^dependency_libs/s| -L%{_builddir}/[^ ]*||g' \ -e '/^dependency_libs/s| -L/usr/%{GCCDIST}/bin||g' \ @@ -2345,57 +2352,57 @@ chmod 644 ../testresults/* %endif # Remove files that we do not need to clean up filelist -rm -f $RPM_BUILD_ROOT%{_prefix}/bin/%{GCCDIST}-* -rm -rf $RPM_BUILD_ROOT%{libsubdir}/install-tools -rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/zutil.h -rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux/a.out.h -rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux/vt.h -rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-generic/socket.h -rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits/mathdef.h -rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sys/ucontext.h -rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits/statx.h +rm -f %{buildroot}/%{_prefix}/bin/%{GCCDIST}-* +rm -rf %{buildroot}/%{libsubdir}/install-tools +rm -f %{buildroot}/%{libsubdir}/include-fixed/zutil.h +rm -f %{buildroot}/%{libsubdir}/include-fixed/linux/a.out.h +rm -f %{buildroot}/%{libsubdir}/include-fixed/linux/vt.h +rm -f %{buildroot}/%{libsubdir}/include-fixed/asm-generic/socket.h +rm -f %{buildroot}/%{libsubdir}/include-fixed/bits/mathdef.h +rm -f %{buildroot}/%{libsubdir}/include-fixed/sys/ucontext.h +rm -f %{buildroot}/%{libsubdir}/include-fixed/bits/statx.h %if !%{enable_plugins} # no plugins -rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin +rm -rf %{buildroot}/%{libsubdir}/plugin %endif -rm -f $RPM_BUILD_ROOT%{_infodir}/dir +rm -f %{buildroot}/%{_infodir}/dir -rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7 -rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7 -rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7 -rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a +rm -f %{buildroot}/%{_mandir}/man7/fsf-funding.7 +rm -f %{buildroot}/%{_mandir}/man7/gfdl.7 +rm -f %{buildroot}/%{_mandir}/man7/gpl.7 +rm -f %{buildroot}/%{_libdir}/libiberty.a %if %{biarch} %if %{build_primary_64bit} -rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libiberty.a +rm -f %{buildroot}/%{_prefix}/lib/libiberty.a %else -rm -f $RPM_BUILD_ROOT%{_prefix}/lib64/libiberty.a +rm -f %{buildroot}/%{_prefix}/lib64/libiberty.a %endif %endif -rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.a -rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.la +rm -f %{buildroot}/%{libsubdir}/liblto_plugin.a +rm -f %{buildroot}/%{libsubdir}/liblto_plugin.la %if %{build_go} # gccgo.info isn't properly versioned -rm $RPM_BUILD_ROOT%{_infodir}/gccgo.info* -rm -f $RPM_BUILD_ROOT%{libsubdir}/buildid -rm -f $RPM_BUILD_ROOT%{libsubdir}/test2json -rm -f $RPM_BUILD_ROOT%{libsubdir}/vet +rm %{buildroot}/%{_infodir}/gccgo.info* +rm -f %{buildroot}/%{libsubdir}/buildid +rm -f %{buildroot}/%{libsubdir}/test2json +rm -f %{buildroot}/%{libsubdir}/vet %endif # For regular build, some info files do not get renamed properly. # Do so here. -mv $RPM_BUILD_ROOT%{_infodir}/libgomp.info $RPM_BUILD_ROOT%{_infodir}/libgomp%{binsuffix}.info +mv %{buildroot}/%{_infodir}/libgomp.info %{buildroot}/%{_infodir}/libgomp%{binsuffix}.info %ifarch %itm_arch -mv $RPM_BUILD_ROOT%{_infodir}/libitm.info $RPM_BUILD_ROOT%{_infodir}/libitm%{binsuffix}.info +mv %{buildroot}/%{_infodir}/libitm.info %{buildroot}/%{_infodir}/libitm%{binsuffix}.info %endif %if %{build_fortran} %ifarch %quadmath_arch -mv $RPM_BUILD_ROOT%{_infodir}/libquadmath.info $RPM_BUILD_ROOT%{_infodir}/libquadmath%{binsuffix}.info +mv %{buildroot}/%{_infodir}/libquadmath.info %{buildroot}/%{_infodir}/libquadmath%{binsuffix}.info %endif %endif %if %{build_ada} -mv $RPM_BUILD_ROOT%{_infodir}/gnat-style.info $RPM_BUILD_ROOT%{_infodir}/gnat-style%{binsuffix}.info -mv $RPM_BUILD_ROOT%{_infodir}/gnat_rm.info $RPM_BUILD_ROOT%{_infodir}/gnat_rm%{binsuffix}.info -mv $RPM_BUILD_ROOT%{_infodir}/gnat_ugn.info $RPM_BUILD_ROOT%{_infodir}/gnat_ugn%{binsuffix}.info +mv %{buildroot}/%{_infodir}/gnat-style.info %{buildroot}/%{_infodir}/gnat-style%{binsuffix}.info +mv %{buildroot}/%{_infodir}/gnat_rm.info %{buildroot}/%{_infodir}/gnat_rm%{binsuffix}.info +mv %{buildroot}/%{_infodir}/gnat_ugn.info %{buildroot}/%{_infodir}/gnat_ugn%{binsuffix}.info %endif cd .. ++++++ change_spec ++++++ --- /var/tmp/diff_new_pack.fZ7NmF/_old 2019-09-23 12:02:09.313957432 +0200 +++ /var/tmp/diff_new_pack.fZ7NmF/_new 2019-09-23 12:02:09.313957432 +0200 @@ -69,9 +69,11 @@ echo "%define cross_arch $rpmtarget" >> $pkgname.spec echo "%define gcc_target_arch $triplet" >> $pkgname.spec echo "$@" >> $pkgname.spec - { sed -n -e '1,/COMMON-BEGIN/p' cross.spec.in - sed -n -e '/COMMON-BEGIN/,/COMMON-END/p' $outfile - sed -n -e '/COMMON-END/,$p' cross.spec.in; } | + { sed -n -e '1,/SRC-COMMON-BEGIN/p' cross.spec.in + sed -n -e '/SRC-COMMON-BEGIN/,/SRC-COMMON-END/p' $outfile + sed -n -e '/SRC-COMMON-END/,/BUILD-COMMON-BEGIN/p' cross.spec.in + sed -n -e '/BUILD-COMMON-BEGIN/,/BUILD-COMMON-END/p' $outfile + sed -n -e '/BUILD-COMMON-END/,$p' cross.spec.in; } | sed -e "s#@base_ver@#$base_ver#" \ -e "s/^\(ExclusiveArch.*\) $rpmtarget[^ \r]*/\1 /" \ >> $pkgname.spec ++++++ cross.spec.in ++++++ --- /var/tmp/diff_new_pack.fZ7NmF/_old 2019-09-23 12:02:09.385957420 +0200 +++ /var/tmp/diff_new_pack.fZ7NmF/_new 2019-09-23 12:02:09.385957420 +0200 @@ -90,6 +90,8 @@ %endif Name: %{pkgname} +# SRC-COMMON-BEGIN +# SRC-COMMON-END %if "%{cross_arch}" != "nvptx" BuildRequires: cross-%{binutils_target}-binutils Requires: cross-%{binutils_target}-binutils @@ -155,10 +157,23 @@ BuildRequires: update-alternatives Requires(post): update-alternatives Requires(preun): update-alternatives +Summary: The GNU Compiler Collection targeting %{cross_arch} +License: GPL-3.0-or-later + +%description +The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}. +%if 0%{?gcc_icecream:1} +Note this is only useful for building freestanding things like the +kernel since it fails to include target libraries and headers. +%endif +%if 0%{?gcc_libc_bootstrap:1} +This is a package that is necessary for bootstrapping another package +only, it is not intended for any other use. +%endif -# COMMON-BEGIN -# COMMON-END +# BUILD-COMMON-BEGIN +# BUILD-COMMON-END %if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1} make %{?_smp_mflags} %else ++++++ gcc-9.2.1+r274709.tar.xz -> gcc-9.2.1+r275327.tar.xz ++++++ /work/SRC/openSUSE:Factory/gcc9/gcc-9.2.1+r274709.tar.xz /work/SRC/openSUSE:Factory/.gcc9.new.7948/gcc-9.2.1+r275327.tar.xz differ: char 27, line 1 ++++++ gcc.spec.in ++++++ --- /var/tmp/diff_new_pack.fZ7NmF/_old 2019-09-23 12:02:09.425957413 +0200 +++ /var/tmp/diff_new_pack.fZ7NmF/_new 2019-09-23 12:02:09.425957413 +0200 @@ -179,8 +179,10 @@ BuildRequires: mpfr-devel BuildRequires: perl BuildRequires: zlib-devel +%if %{suse_version} >= 1500 # for SDT markers in the C++ unwinder and gdb breakpoints on exceptions BuildRequires: systemtap-headers +%endif %if %{suse_version} >= 1230 BuildRequires: isl-devel %endif @@ -244,16 +246,16 @@ %define build_primary_64bit 0 %endif -# COMMON-BEGIN +# SRC-COMMON-BEGIN %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 9.2.1+r274709 +Version: 9.2.1+r275327 Release: 1 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') %define binsuffix -@base_ver@ -# COMMON-END +# SRC-COMMON-END %if !0%{?building_testsuite:1} Requires: binutils glibc-devel @@ -288,8 +290,8 @@ Suggests: gcc@base_ver@-info gcc@base_ver@-locale %endif -# COMMON-BEGIN -BuildRoot: %{_tmppath}/%{name}-%{version}-build +# SRC-COMMON-BEGIN +Group: Development/Languages/C and C++ Source: gcc-%{version}.tar.xz Source1: change_spec Source2: gcc9-rpmlintrc @@ -308,6 +310,9 @@ Patch18: gcc9-value-prof.patch Patch19: gcc9-add-flto=auto.patch Patch20: gcc9-pr91307.patch +Patch21: gcc9-autodetect-g-at-lto-link.patch +Patch22: gcc9-pr91772.patch +Patch23: gcc9-pr91763.patch # A set of patches from the RH srpm Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian @@ -315,9 +320,9 @@ Patch61: gcc44-rename-info-files.patch # GCC-TESTSUITE-DELETE-BEGIN -Group: Development/Languages/C and C++ -Summary: The GNU C Compiler and Support Files License: GPL-3.0-or-later +# SRC-COMMON-END +Summary: The GNU C Compiler and Support Files %description Core package for the GNU Compiler Collection, including the C language @@ -328,7 +333,6 @@ -# COMMON-END %package -n gcc@base_ver@-32bit Summary: The GNU C Compiler 32bit support Group: Development/Languages/C and C++ @@ -428,7 +432,7 @@ # PACKAGE-BEGIN %package -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}@variant@ Summary: Include Files and Libraries mandatory for Development -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: Development/Languages/C and C++ Requires: libstdc++%{libstdcxx_sover}@variant@ >= %{version}-%{release} Requires: glibc-devel@variant@ @@ -466,7 +470,7 @@ # PACKAGE-BEGIN %package -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}@variant@ Summary: C compiler runtime library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Base Provides: libgcc_s%{libgcc_s}@variant@ = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -484,7 +488,7 @@ # PACKAGE-BEGIN %package -n libgomp%{libgomp_sover}%{libgomp_suffix}@variant@ Summary: The GNU compiler collection OpenMP runtime library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Base Provides: libgomp%{libgomp_sover}@variant@ = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -506,7 +510,7 @@ # PACKAGE-BEGIN %package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}@variant@ Summary: The standard C++ shared library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Libraries Suggests: libstdc++%{libstdcxx_sover}-locale Provides: libstdc++%{libstdcxx_sover}@variant@ = %{version}-%{release} @@ -525,7 +529,7 @@ %package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale Summary: Standard C++ Library Locales -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Libraries Provides: libstdc++%{libstdcxx_sover}-locale = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -568,7 +572,7 @@ # PACKAGE-BEGIN %package -n libobjc%{libobjc_sover}%{libobjc_suffix}@variant@ Summary: Library for the GNU Objective C Compiler -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: Development/Libraries/Other Provides: libobjc%{libobjc_sover}@variant@ = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -626,7 +630,7 @@ # PACKAGE-BEGIN %package -n libada@base_ver@@variant@ Summary: GNU Ada Runtime Libraries -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: System/Libraries Provides: libgnarl-@base_ver@@variant@ = %{version}-%{release} Conflicts: %selfconflict libgnarl-@base_ver@@variant@ @@ -665,7 +669,7 @@ # PACKAGE-BEGIN %package -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}@variant@ Summary: The GNU Fortran Compiler Runtime Library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: Development/Languages/Fortran %ifarch %quadmath_arch Requires: libquadmath%{libquadmath_sover}@variant@ >= %{version}-%{release} @@ -764,7 +768,7 @@ # PACKAGE-BEGIN %package -n libatomic%{libatomic_sover}%{libatomic_suffix}@variant@ Summary: The GNU Compiler Atomic Operations Runtime Library -License: GPL-3.0-or-later WITH GCC-exception-3.1 +License: GPL-3.0-with-GCC-exception Group: Development/Languages/C and C++ Provides: libatomic%{libatomic_sover}@variant@ = %{version}-%{release} # Only one package may provide this - allows multiple gcc versions @@ -936,14 +940,13 @@ # GCC-TESTSUITE-DELETE-END Summary: Testsuite results License: SUSE-Public-Domain -Group: Development/Languages/C and C++ %description -n gcc@base_ver@-testresults Results from running the gcc and target library testsuites. -# COMMON-BEGIN +# SRC-COMMON-BEGIN # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -979,7 +982,7 @@ %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version} %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version} -# COMMON-END +# SRC-COMMON-END # Versionspecific directories %define versmainlibdir %{libsubdir} @@ -1039,7 +1042,7 @@ %endif -# COMMON-BEGIN +# BUILD-COMMON-BEGIN %prep %if 0%{?nvptx_newlib:1} @@ -1065,6 +1068,9 @@ %patch18 -p1 %patch19 -p1 %patch20 +%patch21 +%patch22 +%patch23 %patch51 %patch60 %patch61 @@ -1372,7 +1378,7 @@ --build=%{GCCDIST} \ --host=%{GCCDIST} -# COMMON-END +# BUILD-COMMON-END STAGE1_FLAGS="-g -O2" %if 0%{?do_profiling} && !0%{?building_testsuite:1} @@ -1403,14 +1409,14 @@ # GCC-TESTSUITE-DELETE-BEGIN # Work around tail/head -1 changes export _POSIX2_VERSION=199209 -export LIBRARY_PATH=$RPM_BUILD_ROOT%{libsubdir}:$RPM_BUILD_ROOT%{mainlibdirbi} -make install DESTDIR=$RPM_BUILD_ROOT +export LIBRARY_PATH=%{buildroot}/%{libsubdir}:%{buildroot}/%{mainlibdirbi} +%make_install # verify libasan really ended up with libstdc++ as NEEDED. %ifarch %asan_arch - readelf -d $RPM_BUILD_ROOT%{versmainlibdir}/libasan.so.%{libasan_sover}* | grep 'NEEDED.*libstdc++' || exit 1 + readelf -d %{buildroot}/%{versmainlibdir}/libasan.so.%{libasan_sover}* | grep 'NEEDED.*libstdc++' || exit 1 %if %{biarch} - readelf -d $RPM_BUILD_ROOT%{versmainlibdirbi}/libasan.so.%{libasan_sover}* | grep 'NEEDED.*libstdc++' || exit 1 + readelf -d %{buildroot}/%{versmainlibdirbi}/libasan.so.%{libasan_sover}* | grep 'NEEDED.*libstdc++' || exit 1 %endif %endif @@ -1419,18 +1425,18 @@ libgomp libgomp-plugin-hsa libstdc++ libsupc++ libgo \ libasan libatomic libitm libtsan liblsan libubsan libvtv \ libstdc++fs libgomp-plugin-nvptx libgdruntime libgphobos; do - rm -f $RPM_BUILD_ROOT%{versmainlibdir}/$lib.la + rm -f %{buildroot}/%{versmainlibdir}/$lib.la %if %{biarch} - rm -f $RPM_BUILD_ROOT%{versmainlibdirbi}/$lib.la + rm -f %{buildroot}/%{versmainlibdirbi}/$lib.la %endif done -mkdir -p $RPM_BUILD_ROOT%{_libdir} +mkdir -p %{buildroot}/%{_libdir} %if %{biarch} %if %{build_primary_64bit} -mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib +mkdir -p %{buildroot}/%{_prefix}/lib %else -mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib64 +mkdir -p %{buildroot}/%{_prefix}/lib64 %endif %endif @@ -1460,7 +1466,7 @@ exit 1 fi - cat > $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/bits/c++config.h <<EOF + cat > %{buildroot}/%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/bits/c++config.h <<EOF #ifndef _CPP_CPPCONFIG_WRAPPER #define _CPP_CPPCONFIG_WRAPPER 1 #include <bits/wordsize.h> @@ -1474,9 +1480,9 @@ break fi done -rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/[36]* +rm -rf %{buildroot}/%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/[36]* if ! test -z "$dir_ml"; then - ln -s . $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/$dir_ml + ln -s . %{buildroot}/%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/$dir_ml fi %endif @@ -1530,21 +1536,21 @@ libvtv \ %endif ; do - for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name $libname.so.*`; do - mv $lib $RPM_BUILD_ROOT%{mainlibdir}/ + for lib in `find %{buildroot}/%{versmainlibdir} -maxdepth 1 -name $libname.so.*`; do + mv $lib %{buildroot}/%{mainlibdir}/ done - if test -L $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so; then - ln -sf %{mainlibdir}/`readlink $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \ - $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so + if test -L %{buildroot}/%{versmainlibdir}/$libname.so; then + ln -sf %{mainlibdir}/`readlink %{buildroot}/%{versmainlibdir}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \ + %{buildroot}/%{versmainlibdir}/$libname.so fi %if %{biarch} - if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then - for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name "$libname.so.*"`; do - mv $lib $RPM_BUILD_ROOT%{mainlibdirbi}/ + if test -d %{buildroot}/%{versmainlibdirbi}; then + for lib in `find %{buildroot}/%{versmainlibdirbi} -maxdepth 1 -name "$libname.so.*"`; do + mv $lib %{buildroot}/%{mainlibdirbi}/ done - if test -L $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so; then - ln -sf %{mainlibdirbi}/`readlink $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \ - $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so + if test -L %{buildroot}/%{versmainlibdirbi}/$libname.so; then + ln -sf %{mainlibdirbi}/`readlink %{buildroot}/%{versmainlibdirbi}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \ + %{buildroot}/%{versmainlibdirbi}/$libname.so fi fi %endif @@ -1552,66 +1558,66 @@ %if %{build_cp} # And we want to move the shlib gdb pretty printers to a more sane # place so ldconfig does not complain -mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir} -mv $RPM_BUILD_ROOT%{mainlibdir}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/ -sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/libstdc++.so.*-gdb.py +mkdir -p %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdir} +mv %{buildroot}/%{mainlibdir}/libstdc++.so.*-gdb.py %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdir}/ +sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdir}/libstdc++.so.*-gdb.py %if %{biarch} - if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then - mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi} - mv $RPM_BUILD_ROOT%{mainlibdirbi}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/ - sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/libstdc++.so.*-gdb.py + if test -d %{buildroot}/%{versmainlibdirbi}; then + mkdir -p %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdirbi} + mv %{buildroot}/%{mainlibdirbi}/libstdc++.so.*-gdb.py %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdirbi}/ + sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' %{buildroot}/%{_datadir}/gdb/auto-load%{mainlibdirbi}/libstdc++.so.*-gdb.py fi %endif %endif # Move libgcc_s around -if test -L $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so; then - rm -f $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so - ln -sf /%{_lib}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdir}/libgcc_s.so +if test -L %{buildroot}/%{_lib}/libgcc_s.so; then + rm -f %{buildroot}/%{_lib}/libgcc_s.so + ln -sf /%{_lib}/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdir}/libgcc_s.so else - mv $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdir}/ + mv %{buildroot}/%{_lib}/libgcc_s.so %{buildroot}/%{versmainlibdir}/ fi -chmod a+x $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so.%{libgcc_s} +chmod a+x %{buildroot}/%{_lib}/libgcc_s.so.%{libgcc_s} %if %{biarch} %if %{build_primary_64bit} -if test -L $RPM_BUILD_ROOT/lib/libgcc_s.so; then - rm -f $RPM_BUILD_ROOT/lib/libgcc_s.so - ln -sf /lib/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s.so +if test -L %{buildroot}/lib/libgcc_s.so; then + rm -f %{buildroot}/lib/libgcc_s.so + ln -sf /lib/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi32}/libgcc_s.so else - mv $RPM_BUILD_ROOT/lib/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/ + mv %{buildroot}/lib/libgcc_s.so %{buildroot}/%{versmainlibdirbi32}/ fi -ln -sf %{versmainlibdirbi32}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s_32.so -chmod a+x $RPM_BUILD_ROOT/lib/libgcc_s.so.%{libgcc_s} +ln -sf %{versmainlibdirbi32}/libgcc_s.so %{buildroot}/%{versmainlibdirbi32}/libgcc_s_32.so +chmod a+x %{buildroot}/lib/libgcc_s.so.%{libgcc_s} %else # 32-bit biarch systems -if test -L $RPM_BUILD_ROOT/lib64/libgcc_s.so; then - rm -f $RPM_BUILD_ROOT/lib64/libgcc_s.so - ln -sf /lib64/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s.so +if test -L %{buildroot}/lib64/libgcc_s.so; then + rm -f %{buildroot}/lib64/libgcc_s.so + ln -sf /lib64/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi64}/libgcc_s.so else - mv $RPM_BUILD_ROOT/lib64/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/ + mv %{buildroot}/lib64/libgcc_s.so %{buildroot}/%{versmainlibdirbi64}/ fi -ln -sf %{versmainlibdirbi64}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s_64.so -chmod a+x $RPM_BUILD_ROOT/lib64/libgcc_s.so.%{libgcc_s} +ln -sf %{versmainlibdirbi64}/libgcc_s.so %{buildroot}/%{versmainlibdirbi64}/libgcc_s_64.so +chmod a+x %{buildroot}/lib64/libgcc_s.so.%{libgcc_s} %endif %endif %if %{build_ada} -mv $RPM_BUILD_ROOT%{libsubdir}/adalib/lib*-*.so $RPM_BUILD_ROOT%{_libdir} -ln -sf %{_libdir}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnarl.so -ln -sf %{_libdir}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnat.so -chmod a+x $RPM_BUILD_ROOT%{_libdir}/libgna*-*.so +mv %{buildroot}/%{libsubdir}/adalib/lib*-*.so %{buildroot}/%{_libdir} +ln -sf %{_libdir}/libgnarl%{binsuffix}.so %{buildroot}/%{libsubdir}/adalib/libgnarl.so +ln -sf %{_libdir}/libgnat%{binsuffix}.so %{buildroot}/%{libsubdir}/adalib/libgnat.so +chmod a+x %{buildroot}/%{_libdir}/libgna*-*.so %if %{biarch} -mv $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/lib*-*.so $RPM_BUILD_ROOT%{mainlibdirbi}/ -ln -sf %{mainlibdirbi}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so -ln -sf %{mainlibdirbi}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so -chmod a+x $RPM_BUILD_ROOT%{mainlibdirbi}/libgna*-*.so +mv %{buildroot}/%{versmainlibdirbi}/adalib/lib*-*.so %{buildroot}/%{mainlibdirbi}/ +ln -sf %{mainlibdirbi}/libgnarl%{binsuffix}.so %{buildroot}/%{versmainlibdirbi}/adalib/libgnarl.so +ln -sf %{mainlibdirbi}/libgnat%{binsuffix}.so %{buildroot}/%{versmainlibdirbi}/adalib/libgnarl.so +chmod a+x %{buildroot}/%{mainlibdirbi}/libgna*-*.so %endif %endif -rm -f $RPM_BUILD_ROOT%{_prefix}/bin/c++%{binsuffix} +rm -f %{buildroot}/%{_prefix}/bin/c++%{binsuffix} # Remove some crap from the .la files: -for l in `find $RPM_BUILD_ROOT -name '*.la'`; do +for l in `find %{buildroot} -name '*.la'`; do echo "changing $l" sed -e '/^dependency_libs/s| -L%{_builddir}/[^ ]*||g' \ -e '/^dependency_libs/s| -L/usr/%{GCCDIST}/bin||g' \ @@ -1637,58 +1643,58 @@ %endif # GCC-TESTSUITE-DELETE-BEGIN # Remove files that we do not need to clean up filelist -rm -f $RPM_BUILD_ROOT%{_prefix}/bin/%{GCCDIST}-* -rm -rf $RPM_BUILD_ROOT%{libsubdir}/install-tools -rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/zutil.h -rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux/a.out.h -rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux/vt.h -rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-generic/socket.h -rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits/mathdef.h -rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sys/ucontext.h -rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits/statx.h +rm -f %{buildroot}/%{_prefix}/bin/%{GCCDIST}-* +rm -rf %{buildroot}/%{libsubdir}/install-tools +rm -f %{buildroot}/%{libsubdir}/include-fixed/zutil.h +rm -f %{buildroot}/%{libsubdir}/include-fixed/linux/a.out.h +rm -f %{buildroot}/%{libsubdir}/include-fixed/linux/vt.h +rm -f %{buildroot}/%{libsubdir}/include-fixed/asm-generic/socket.h +rm -f %{buildroot}/%{libsubdir}/include-fixed/bits/mathdef.h +rm -f %{buildroot}/%{libsubdir}/include-fixed/sys/ucontext.h +rm -f %{buildroot}/%{libsubdir}/include-fixed/bits/statx.h %if !%{enable_plugins} # no plugins -rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin +rm -rf %{buildroot}/%{libsubdir}/plugin %endif -rm -f $RPM_BUILD_ROOT%{_infodir}/dir +rm -f %{buildroot}/%{_infodir}/dir -rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7 -rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7 -rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7 -rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a +rm -f %{buildroot}/%{_mandir}/man7/fsf-funding.7 +rm -f %{buildroot}/%{_mandir}/man7/gfdl.7 +rm -f %{buildroot}/%{_mandir}/man7/gpl.7 +rm -f %{buildroot}/%{_libdir}/libiberty.a %if %{biarch} %if %{build_primary_64bit} -rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libiberty.a +rm -f %{buildroot}/%{_prefix}/lib/libiberty.a %else -rm -f $RPM_BUILD_ROOT%{_prefix}/lib64/libiberty.a +rm -f %{buildroot}/%{_prefix}/lib64/libiberty.a %endif %endif -rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.a -rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.la +rm -f %{buildroot}/%{libsubdir}/liblto_plugin.a +rm -f %{buildroot}/%{libsubdir}/liblto_plugin.la %if %{build_go} # gccgo.info isn't properly versioned -rm $RPM_BUILD_ROOT%{_infodir}/gccgo.info* -rm -f $RPM_BUILD_ROOT%{libsubdir}/buildid -rm -f $RPM_BUILD_ROOT%{libsubdir}/test2json -rm -f $RPM_BUILD_ROOT%{libsubdir}/vet +rm %{buildroot}/%{_infodir}/gccgo.info* +rm -f %{buildroot}/%{libsubdir}/buildid +rm -f %{buildroot}/%{libsubdir}/test2json +rm -f %{buildroot}/%{libsubdir}/vet %endif # For regular build, some info files do not get renamed properly. # Do so here. -mv $RPM_BUILD_ROOT%{_infodir}/libgomp.info $RPM_BUILD_ROOT%{_infodir}/libgomp%{binsuffix}.info +mv %{buildroot}/%{_infodir}/libgomp.info %{buildroot}/%{_infodir}/libgomp%{binsuffix}.info %ifarch %itm_arch -mv $RPM_BUILD_ROOT%{_infodir}/libitm.info $RPM_BUILD_ROOT%{_infodir}/libitm%{binsuffix}.info +mv %{buildroot}/%{_infodir}/libitm.info %{buildroot}/%{_infodir}/libitm%{binsuffix}.info %endif %if %{build_fortran} %ifarch %quadmath_arch -mv $RPM_BUILD_ROOT%{_infodir}/libquadmath.info $RPM_BUILD_ROOT%{_infodir}/libquadmath%{binsuffix}.info +mv %{buildroot}/%{_infodir}/libquadmath.info %{buildroot}/%{_infodir}/libquadmath%{binsuffix}.info %endif %endif %if %{build_ada} -mv $RPM_BUILD_ROOT%{_infodir}/gnat-style.info $RPM_BUILD_ROOT%{_infodir}/gnat-style%{binsuffix}.info -mv $RPM_BUILD_ROOT%{_infodir}/gnat_rm.info $RPM_BUILD_ROOT%{_infodir}/gnat_rm%{binsuffix}.info -mv $RPM_BUILD_ROOT%{_infodir}/gnat_ugn.info $RPM_BUILD_ROOT%{_infodir}/gnat_ugn%{binsuffix}.info +mv %{buildroot}/%{_infodir}/gnat-style.info %{buildroot}/%{_infodir}/gnat-style%{binsuffix}.info +mv %{buildroot}/%{_infodir}/gnat_rm.info %{buildroot}/%{_infodir}/gnat_rm%{binsuffix}.info +mv %{buildroot}/%{_infodir}/gnat_ugn.info %{buildroot}/%{_infodir}/gnat_ugn%{binsuffix}.info %endif ++++++ gcc9-autodetect-g-at-lto-link.patch ++++++ Backport of r275640. 2019-09-11 Richard Biener <[email protected]> * lto-opts.c (lto_write_options): Stream -g when debug is enabled. * lto-wrapper.c (merge_and_complain): Pick up -g. (append_compiler_options): Likewise. (run_gcc): Re-instantiate handling -g0 at link-time. * doc/invoke.texi (flto): Document debug info generation. Index: gcc/lto-opts.c =================================================================== --- gcc/lto-opts.c (revision 275454) +++ gcc/lto-opts.c (working copy) @@ -94,6 +94,10 @@ lto_write_options (void) : "-fno-pie"); } + /* If debug info is enabled append -g. */ + if (debug_info_level > DINFO_LEVEL_NONE) + append_to_collect_gcc_options (&temporary_obstack, &first_p, "-g"); + /* Append options from target hook and store them to offload_lto section. */ if (lto_stream_offload_p) { Index: gcc/lto-wrapper.c =================================================================== --- gcc/lto-wrapper.c (revision 275454) +++ gcc/lto-wrapper.c (working copy) @@ -265,6 +265,7 @@ merge_and_complain (struct cl_decoded_op case OPT_fshow_column: case OPT_fcommon: case OPT_fgnu_tm: + case OPT_g: /* Do what the old LTO code did - collect exactly one option setting per OPT code, we pick the first we encounter. ??? This doesn't make too much sense, but when it doesn't @@ -617,6 +618,7 @@ append_compiler_options (obstack *argv_o case OPT_fopenacc: case OPT_fopenacc_dim_: case OPT_foffload_abi_: + case OPT_g: case OPT_O: case OPT_Ofast: case OPT_Og: @@ -1399,6 +1401,10 @@ run_gcc (unsigned argc, char *argv[]) linker_output_rel = !strcmp (option->arg, "rel"); break; + case OPT_g: + /* Recognize -g0. */ + skip_debug = option->arg && !strcmp (option->arg, "0"); + break; default: break; Index: gcc/doc/invoke.texi =================================================================== --- gcc/doc/invoke.texi (revision 275454) +++ gcc/doc/invoke.texi (working copy) @@ -10335,6 +10335,14 @@ conflicting translation units. Specific precedence; and for example @option{-ffp-contract=off} takes precedence over @option{-ffp-contract=fast}. You can override them at link time. +To enable debug info generation you need to supply @option{-g} at +compile-time. If any of the input files at link time were built +with debug info generation enabled the link will enable debug info +generation as well. Any elaborate debug info settings +like the dwarf level @option{-gdwarf-5} need to be explicitely repeated +at the linker command line and mixing different settings in different +translation units is discouraged. + If LTO encounters objects with C linkage declared with incompatible types in separate translation units to be linked together (undefined behavior according to ISO C99 6.2.7), a non-fatal diagnostic may be ++++++ gcc9-pr91763.patch ++++++ 2019-09-18 Richard Biener <[email protected]> PR lto/91763 * lto-streamer-in.c (input_eh_regions): Move EH init to lto_materialize_function. * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers): Likewise. lto/ * lto.c (lto_materialize_function): Initialize EH by looking at the function personality and flag_exceptions setting. Index: gcc/lto-streamer-in.c =================================================================== --- gcc/lto-streamer-in.c (revision 275800) +++ gcc/lto-streamer-in.c (working copy) @@ -615,11 +615,6 @@ input_eh_regions (struct lto_input_block lto_tag_check_range (tag, LTO_eh_table, LTO_eh_table); - /* If the file contains EH regions, then it was compiled with - -fexceptions. In that case, initialize the backend EH - machinery. */ - lto_init_eh (); - gcc_assert (fn->eh); root_region = streamer_read_hwi (ib); Index: gcc/tree-streamer-in.c =================================================================== --- gcc/tree-streamer-in.c (revision 275800) +++ gcc/tree-streamer-in.c (working copy) @@ -800,12 +800,6 @@ lto_input_ts_function_decl_tree_pointers } } #endif - - /* If the file contains a function with an EH personality set, - then it was compiled with -fexceptions. In that case, initialize - the backend EH machinery. */ - if (DECL_FUNCTION_PERSONALITY (expr)) - lto_init_eh (); } Index: gcc/lto/lto.c =================================================================== --- gcc/lto/lto.c (revision 275800) +++ gcc/lto/lto.c (working copy) @@ -218,6 +218,12 @@ lto_materialize_function (struct cgraph_ return; if (DECL_FUNCTION_PERSONALITY (decl) && !first_personality_decl) first_personality_decl = DECL_FUNCTION_PERSONALITY (decl); + /* If the file contains a function with a language specific EH + personality set or with EH enabled initialize the backend EH + machinery. */ + if (DECL_FUNCTION_PERSONALITY (decl) + || opt_for_fn (decl, flag_exceptions)) + lto_init_eh (); } /* Let the middle end know about the function. */ ++++++ gcc9-pr91772.patch ++++++ 2019-09-17 Richard Biener <[email protected]> PR debug/91772 * dwarf2out.c (dwarf2out_late_global_decl): If early dwarf was missing generate locations only once. Index: gcc/dwarf2out.c =================================================================== --- gcc/dwarf2out.c (revision 275800) +++ gcc/dwarf2out.c (working copy) @@ -26647,16 +26651,12 @@ dwarf2out_late_global_decl (tree decl) { dw_die_ref die = lookup_decl_die (decl); - /* We may have to generate early debug late for LTO in case debug + /* We may have to generate full debug late for LTO in case debug was not enabled at compile-time or the target doesn't support the LTO early debug scheme. */ if (! die && in_lto_p) - { - dwarf2out_decl (decl); - die = lookup_decl_die (decl); - } - - if (die) + dwarf2out_decl (decl); + else if (die) { /* We get called via the symtab code invoking late_global_decl for symbols that are optimized out.
