diff --git a/change_spec b/change_spec index 1e0b78f..36e48d0 100644 --- a/change_spec +++ b/change_spec @@ -69,9 +69,11 @@ add_cross() { 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 diff --git a/cross-aarch64-gcc7.changes b/cross-aarch64-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-aarch64-gcc7.changes +++ b/cross-aarch64-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-aarch64-gcc7.spec b/cross-aarch64-gcc7.spec index 93f5baa..dfd004b 100644 --- a/cross-aarch64-gcc7.spec +++ b/cross-aarch64-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-arm-gcc7.changes b/cross-arm-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-arm-gcc7.changes +++ b/cross-arm-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-arm-gcc7.spec b/cross-arm-gcc7.spec index 71763b5..5705f00 100644 --- a/cross-arm-gcc7.spec +++ b/cross-arm-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-arm-none-gcc7-bootstrap.changes b/cross-arm-none-gcc7-bootstrap.changes index 35fa989..b866a71 100644 --- a/cross-arm-none-gcc7-bootstrap.changes +++ b/cross-arm-none-gcc7-bootstrap.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-arm-none-gcc7-bootstrap.spec b/cross-arm-none-gcc7-bootstrap.spec index d3c6939..6ec4b1c 100644 --- a/cross-arm-none-gcc7-bootstrap.spec +++ b/cross-arm-none-gcc7-bootstrap.spec @@ -100,6 +100,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -167,86 +232,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-arm-none-gcc7.changes b/cross-arm-none-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-arm-none-gcc7.changes +++ b/cross-arm-none-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-arm-none-gcc7.spec b/cross-arm-none-gcc7.spec index ef184bb..f2ccc7f 100644 --- a/cross-arm-none-gcc7.spec +++ b/cross-arm-none-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-avr-gcc7-bootstrap.changes b/cross-avr-gcc7-bootstrap.changes index 35fa989..b866a71 100644 --- a/cross-avr-gcc7-bootstrap.changes +++ b/cross-avr-gcc7-bootstrap.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-avr-gcc7-bootstrap.spec b/cross-avr-gcc7-bootstrap.spec index fa52ce8..40f36e1 100644 --- a/cross-avr-gcc7-bootstrap.spec +++ b/cross-avr-gcc7-bootstrap.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-avr-gcc7.changes b/cross-avr-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-avr-gcc7.changes +++ b/cross-avr-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-avr-gcc7.spec b/cross-avr-gcc7.spec index 53c03db..7f399ed 100644 --- a/cross-avr-gcc7.spec +++ b/cross-avr-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-epiphany-gcc7-bootstrap.changes b/cross-epiphany-gcc7-bootstrap.changes index 35fa989..b866a71 100644 --- a/cross-epiphany-gcc7-bootstrap.changes +++ b/cross-epiphany-gcc7-bootstrap.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-epiphany-gcc7-bootstrap.spec b/cross-epiphany-gcc7-bootstrap.spec index b17b310..4ea8c6c 100644 --- a/cross-epiphany-gcc7-bootstrap.spec +++ b/cross-epiphany-gcc7-bootstrap.spec @@ -100,6 +100,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -167,86 +232,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-epiphany-gcc7.changes b/cross-epiphany-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-epiphany-gcc7.changes +++ b/cross-epiphany-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-epiphany-gcc7.spec b/cross-epiphany-gcc7.spec index dcaec9c..9aadb6b 100644 --- a/cross-epiphany-gcc7.spec +++ b/cross-epiphany-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-hppa-gcc7.changes b/cross-hppa-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-hppa-gcc7.changes +++ b/cross-hppa-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-hppa-gcc7.spec b/cross-hppa-gcc7.spec index 2c2e97a..44bbd25 100644 --- a/cross-hppa-gcc7.spec +++ b/cross-hppa-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-i386-gcc7.changes b/cross-i386-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-i386-gcc7.changes +++ b/cross-i386-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-i386-gcc7.spec b/cross-i386-gcc7.spec index ea11ff0..d767f3f 100644 --- a/cross-i386-gcc7.spec +++ b/cross-i386-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-m68k-gcc7.changes b/cross-m68k-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-m68k-gcc7.changes +++ b/cross-m68k-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-m68k-gcc7.spec b/cross-m68k-gcc7.spec index dbd890a..ec56507 100644 --- a/cross-m68k-gcc7.spec +++ b/cross-m68k-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-mips-gcc7.changes b/cross-mips-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-mips-gcc7.changes +++ b/cross-mips-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-mips-gcc7.spec b/cross-mips-gcc7.spec index 90de266..9d9e622 100644 --- a/cross-mips-gcc7.spec +++ b/cross-mips-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-nvptx-gcc7.changes b/cross-nvptx-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-nvptx-gcc7.changes +++ b/cross-nvptx-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-nvptx-gcc7.spec b/cross-nvptx-gcc7.spec index 04c19f0..06de28a 100644 --- a/cross-nvptx-gcc7.spec +++ b/cross-nvptx-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-ppc64-gcc7.changes b/cross-ppc64-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-ppc64-gcc7.changes +++ b/cross-ppc64-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-ppc64-gcc7.spec b/cross-ppc64-gcc7.spec index f4c3389..e1ed685 100644 --- a/cross-ppc64-gcc7.spec +++ b/cross-ppc64-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-ppc64le-gcc7.changes b/cross-ppc64le-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-ppc64le-gcc7.changes +++ b/cross-ppc64le-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-ppc64le-gcc7.spec b/cross-ppc64le-gcc7.spec index f5479f3..86c45a6 100644 --- a/cross-ppc64le-gcc7.spec +++ b/cross-ppc64le-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-rx-gcc7-bootstrap.changes b/cross-rx-gcc7-bootstrap.changes index 35fa989..b866a71 100644 --- a/cross-rx-gcc7-bootstrap.changes +++ b/cross-rx-gcc7-bootstrap.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-rx-gcc7-bootstrap.spec b/cross-rx-gcc7-bootstrap.spec index 0f4ff93..e5cbebb 100644 --- a/cross-rx-gcc7-bootstrap.spec +++ b/cross-rx-gcc7-bootstrap.spec @@ -100,6 +100,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -167,86 +232,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-rx-gcc7.changes b/cross-rx-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-rx-gcc7.changes +++ b/cross-rx-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-rx-gcc7.spec b/cross-rx-gcc7.spec index ef836a9..4671dd2 100644 --- a/cross-rx-gcc7.spec +++ b/cross-rx-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-s390x-gcc7.changes b/cross-s390x-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-s390x-gcc7.changes +++ b/cross-s390x-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-s390x-gcc7.spec b/cross-s390x-gcc7.spec index f00c69c..551ec42 100644 --- a/cross-s390x-gcc7.spec +++ b/cross-s390x-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-sparc-gcc7.changes b/cross-sparc-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-sparc-gcc7.changes +++ b/cross-sparc-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-sparc-gcc7.spec b/cross-sparc-gcc7.spec index 364e7bf..aebf2d2 100644 --- a/cross-sparc-gcc7.spec +++ b/cross-sparc-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-sparc64-gcc7.changes b/cross-sparc64-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-sparc64-gcc7.changes +++ b/cross-sparc64-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-sparc64-gcc7.spec b/cross-sparc64-gcc7.spec index 8d653de..e566ee7 100644 --- a/cross-sparc64-gcc7.spec +++ b/cross-sparc64-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross-x86_64-gcc7.changes b/cross-x86_64-gcc7.changes index 35fa989..b866a71 100644 --- a/cross-x86_64-gcc7.changes +++ b/cross-x86_64-gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/cross-x86_64-gcc7.spec b/cross-x86_64-gcc7.spec index 46ef164..2ad2d59 100644 --- a/cross-x86_64-gcc7.spec +++ b/cross-x86_64-gcc7.spec @@ -99,6 +99,71 @@ %endif Name: %{pkgname} +%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 + +URL: https://gcc.gnu.org/ +Version: 7.4.1+r275405 +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 -7 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: gcc-%{version}.tar.xz +Source1: change_spec +Source3: gcc7-rpmlintrc +Source4: README.First-for.SuSE.packagers +Source5: nvptx-newlib.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 +Patch10: gcc5-no-return-gcc43-workaround.patch +Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch +Patch12: gcc7-stack-probe.diff +Patch14: gcc7-pr82248.diff +Patch15: gcc7-avoid-fixinc-error.diff +Patch17: gcc7-flive-patching.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 @@ -166,86 +231,21 @@ Conflicts: cross-%{cross_arch}-gcc7 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: 7.4.1+r275405 -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 -7 -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source: gcc-%{version}.tar.xz -Source1: change_spec -Source3: gcc7-rpmlintrc -Source4: README.First-for.SuSE.packagers -Source5: nvptx-newlib.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 -Patch10: gcc5-no-return-gcc43-workaround.patch -Patch11: gcc7-remove-Wexpansion-to-defined-from-Wextra.patch -Patch12: gcc7-stack-probe.diff -Patch14: gcc7-pr82248.diff -Patch15: gcc7-avoid-fixinc-error.diff -Patch17: gcc7-flive-patching.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/;") +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%{?disable_32bit:1} -%define biarch 0 -%else -%define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac) +%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 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} - %prep %if 0%{?nvptx_newlib:1} %setup -q -n gcc-%{version} -a 5 diff --git a/cross.spec.in b/cross.spec.in index c508f6b..022ce63 100644 --- a/cross.spec.in +++ b/cross.spec.in @@ -78,6 +78,8 @@ %endif Name: %{pkgname} +# SRC-COMMON-BEGIN +# SRC-COMMON-END %if "%{cross_arch}" != "nvptx" BuildRequires: cross-%{binutils_target}-binutils Requires: cross-%{binutils_target}-binutils @@ -145,10 +147,22 @@ Conflicts: cross-%{cross_arch}-gcc@base_ver@ 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 -# COMMON-BEGIN -# COMMON-END +%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 +# BUILD-COMMON-BEGIN +# BUILD-COMMON-END %if 0%{!?gcc_icecream:1} && 0%{!?gcc_libc_bootstrap:1} make %{?_smp_mflags} %else diff --git a/gcc.spec.in b/gcc.spec.in index e81cbe7..e46df57 100644 --- a/gcc.spec.in +++ b/gcc.spec.in @@ -235,7 +235,7 @@ BuildRequires: gdb %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/ @@ -244,7 +244,7 @@ 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 @@ -286,7 +286,8 @@ Requires: libmpxwrappers%{libmpxwrappers_sover} >= %{version}-%{release} Suggests: gcc@base_ver@-info gcc@base_ver@-locale %endif -# COMMON-BEGIN +# SRC-COMMON-BEGIN +Group: Development/Languages/C and C++ BuildRoot: %{_tmppath}/%{name}-%{version}-build Source: gcc-%{version}.tar.xz Source1: change_spec @@ -312,9 +313,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+ +# SRC-COMMON-END +Summary: The GNU C Compiler and Support Files %description Core package for the GNU Compiler Collection, including the C language @@ -325,7 +326,6 @@ namely gcc-ada, gcc-c++, gcc-fortran, gcc-obj, gcc-obj-c++ and gcc-go. -# COMMON-END %package -n gcc@base_ver@-32bit Summary: The GNU C Compiler 32bit support Group: Development/Languages/C and C++ @@ -939,7 +939,7 @@ 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 @@ -975,7 +975,7 @@ Results from running the gcc and target library testsuites. %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} @@ -1035,7 +1035,7 @@ Results from running the gcc and target library testsuites. %endif -# COMMON-BEGIN +# BUILD-COMMON-BEGIN %prep %if 0%{?nvptx_newlib:1} @@ -1356,7 +1356,7 @@ nvptx-none=%{_prefix}/nvptx-none, \ --build=%{GCCDIST} \ --host=%{GCCDIST} -# COMMON-END +# BUILD-COMMON-END STAGE1_FLAGS="-g -O2" %if 0%{?do_profiling} diff --git a/gcc7-testresults.changes b/gcc7-testresults.changes index 35fa989..b866a71 100644 --- a/gcc7-testresults.changes +++ b/gcc7-testresults.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener diff --git a/gcc7.changes b/gcc7.changes index 35fa989..b866a71 100644 --- a/gcc7.changes +++ b/gcc7.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Sep 9 07:33:54 UTC 2019 - Richard Biener + +- Rework shared spec file parts to allow custom Summary and + Description for cross compilers. Clarify their Summary + and Description. [bsc#1148517] +- Reorder things in cross.spec.in so the Version define comes before + the first use of %version. + ------------------------------------------------------------------- Thu Sep 5 13:29:56 UTC 2019 - Richard Biener