public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gcc] snapshot: Add cross compiler support for Fedora arches, for the time being disabled through macros
@ 2026-08-31 22:38 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2026-08-31 22:38 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/gcc
Branch : snapshot
Commit : 17d24c222ef03674d21261b822fdc0ed45db67af
Author : Jakub Jelinek <jakub@redhat.com>
Date : 2026-08-31T18:36:06-04:00
Stats : +1208/-19 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/gcc/c/17d24c222ef03674d21261b822fdc0ed45db67af?branch=snapshot
Log:
Add cross compiler support for Fedora arches, for the time being disabled through macros
(cherry picked from commit 273717f79559f32f1e20ce08a551bf5cd2e45b61)
---
diff --git a/gcc.spec b/gcc.spec
index 0a2439d..b17559f 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -186,6 +186,48 @@
%global build_offload_amdgcn 0
%global build_offload_nvptx 0
%endif
+%if 0%{?rhel} >= 10
+%ifarch x86_64
+%global build_cross 0
+%else
+%global build_cross 0
+%endif
+%else
+%dnl rhel != 10
+%if 0%{?fedora} >= 45
+%ifnarch %{ix86}
+%global build_cross 0
+%else
+%global build_cross 0
+%endif
+%else
+%global build_cross 0
+%endif
+%endif
+%if 0%{?rhel} >= 10
+%global build_sysroot 0
+%else
+%if 0%{?fedora} >= 45
+%global build_sysroot 0
+%else
+%global build_sysroot 0
+%endif
+%endif
+%global cross_targets aarch64-redhat-linux ppc64le-redhat-linux s390x-redhat-linux x86_64-redhat-linux
+%if %{build_sysroot}
+# sysroot package support (taken from that for glibc). These contain
+# arch-specific packages, so turn off the rpmbuild check.
+%global _binaries_in_noarch_packages_terminate_build 0
+# Variant of %%dist that contains just the distribution release, no affixes.
+%{?fedora:%global sysroot_dist fc%{fedora}}
+%{?rhel:%global sysroot_dist el%{rhel}}
+%{?!sysroot_dist:%global sysroot_dist root}
+# The name of the sysroot package (suffixed with a library name).
+%global sysroot_package_arch sysroot-%{_arch}-%{sysroot_dist}
+# Installed path for the sysroot tree. Must contain /sys-root/, which
+# triggers filtering.
+%global sysroot_prefix /usr/%{_arch}-redhat-linux/sys-root/%{sysroot_dist}
+%endif
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
@@ -1000,6 +1042,306 @@ This package adds a version of the annobin plugin for gcc. This version
of the plugin is explicitly built by the same version of gcc that is installed
so that there cannot be any synchronization problems.
+%package -n cross-gcc-aarch64
+Summary: Cross targeted AArch64 gcc for developer use. Not intended for production.
+Provides: cross-gcc-aarch64 = %{version}-%{release}
+%if %{build_cross}
+%if 0%{?fedora:1}%{?eln:1}
+Requires: binutils-aarch64-linux-gnu >= 2.41
+BuildRequires: binutils-aarch64-linux-gnu >= 2.41
+%else
+Requires: cross-binutils-aarch64 >= 2.41
+BuildRequires: cross-binutils-aarch64 >= 2.41
+%endif
+BuildRequires: sysroot-aarch64-%{sysroot_dist}-glibc >= 2.39
+%endif
+# Don't provide e.g. liblto_plugin.so()(64bit).
+AutoReqProv: no
+
+%description -n cross-gcc-aarch64
+This package contains a version of gcc that can compile code for AArch64
+(cross compiler). This cross compiler is intended for developers to use
+during application development. This cross compiler is not intended for
+production use, and output binary artifacts should not be used in
+production. Generated binary artifacts contain binary annotations that
+mark them as cross compiled.
+
+%package -n cross-gcc-c++-aarch64
+Summary: Cross targeted AArch64 gcc-c++ for developer use. Not intended for production.
+Provides: cross-gcc-c++-aarch64 = %{version}-%{release}
+%if %{build_cross}
+Requires: cross-gcc-aarch64 = %{version}-%{release}
+%endif
+# ??? Otherwise this subpackage couldn't be installed, depends on libm.so
+# and libgcc_s.so
+AutoReqProv: no
+
+%description -n cross-gcc-c++-aarch64
+This package contains a version of g++ that can compile code for AArch64
+(cross compiler). This cross compiler is intended for developers to use
+during application development. This cross compiler is not intended for
+production use, and output binary artifacts should not be used in
+production. Generated binary artifacts contain binary annotations that
+mark them as cross compiled.
+
+%package -n cross-gcc-plugin-aarch64
+Summary: Plugin headers for cross targeted AArch64 gcc for developer use. Not intended for production.
+Provides: cross-gcc-plugin-aarch64 = %{version}-%{release}
+%if %{build_cross}
+Requires: cross-gcc-aarch64 = %{version}-%{release}
+%endif
+AutoReqProv: no
+
+%description -n cross-gcc-plugin-aarch64
+This package contains header files and other support files for compiling GCC
+plugins for use with the non-production AArch64 cross compiler.
+
+%package -n cross-gcc-ppc64le
+Summary: Cross targeted PPC64le gcc for developer use. Not intended for production.
+Provides: cross-gcc-ppc64le = %{version}-%{release}
+%if %{build_cross}
+%if 0%{?fedora:1}%{?eln:1}
+Requires: binutils-powerpc64le-linux-gnu >= 2.41
+BuildRequires: binutils-powerpc64le-linux-gnu >= 2.41
+%else
+Requires: cross-binutils-ppc64le >= 2.41
+BuildRequires: cross-binutils-ppc64le >= 2.41
+%endif
+BuildRequires: sysroot-ppc64le-%{sysroot_dist}-glibc >= 2.39
+%endif
+# Don't provide e.g. liblto_plugin.so()(64bit).
+AutoReqProv: no
+
+%description -n cross-gcc-ppc64le
+This package contains a version of gcc that can compile code for PPC64le
+(cross compiler). This cross compiler is intended for developers to use
+during application development. This cross compiler is not intended for
+production use, and output binary artifacts should not be used in
+production. Generated binary artifacts contain binary annotations that
+mark them as cross compiled.
+
+%package -n cross-gcc-c++-ppc64le
+Summary: Cross targeted PPC64le gcc-c++ for developer use. Not intended for production.
+Provides: cross-gcc-c++-ppc64le = %{version}-%{release}
+%if %{build_cross}
+Requires: cross-gcc-ppc64le = %{version}-%{release}
+%endif
+# ??? Otherwise this subpackage couldn't be installed, depends on libm.so
+# and libgcc_s.so
+AutoReqProv: no
+
+%description -n cross-gcc-c++-ppc64le
+This package contains a version of g++ that can compile code for PPC64le
+(cross compiler). This cross compiler is intended for developers to use
+during application development. This cross compiler is not intended for
+production use, and output binary artifacts should not be used in
+production. Generated binary artifacts contain binary annotations that
+mark them as cross compiled.
+
+%package -n cross-gcc-plugin-ppc64le
+Summary: Plugin headers for cross targeted PPC64le gcc for developer use. Not intended for production.
+Provides: cross-gcc-plugin-ppc64le = %{version}-%{release}
+%if %{build_cross}
+Requires: cross-gcc-ppc64le = %{version}-%{release}
+%endif
+AutoReqProv: no
+
+%description -n cross-gcc-plugin-ppc64le
+This package contains header files and other support files for compiling GCC
+plugins for use with the non-production PPC64le cross compiler.
+
+%package -n cross-gcc-s390x
+Summary: Cross targeted S/390 gcc for developer use. Not intended for production.
+Provides: cross-gcc-s390x = %{version}-%{release}
+%if %{build_cross}
+%if 0%{?fedora:1}%{?eln:1}
+Requires: binutils-s390x-linux-gnu >= 2.41
+BuildRequires: binutils-s390x-linux-gnu >= 2.41
+%else
+Requires: cross-binutils-s390x >= 2.41
+BuildRequires: cross-binutils-s390x >= 2.41
+%endif
+BuildRequires: sysroot-s390x-%{sysroot_dist}-glibc >= 2.39
+%endif
+# Don't provide e.g. liblto_plugin.so()(64bit).
+AutoReqProv: no
+
+%description -n cross-gcc-s390x
+This package contains a version of gcc that can compile code for S/390
+(cross compiler). This cross compiler is intended for developers to use
+during application development. This cross compiler is not intended for
+production use, and output binary artifacts should not be used in
+production. Generated binary artifacts contain binary annotations that
+mark them as cross compiled.
+
+%package -n cross-gcc-c++-s390x
+Summary: Cross targeted S/390 gcc-c++ for developer use. Not intended for production.
+Provides: cross-gcc-c++-s390x = %{version}-%{release}
+%if %{build_cross}
+Requires: cross-gcc-s390x = %{version}-%{release}
+%endif
+# ??? Otherwise this subpackage couldn't be installed, depends on libm.so
+# and libgcc_s.so
+AutoReqProv: no
+
+%description -n cross-gcc-c++-s390x
+This package contains a version of g++ that can compile code for S/390
+(cross compiler). This cross compiler is intended for developers to use
+during application development. This cross compiler is not intended for
+production use, and output binary artifacts should not be used in
+production. Generated binary artifacts contain binary annotations that
+mark them as cross compiled.
+
+%package -n cross-gcc-plugin-s390x
+Summary: Plugin headers for cross targeted S/390 gcc for developer use. Not intended for production.
+Provides: cross-gcc-plugin-s390x = %{version}-%{release}
+%if %{build_cross}
+Requires: cross-gcc-s390x = %{version}-%{release}
+%endif
+AutoReqProv: no
+
+%description -n cross-gcc-plugin-s390x
+This package contains header files and other support files for compiling GCC
+plugins for use with the non-production S/390 cross compiler.
+
+%package -n cross-gcc-x86_64
+Summary: Cross targeted x86-64 gcc for developer use. Not intended for production.
+Provides: cross-gcc-x86_64 = %{version}-%{release}
+%if %{build_cross}
+%if 0%{?fedora:1}%{?eln:1}
+Requires: binutils-x86_64-linux-gnu >= 2.41
+BuildRequires: binutils-x86_64-linux-gnu >= 2.41
+%else
+Requires: cross-binutils-x86_64 >= 2.41
+BuildRequires: cross-binutils-x86_64 >= 2.41
+%endif
+BuildRequires: sysroot-x86_64-%{sysroot_dist}-glibc >= 2.39
+%endif
+# Don't provide e.g. liblto_plugin.so()(64bit).
+AutoReqProv: no
+
+%description -n cross-gcc-x86_64
+This package contains a version of gcc that can compile code for x86-64
+(cross compiler). This cross compiler is intended for developers to use
+during application development. This cross compiler is not intended for
+production use, and output binary artifacts should not be used in
+production. Generated binary artifacts contain binary annotations that
+mark them as cross compiled.
+
+%package -n cross-gcc-c++-x86_64
+Summary: Cross targeted x86-64 gcc-c++ for developer use. Not intended for production.
+Provides: cross-gcc-c++-x86_64 = %{version}-%{release}
+%if %{build_cross}
+Requires: cross-gcc-x86_64 = %{version}-%{release}
+%endif
+# ??? Otherwise this subpackage couldn't be installed, depends on libm.so
+# and libgcc_s.so
+AutoReqProv: no
+
+%description -n cross-gcc-c++-x86_64
+This package contains a version of g++ that can compile code for x86-64
+(cross compiler). This cross compiler is intended for developers to use
+during application development. This cross compiler is not intended for
+production use, and output binary artifacts should not be used in
+production. Generated binary artifacts contain binary annotations that
+mark them as cross compiled.
+
+%package -n cross-gcc-plugin-x86_64
+Summary: Plugin headers for cross targeted x86-64 gcc for developer use. Not intended for production.
+Provides: cross-gcc-plugin-x86_64 = %{version}-%{release}
+%if %{build_cross}
+Requires: cross-gcc-x86_64 = %{version}-%{release}
+%endif
+AutoReqProv: no
+
+%description -n cross-gcc-plugin-x86_64
+This package contains header files and other support files for compiling GCC
+plugins for use with the non-production x86-64 cross compiler.
+
+%package -n %{sysroot_package_arch}-libgcc
+Summary: Sysroot package for libgcc, %{_arch} architecture
+BuildArch: noarch
+Provides: sysroot-%{_arch}-libgcc
+# The files are not usable for execution, so do not provide nor
+# require anything.
+AutoReqProv: no
+
+%description -n %{sysroot_package_arch}-libgcc
+This package contains development files for the libgcc package
+that can be installed across architectures.
+
+%package -n %{sysroot_package_arch}-libgomp
+Summary: Sysroot package for libgomp, %{_arch} architecture
+BuildArch: noarch
+Provides: sysroot-%{_arch}-libgomp
+# The files are not usable for execution, so do not provide nor
+# require anything.
+AutoReqProv: no
+
+%description -n %{sysroot_package_arch}-libgomp
+This package contains development files for the libgomp package
+that can be installed across architectures.
+
+%package -n %{sysroot_package_arch}-libstdc++
+Summary: Sysroot package for libstdc++, %{_arch} architecture
+BuildArch: noarch
+Provides: sysroot-%{_arch}-libstdc++
+# The files are not usable for execution, so do not provide nor
+# require anything.
+AutoReqProv: no
+
+%description -n %{sysroot_package_arch}-libstdc++
+This package contains development files for the libstdc++ package
+that can be installed across architectures.
+
+%package -n %{sysroot_package_arch}-libatomic
+Summary: Sysroot package for libatomic, %{_arch} architecture
+BuildArch: noarch
+Provides: sysroot-%{_arch}-libatomic
+# The files are not usable for execution, so do not provide nor
+# require anything.
+AutoReqProv: no
+
+%description -n %{sysroot_package_arch}-libatomic
+This package contains development files for the libatomic package
+that can be installed across architectures.
+
+%package -n %{sysroot_package_arch}-libitm
+Summary: Sysroot package for libitm, %{_arch} architecture
+BuildArch: noarch
+Provides: sysroot-%{_arch}-libitm
+# The files are not usable for execution, so do not provide nor
+# require anything.
+AutoReqProv: no
+
+%description -n %{sysroot_package_arch}-libitm
+This package contains development files for the libitm package
+that can be installed across architectures.
+
+%package -n %{sysroot_package_arch}-libsanitizer
+Summary: Sysroot package for sanitizer libraries, %{_arch} architecture
+BuildArch: noarch
+Provides: sysroot-%{_arch}-libsanitizer
+# The files are not usable for execution, so do not provide nor
+# require anything.
+AutoReqProv: no
+
+%description -n %{sysroot_package_arch}-libsanitizer
+This package contains development files for the sanitizer library packages
+that can be installed across architectures.
+
+%package -n %{sysroot_package_arch}-test-support
+Summary: GCC testsuite support files, %{_arch} architecture
+BuildArch: noarch
+Provides: sysroot-%{_arch}-test-support
+# The files are not usable for execution, so do not provide nor
+# require anything.
+AutoReqProv: no
+
+%description -n %{sysroot_package_arch}-test-support
+This package contains files from the GCC build to support running the GCC
+testsuites that can be installed across architectures.
+
%prep
%setup -q -n %{gcc_basedir} -a 1 -a 2 -a 3
%if %{snapshot_build}
@@ -1029,7 +1371,9 @@ rm -f gcc/testsuite/go.test/test/fixedbugs/issue19182.go
rm -f libphobos/testsuite/libphobos.gc/forkgc2.d
#rm -rf libphobos/testsuite/libphobos.gc
-echo 'Red Hat %{version}-%{gcc_release}%{gcc_release_suffix}' > gcc/DEV-PHASE
+echo 'Red Hat %{version}-%{gcc_release}%{gcc_release_suffix}' > gcc/DEV-PHASE.native
+echo 'Red Hat %{version}-%{gcc_release}%{gcc_release_suffix} cross from %{_arch}' > gcc/DEV-PHASE.cross
+cp -p gcc/DEV-PHASE{.native,}
./contrib/gcc_update --touch
@@ -1228,10 +1572,45 @@ offloadtgts=nvptx-none
%if %{build_offload_amdgcn}
offloadtgts=${offloadtgts:+${offloadtgts},}amdgcn-amdhsa
%endif
-CONFIGURE_OPTS="\
+# CONFIGURE_OPTS_BASE are the configure options common to the native and cross
+# builds. E.g., --prefix. This cannot include arch-specific configure options.
+# CONFIGURE_OPTS_NATIVE are the configure options used for the native build
+# (that is, the regular non-cross build) and libgccjit. This includes arch-specific
+# configure options (default -march and such).
+# CONFIGURE_OPTS = CONFIGURE_OPTS_BASE + CONFIGURE_OPTS_NATIVE
+# CONFIGURE_OPTS_CROSS are the configure options common to all the cross
+# builds. E.g., only build C/C++. This shall not be used for the native build.
+# Each cross compiler's configure options will be:
+# CONFIGURE_OPTS_BASE + CONFIGURE_OPTS_CROSS + --target= + --with-sysroot= + <arch-specific-opts>
+# It it very important that the arch-specific configure options used in
+# CONFIGURE_OPTS_NATIVE are in lockstep with the <arch-specific-opts>
+# used in the cross builds.
+CONFIGURE_OPTS_BASE="\
--prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
--with-bugurl=%dist_bug_report_url \
--enable-shared --enable-threads=posix --enable-checking=release \
+ --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions \
+ --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only \
+ --enable-plugin --enable-initfini-array \
+ --enable-libstdcxx-backtrace --with-libstdcxx-zoneinfo=%{_datadir}/zoneinfo \
+%if %{build_isl}
+ --with-isl=`pwd`/isl-install \
+%else
+ --without-isl \
+%endif
+%if 0%{?rhel:1}
+ --enable-host-pie --enable-host-bind-now \
+%endif
+%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
+%if %{attr_ifunc}
+ --enable-gnu-indirect-function \
+%endif
+%endif
+ "
+
+# NB: When updating CONFIGURE_OPTS_NATIVE, make sure to update the cross
+# compiler options as well (look for CONFIGURE_OPTS_FOR_ARCH).
+CONFIGURE_OPTS_NATIVE="\
%ifarch ppc64le
--enable-targets=powerpcle-linux \
%endif
@@ -1248,29 +1627,15 @@ CONFIGURE_OPTS="\
%else
--enable-multilib \
%endif
- --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions \
- --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only \
- --enable-libstdcxx-backtrace --with-libstdcxx-zoneinfo=%{_datadir}/zoneinfo \
%ifnarch %{mips}
--with-linker-hash-style=gnu \
%endif
- --enable-plugin --enable-initfini-array \
-%if %{build_isl}
- --with-isl=`pwd`/isl-install \
-%else
- --without-isl \
-%endif
%if %{build_offload_nvptx} || %{build_offload_amdgcn}
--enable-offload-targets=$offloadtgts --enable-offload-defaulted \
%endif
%if %{build_offload_nvptx}
--without-cuda-driver \
%endif
-%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
-%if %{attr_ifunc}
- --enable-gnu-indirect-function \
-%endif
-%endif
%ifarch %{arm}
--disable-sjlj-exceptions \
%endif
@@ -1400,9 +1765,6 @@ CONFIGURE_OPTS="\
--with-build-config=bootstrap-lto --enable-link-serialization=1 \
%endif
%endif
-%if 0%{?rhel:1}
- --enable-host-pie --enable-host-bind-now \
-%endif
--disable-libssp \
%if %{build_libquadmath} == 0
--disable-libquadmath \
@@ -1417,6 +1779,13 @@ CONFIGURE_OPTS="\
--disable-libsanitizer \
%endif
"
+CONFIGURE_OPTS="$CONFIGURE_OPTS_BASE $CONFIGURE_OPTS_NATIVE"
+
+CONFIGURE_OPTS_CROSS="\
+ --enable-languages=c,c++ --disable-bootstrap \
+ --host=%{gcc_target_platform} --build=%{gcc_target_platform} \
+ --disable-multilib --disable-libstdcxx-pch --disable-libcc1 \
+ "
CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \
CXXFLAGS="`echo " $OPT_FLAGS " | sed 's/ -Wall / /g;s/ -fexceptions / /g' \
@@ -1457,6 +1826,113 @@ make jit.sphinx.html
make jit.sphinx.install-html jit_htmldir=`pwd`/../../rpm.doc/libgccjit-devel/html
cd ..
+# Build cross compilers here.
+%if %{build_cross}
+echo ==================== BUILD CROSS =========================
+# Get out of obj-%{gcc_target_platform}.
+pushd ..
+for crossarch in %{cross_targets}; do
+ CONFIGURE_OPTS_FOR_ARCH=
+ case $crossarch in
+ aarch64*)
+%ifarch aarch64
+ continue
+%endif
+ CONFIGURE_OPTS_FOR_ARCH="$CONFIGURE_OPTS_FOR_ARCH --disable-libquadmath"
+ ;;
+ s390x*)
+%ifarch s390x
+ continue
+%endif
+%if 0%{?rhel} >= 11
+ CONFIGURE_OPTS_FOR_ARCH="--with-arch=z15 --with-tune=z17"
+%else
+%if 0%{?rhel} >= 10
+ CONFIGURE_OPTS_FOR_ARCH="--with-arch=z14 --with-tune=z16"
+%else
+%if 0%{?fedora} >= 45
+ CONFIGURE_OPTS_FOR_ARCH="--with-arch=z15 --with-tune=z17"
+%endif
+%endif
+%endif
+ CONFIGURE_OPTS_FOR_ARCH="$CONFIGURE_OPTS_FOR_ARCH --enable-decimal-float"
+ CONFIGURE_OPTS_FOR_ARCH="$CONFIGURE_OPTS_FOR_ARCH --disable-libquadmath"
+ ;;
+ ppc64le*)
+%ifarch ppc64le
+ continue
+%endif
+%if 0%{?rhel} >= 10
+ CONFIGURE_OPTS_FOR_ARCH="--with-cpu-32=power9 --with-tune-32=power10 --with-cpu-64=power9 --with-tune-64=power10"
+%else
+ CONFIGURE_OPTS_FOR_ARCH="--with-cpu-32=power8 --with-tune-32=power8 --with-cpu-64=power8 --with-tune-64=power8"
+%endif
+ CONFIGURE_OPTS_FOR_ARCH="$CONFIGURE_OPTS_FOR_ARCH --enable-secureplt --with-long-double-format=ieee --enable-targets=powerpcle-linux"
+ ;;
+ x86_64*)
+%ifarch x86_64
+ continue
+%endif
+%if 0%{?rhel} >= 10
+ CONFIGURE_OPTS_FOR_ARCH="--with-arch_64=x86-64-v3 --with-arch_32=x86-64"
+%else
+ CONFIGURE_OPTS_FOR_ARCH="--with-arch_32=i686"
+%endif
+ CONFIGURE_OPTS_FOR_ARCH="$CONFIGURE_OPTS_FOR_ARCH --enable-cet --with-tune=generic"
+%if 0%{?fedora} >= 44 || 0%{?rhel} >= 11
+ CONFIGURE_OPTS_FOR_ARCH="$CONFIGURE_OPTS_FOR_ARCH --with-tls=gnu2"
+%endif
+ ;;
+ *)
+ echo >&2 "ERROR: unknown cross arch $crossarch"
+ exit 1
+ ;;
+ esac
+ CONFIGURE_OPTS_FOR_ARCH="$CONFIGURE_OPTS_FOR_ARCH --with-linker-hash-style=gnu --disable-libssp"
+
+ mkdir obj-$crossarch
+ cd obj-$crossarch
+
+ # Workaround for Fedora/ELN cross-binutils providing *-linux-gnu-{as,ld} etc.
+ # programs rather then the RHEL *-redhat-linux-{as,ld} etc.
+%if 0%{?fedora:1}%{?eln:1}
+ OLDPATH=$PATH
+ ALTCROSS=`echo $crossarch | sed 's/redhat-linux/linux-gnu/;s/ppc64le/powerpc64le/'`
+ mkdir binutils-bin
+ for i in addr2line ar as c++filt ld ld.bfd nm objcopy objdump ranlib readelf \
+ size strings strip; do
+ ln -sf %{_prefix}/bin/${ALTCROSS}-$i binutils-bin/${crossarch}-$i
+ done
+ PATH=`pwd`/binutils-bin:$PATH
+%endif
+
+ # Temporarily replace DEV-PHASE.
+ cp -p ../gcc/DEV-PHASE{.cross,}
+
+ CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \
+ CXXFLAGS="`echo " $OPT_FLAGS " | sed 's/ -Wall / /g;s/ -fexceptions / /g' \
+ | sed 's/ -Wformat-security / -Wformat -Wformat-security /'`" \
+ XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \
+ ../configure $CONFIGURE_OPTS_BASE $CONFIGURE_OPTS_CROSS \
+ --with-sysroot=/usr/$crossarch/sys-root/%{sysroot_dist}/ \
+ --with-gxx-include-dir="/usr/$crossarch/sys-root/%{sysroot_dist}/%{_prefix}/include/c++/%{gcc_major}" \
+ --target=$crossarch \
+ $CONFIGURE_OPTS_FOR_ARCH
+ make %{?_smp_mflags} LDFLAGS_FOR_TARGET=-Wl,-z,relro,-z,now
+
+%if 0%{?fedora:1}%{?eln:1}
+ PATH=$OLDPATH
+%endif
+ # Restore DEV-PHASE.
+ cp -p ../gcc/DEV-PHASE{.native,}
+ # Out of obj-$crossarch.
+ cd ..
+done
+# Go back to obj-%{gcc_target_platform}.
+popd
+echo ==================== BUILD CROSS END =========================
+%endif
+
%if %{build_isl}
cp -a isl-install/lib/libisl.so.23 gcc/
%endif
@@ -1672,6 +2148,261 @@ make prefix=%{buildroot}%{_prefix} mandir=%{buildroot}%{_mandir} \
chmod 644 %{buildroot}%{_infodir}/gnat*
%endif
+%if %{build_cross}
+echo ==================== INSTALL CROSS =========================
+# Out of obj-%{gcc_target_platform}.
+pushd ..
+for crossarch in %{cross_targets}; do
+ [ -d obj-$crossarch ] || continue
+ cd obj-$crossarch
+
+ CROSS_LIBPATH=%{buildroot}%{_prefix}/lib/gcc/$crossarch/%{gcc_major}/
+
+ # Temporarily replace DEV-PHASE.
+ cp -p ../gcc/DEV-PHASE{.cross,}
+
+ # Workaround for Fedora/ELN cross-binutils providing *-linux-gnu-{as,ld} etc.
+ # programs rather then the RHEL *-redhat-linux-{as,ld} etc.
+%if 0%{?fedora:1}%{?eln:1}
+ OLDPATH=$PATH
+ PATH=`pwd`/binutils-bin:$PATH
+%endif
+
+ # --with-gxx-include-dir= doesn't prefix its argument with $(DESTDIR)
+ # and you can't install things into /usr unless you're root.
+ mkdir scratch
+ scratchdir=`pwd`/scratch
+ pushd $crossarch/libstdc++-v3
+ for i in `find . -name Makefile`; do
+ cp -a $i $i.save
+ sed -i -e 's?^gxx_include_dir = .*$?gxx_include_dir = '$scratchdir'?' $i
+ touch -r $i.save $i
+ done
+ popd
+
+ # Use -j1, because build-many-glibcs says:
+ # Parallel "make install" for GCC has race conditions that can
+ # cause it to fail; see
+ # <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42980>. Such
+ # problems are not known for binutils, but doing the
+ # installation in parallel within a particular toolchain build
+ # (as opposed to installation of one toolchain from
+ # build-many-glibcs.py running in parallel to the installation
+ # of other toolchains being built) is not known to be
+ # significantly beneficial, so it is simplest just to disable
+ # parallel install for cross tools here.
+ make -j1 prefix=%{buildroot}%{_prefix} mandir=%{buildroot}%{_mandir} \
+ infodir=%{buildroot}%{_infodir} install
+
+ # Restore DEV-PHASE.
+ cp -p ../gcc/DEV-PHASE{.native,}
+
+ # Restore Makefiles with the old gxx_include_dir.
+ pushd $crossarch/libstdc++-v3
+ for i in `find . -name Makefile`; do
+ mv -f $i.save $i
+ done
+ popd
+ # We're not shipping C++ headers; nuke 'em.
+ rm -rf $scratchdir
+
+ # We do not ship these and GDB fails with:
+ # *** ERROR:: GDB exited with exit status 1 during index generation
+ rm -rf %{buildroot}%{_prefix}/$crossarch/lib64/libssp.so.*
+ rm -rf %{buildroot}%{_prefix}/$crossarch/lib64/libitm.so.*
+ rm -rf %{buildroot}%{_prefix}/$crossarch/lib64/libgomp.so.*
+ rm -rf %{buildroot}%{_prefix}/$crossarch/lib64/libatomic.so.*
+ rm -rf %{buildroot}%{_prefix}/$crossarch/lib64/libstdc++.so.*
+ rm -rf %{buildroot}%{_prefix}/$crossarch/lib64/libquadmath.so.*
+ rm -rf %{buildroot}%{_prefix}/$crossarch/lib64/libasan.so.*
+ rm -rf %{buildroot}%{_prefix}/$crossarch/lib64/libhwasan.so.*
+ rm -rf %{buildroot}%{_prefix}/$crossarch/lib64/libtsan.so.*
+ rm -rf %{buildroot}%{_prefix}/$crossarch/lib64/liblsan.so.*
+ rm -rf %{buildroot}%{_prefix}/$crossarch/lib64/libubsan.so.*
+
+ # Move libgomp.spec to where it belongs for %files.
+ mv $crossarch/libgomp/libgomp.spec $CROSS_LIBPATH
+ # Likewise for libitm.spec
+ %if %{build_libitm}
+ mv $crossarch/libitm/libitm.spec $CROSS_LIBPATH
+ %endif
+ # Likewise for libsanitizer.spec
+ mv $crossarch/libsanitizer/libsanitizer.spec $CROSS_LIBPATH
+
+ # Workaround for Fedora/ELN cross-binutils providing *-linux-gnu-{as,ld} etc.
+ # programs rather then the RHEL *-redhat-linux-{as,ld} etc.
+%if %{?fedora:1}%{?eln:1}
+ ALTCROSS=`echo $crossarch | sed 's/redhat-linux/linux-gnu/;s/ppc64le/powerpc64le/'`
+ for i in as ld ld.bfd nm strip; do
+ ln -sf ../../../../bin/${ALTCROSS}-$i \
+ %{buildroot}%{_prefix}/libexec/gcc/$crossarch/%{gcc_major}/$i
+ done
+%endif
+
+ cd ..
+
+ # No longer present.
+ #pushd $CROSS_LIBPATH
+ #mv include-fixed/syslimits.h include/syslimits.h
+ #mv include-fixed/limits.h include/limits.h
+ #popd
+
+ case $crossarch in
+ aarch64*)
+ OUTPUT_FORMAT_FOR_ARCH="elf64-littleaarch64"
+ ;;
+ s390x*)
+ OUTPUT_FORMAT_FOR_ARCH="elf64-s390"
+ ;;
+ ppc64le*)
+ OUTPUT_FORMAT_FOR_ARCH="elf64-powerpcle"
+ ;;
+ x86_64*)
+ OUTPUT_FORMAT_FOR_ARCH="elf64-x86-64"
+ ;;
+ *)
+ echo >&2 "ERROR: unknown cross arch $crossarch"
+ exit 1
+ ;;
+ esac
+
+ # The sysroot package creation should copy the same files as
+ # referenced in these linker scripts to the sysroot package
+ # location.
+ echo "/* GNU ld script
+ Use the shared library, but some functions are only in
+ the static library. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+GROUP ( =/lib64/libgcc_s.so.1 libgcc.a )" > $CROSS_LIBPATH/libgcc_s.so
+
+ echo "/* GNU ld script
+ Add DT_NEEDED entry for libgcc_s.so only if needed. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT ( AS_NEEDED ( -lgcc_s ) )" > $CROSS_LIBPATH/libgcc_s_asneeded.so
+
+ echo "/* GNU ld script
+ Use the shared library from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT ( =%{_prefix}/lib64/libgomp.so.1 )" > $CROSS_LIBPATH/libgomp.so
+
+ echo "/* GNU ld script
+ Use the shared library from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT ( =/%{_prefix}/lib64/libstdc++.so.6 )" > $CROSS_LIBPATH/libstdc++.so
+
+ echo "/* GNU ld script
+ Use the static library from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT( =%{_prefix}/lib/gcc/$crossarch/%{gcc_major}/libstdc++.a )" > $CROSS_LIBPATH/libstdc++.a
+
+ echo "/* GNU ld script
+ Use the static library from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT( =%{_prefix}/lib/gcc/$crossarch/%{gcc_major}/libstdc++fs.a )" > $CROSS_LIBPATH/libstdc++fs.a
+
+ echo "/* GNU ld script
+ Use the static library from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT( =%{_prefix}/lib/gcc/$crossarch/%{gcc_major}/libstdc++exp.a )" > $CROSS_LIBPATH/libstdc++exp.a
+
+ echo "/* GNU ld script
+ Use the static library from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT( =%{_prefix}/lib/gcc/$crossarch/%{gcc_major}/libsupc++.a )" > $CROSS_LIBPATH/libsupc++.a
+
+ echo "/* GNU ld script
+ Use the shared library from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT ( =%{_prefix}/lib64/libatomic.so.1 )" > $CROSS_LIBPATH/libatomic.so
+
+ echo "/* GNU ld script
+ Add DT_NEEDED entry for -latomic only if needed. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT ( AS_NEEDED ( -latomic ) )" > $CROSS_LIBPATH/libatomic_asneeded.so
+
+ echo "/* GNU ld script
+ Use the static library from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT( =%{_prefix}/lib/gcc/$crossarch/%{gcc_major}/libatomic.a )" > $CROSS_LIBPATH/libatomic.a
+
+ ln -sf libatomic.a $CROSS_LIBPATH/libatomic_asneeded.a
+
+ echo "/* GNU ld script
+ Use the shared library from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT ( =%{_prefix}/lib64/libitm.so.1 )" > $CROSS_LIBPATH/libitm.so
+
+ echo "/* GNU ld script
+ Use the static library from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT( =%{_prefix}/lib/gcc/$crossarch/%{gcc_major}/libitm.a )" > $CROSS_LIBPATH/libitm.a
+
+ echo "/* GNU ld script
+ Use the shared library from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT ( =%{_prefix}/lib64/libasan.so.8 )" > $CROSS_LIBPATH/libasan.so
+
+ echo "/* GNU ld script
+ Use the object from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT( =%{_prefix}/lib/gcc/$crossarch/%{gcc_major}/libasan_preinit.o )" > $CROSS_LIBPATH/libasan_preinit.o
+
+ case $crossarch in
+ aarch64* | x86_64*)
+ echo "/* GNU ld script
+ Use the shared library from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT ( =%{_prefix}/lib64/libhwasan.so.0 )" > $CROSS_LIBPATH/libhwasan.so
+ ;;
+ esac
+
+ echo "/* GNU ld script
+ Use the object from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT( =%{_prefix}/lib/gcc/$crossarch/%{gcc_major}/libhwasan_preinit.o )" > $CROSS_LIBPATH/libhwasan_preinit.o
+
+ echo "/* GNU ld script
+ Use the shared library from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT ( =%{_prefix}/lib64/libtsan.so.2 )" > $CROSS_LIBPATH/libtsan.so
+
+ echo "/* GNU ld script
+ Use the object from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT( =%{_prefix}/lib/gcc/$crossarch/%{gcc_major}/libtsan_preinit.o )" > $CROSS_LIBPATH/libtsan_preinit.o
+
+ echo "/* GNU ld script
+ Use the shared library from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT ( =%{_prefix}/lib64/liblsan.so.0 )" > $CROSS_LIBPATH/liblsan.so
+
+ echo "/* GNU ld script
+ Use the object from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT( =%{_prefix}/lib/gcc/$crossarch/%{gcc_major}/liblsan_preinit.o )" > $CROSS_LIBPATH/liblsan_preinit.o
+
+ echo "/* GNU ld script
+ Use the shared library from sysroot. */
+OUTPUT_FORMAT($OUTPUT_FORMAT_FOR_ARCH)
+INPUT ( =%{_prefix}/lib64/libubsan.so.1 )" > $CROSS_LIBPATH/libubsan.so
+
+ # Help plugins find out nvra.
+ echo gcc-%{version}-%{release}.%{_arch} > $CROSS_LIBPATH/rpmver
+
+%if 0%{?fedora:1}%{?eln:1}
+ PATH=$OLDPATH
+%endif
+
+ # TODO
+ # Add symlink to lto plugin in the binutils plugin directory.
+ #%{__mkdir_p} %{buildroot}%{_libdir}/bfd-plugins/
+ #ln -s ../../libexec/gcc/$crossarch/%{gcc_major}/liblto_plugin.so \
+ # %{buildroot}%{_libdir}/$crossarch/bfd-plugins/
+done
+# Back to obj-%{gcc_target_platform}.
+popd
+echo ==================== INSTALL CROSS END =========================
+%endif
FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}
FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}
@@ -2642,6 +3373,63 @@ ln -sf gcc-annobin.so.0.0.0 $FULLPATH/plugin/gcc-annobin.so.0
ln -sf gcc-annobin.so.0.0.0 $FULLPATH/plugin/gcc-annobin.so
%endif
+%if %{build_sysroot}
+###############################################################################
+# Sysroot package creation.
+###############################################################################
+mkdir -p %{buildroot}/%{sysroot_prefix}
+pushd %{buildroot}/%{sysroot_prefix}
+mkdir -p usr/lib usr/lib64
+ln -s usr/lib lib
+ln -s usr/lib64 lib64
+# These match the files referenced in linker scripts generated for cross
+# compilers.
+for f in /%{_lib}/libgcc_s.so.1 \
+ %{_prefix}/%{_lib}/libgomp.so.1 \
+ %{_prefix}/%{_lib}/libstdc++.so.6 \
+ %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libstdc++.a \
+ %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libstdc++fs.a \
+ %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libstdc++exp.a \
+ %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libsupc++.a \
+%if %{build_libatomic}
+ %{_prefix}/%{_lib}/libatomic.so.1 \
+ %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic.a \
+%endif
+%if %{build_libitm}
+ %{_prefix}/%{_lib}/libitm.so.1 \
+ %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libitm.a \
+%endif
+%if %{build_libasan}
+ %{_prefix}/%{_lib}/libasan.so.8 \
+ %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libasan_preinit.o \
+%endif
+%if %{build_libhwasan}
+ %{_prefix}/%{_lib}/libhwasan.so.0 \
+ %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libhwasan_preinit.o \
+%endif
+%if %{build_libtsan}
+ %{_prefix}/%{_lib}/libtsan.so.2 \
+ %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libtsan_preinit.o \
+%endif
+%if %{build_liblsan}
+ %{_prefix}/%{_lib}/liblsan.so.0 \
+ %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/liblsan_preinit.o \
+%endif
+%if %{build_libubsan}
+ %{_prefix}/%{_lib}/libubsan.so.1 \
+%%endif
+ ; do
+ mkdir -p %{buildroot}/%{sysroot_prefix}/$(dirname $f)
+ cp %{buildroot}$f %{buildroot}/%{sysroot_prefix}/$f
+done
+mkdir -p usr/include
+cp -a %{buildroot}%{_prefix}/include/c++ usr/include/c++
+popd
+# For cross testing.
+mkdir %{buildroot}/%{sysroot_prefix}/test-support
+cp obj-%{gcc_target_platform}/gcc/auto-host.h %{buildroot}/%{sysroot_prefix}/test-support/
+%endif
+
%check
cd obj-%{gcc_target_platform}
@@ -4028,7 +4816,408 @@ end
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/gcc-annobin.so.0.0.0
%endif
+%if %{build_cross}
+%ifnarch aarch64
+%files -n cross-gcc-aarch64
+%{_prefix}/bin/aarch64-redhat-linux-cpp
+%{_prefix}/bin/aarch64-redhat-linux-gcc
+%{_prefix}/bin/aarch64-redhat-linux-gcc-%{gcc_major}
+%{_prefix}/bin/aarch64-redhat-linux-gcc-ar
+%{_prefix}/bin/aarch64-redhat-linux-gcc-nm
+%{_prefix}/bin/aarch64-redhat-linux-gcc-ranlib
+%{_prefix}/bin/aarch64-redhat-linux-gcov*
+%{_prefix}/bin/aarch64-redhat-linux-lto-dump
+%{_prefix}/libexec/gcc/aarch64-redhat-linux/%{gcc_major}/cc1
+%{_prefix}/libexec/gcc/aarch64-redhat-linux/%{gcc_major}/collect2
+%{_prefix}/libexec/gcc/aarch64-redhat-linux/%{gcc_major}/lto1
+%{_prefix}/libexec/gcc/aarch64-redhat-linux/%{gcc_major}/lto-wrapper
+%{_prefix}/libexec/gcc/aarch64-redhat-linux/%{gcc_major}/liblto_plugin.so
+%if 0%{?fedora:1}%{?eln:1}
+%{_prefix}/libexec/gcc/aarch64-redhat-linux/%{gcc_major}/as
+%{_prefix}/libexec/gcc/aarch64-redhat-linux/%{gcc_major}/ld
+%{_prefix}/libexec/gcc/aarch64-redhat-linux/%{gcc_major}/ld.bfd
+%{_prefix}/libexec/gcc/aarch64-redhat-linux/%{gcc_major}/nm
+%{_prefix}/libexec/gcc/aarch64-redhat-linux/%{gcc_major}/strip
+%endif
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/aarch64-redhat-linux
+%dir %{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}
+%dir %{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/include
+%dir %{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/include/sanitizer
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/crt*.o
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libgcc.a
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libgcc_eh.a
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libgcov.a
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/include/*.h
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/include/sanitizer/*.h
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/rpmver
+# These are here for ld(1) purposes only.
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libgcc_s.so
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libgcc_s_asneeded.so
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libgomp.so
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libgomp.spec
+%if %{build_libatomic}
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libatomic.so
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libatomic_asneeded.so
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libatomic.a
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libatomic_asneeded.a
+%endif
+%if %{build_libitm}
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libitm.so
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libitm.a
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libitm.spec
+%endif
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libasan.so
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libasan_preinit.o
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libhwasan.so
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libhwasan_preinit.o
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libtsan.so
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libtsan_preinit.o
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/liblsan.so
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/liblsan_preinit.o
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libubsan.so
+
+%files -n cross-gcc-c++-aarch64
+%{_prefix}/bin/aarch64-redhat-linux-c++
+%{_prefix}/bin/aarch64-redhat-linux-g++
+%{_prefix}/libexec/gcc/aarch64-redhat-linux/%{gcc_major}/cc1plus
+%{_prefix}/libexec/gcc/aarch64-redhat-linux/%{gcc_major}/g++-mapper-server
+# For ld(1) purposes only.
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libstdc++.so
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libstdc++.a
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libstdc++fs.a
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libstdc++exp.a
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/libsupc++.a
+
+%files -n cross-gcc-plugin-aarch64
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/aarch64-redhat-linux
+%dir %{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}
+%dir %{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/plugin
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/plugin/gtype.state
+%{_prefix}/lib/gcc/aarch64-redhat-linux/%{gcc_major}/plugin/include
+%dir %{_prefix}/libexec/gcc
+%dir %{_prefix}/libexec/gcc/aarch64-redhat-linux
+%dir %{_prefix}/libexec/gcc/aarch64-redhat-linux/%{gcc_major}
+%{_prefix}/libexec/gcc/aarch64-redhat-linux/%{gcc_major}/plugin
+%endif
+
+%ifnarch ppc64le
+%files -n cross-gcc-ppc64le
+%{_prefix}/bin/ppc64le-redhat-linux-cpp
+%{_prefix}/bin/ppc64le-redhat-linux-gcc
+%{_prefix}/bin/ppc64le-redhat-linux-gcc-%{gcc_major}
+%{_prefix}/bin/ppc64le-redhat-linux-gcc-ar
+%{_prefix}/bin/ppc64le-redhat-linux-gcc-nm
+%{_prefix}/bin/ppc64le-redhat-linux-gcc-ranlib
+%{_prefix}/bin/ppc64le-redhat-linux-gcov*
+%{_prefix}/bin/ppc64le-redhat-linux-lto-dump
+%{_prefix}/libexec/gcc/ppc64le-redhat-linux/%{gcc_major}/cc1
+%{_prefix}/libexec/gcc/ppc64le-redhat-linux/%{gcc_major}/collect2
+%{_prefix}/libexec/gcc/ppc64le-redhat-linux/%{gcc_major}/lto1
+%{_prefix}/libexec/gcc/ppc64le-redhat-linux/%{gcc_major}/lto-wrapper
+%{_prefix}/libexec/gcc/ppc64le-redhat-linux/%{gcc_major}/liblto_plugin.so
+%if 0%{?fedora:1}%{?eln:1}
+%{_prefix}/libexec/gcc/ppc64le-redhat-linux/%{gcc_major}/as
+%{_prefix}/libexec/gcc/ppc64le-redhat-linux/%{gcc_major}/ld
+%{_prefix}/libexec/gcc/ppc64le-redhat-linux/%{gcc_major}/ld.bfd
+%{_prefix}/libexec/gcc/ppc64le-redhat-linux/%{gcc_major}/nm
+%{_prefix}/libexec/gcc/ppc64le-redhat-linux/%{gcc_major}/strip
+%endif
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/ppc64le-redhat-linux
+%dir %{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}
+%dir %{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/include
+%dir %{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/include/sanitizer
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/crt*.o
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libgcc.a
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libgcc_eh.a
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libgcov.a
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/include/*.h
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/include/sanitizer/*.h
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/rpmver
+# These are here for ld(1) purposes only.
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libgcc_s.so
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libgcc_s_asneeded.so
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libgomp.so
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libgomp.spec
+%if %{build_libatomic}
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libatomic.so
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libatomic_asneeded.so
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libatomic.a
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libatomic_asneeded.a
+%endif
+%if %{build_libitm}
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libitm.so
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libitm.a
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libitm.spec
+%endif
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libasan.so
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libasan_preinit.o
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libtsan.so
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libtsan_preinit.o
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/liblsan.so
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/liblsan_preinit.o
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libubsan.so
+
+%files -n cross-gcc-c++-ppc64le
+%{_prefix}/bin/ppc64le-redhat-linux-c++
+%{_prefix}/bin/ppc64le-redhat-linux-g++
+%{_prefix}/libexec/gcc/ppc64le-redhat-linux/%{gcc_major}/cc1plus
+%{_prefix}/libexec/gcc/ppc64le-redhat-linux/%{gcc_major}/g++-mapper-server
+# For ld(1) purposes only.
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libstdc++.so
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libstdc++.a
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libstdc++fs.a
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libstdc++exp.a
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/libsupc++.a
+
+%files -n cross-gcc-plugin-ppc64le
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/ppc64le-redhat-linux
+%dir %{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}
+%dir %{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/plugin
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/plugin/gtype.state
+%{_prefix}/lib/gcc/ppc64le-redhat-linux/%{gcc_major}/plugin/include
+%dir %{_prefix}/libexec/gcc
+%dir %{_prefix}/libexec/gcc/ppc64le-redhat-linux
+%dir %{_prefix}/libexec/gcc/ppc64le-redhat-linux/%{gcc_major}
+%{_prefix}/libexec/gcc/ppc64le-redhat-linux/%{gcc_major}/plugin
+%endif
+
+%ifnarch s390x
+%files -n cross-gcc-s390x
+%{_prefix}/bin/s390x-redhat-linux-cpp
+%{_prefix}/bin/s390x-redhat-linux-gcc
+%{_prefix}/bin/s390x-redhat-linux-gcc-%{gcc_major}
+%{_prefix}/bin/s390x-redhat-linux-gcc-ar
+%{_prefix}/bin/s390x-redhat-linux-gcc-nm
+%{_prefix}/bin/s390x-redhat-linux-gcc-ranlib
+%{_prefix}/bin/s390x-redhat-linux-gcov*
+%{_prefix}/bin/s390x-redhat-linux-lto-dump
+%{_prefix}/libexec/gcc/s390x-redhat-linux/%{gcc_major}/cc1
+%{_prefix}/libexec/gcc/s390x-redhat-linux/%{gcc_major}/collect2
+%{_prefix}/libexec/gcc/s390x-redhat-linux/%{gcc_major}/lto1
+%{_prefix}/libexec/gcc/s390x-redhat-linux/%{gcc_major}/lto-wrapper
+%{_prefix}/libexec/gcc/s390x-redhat-linux/%{gcc_major}/liblto_plugin.so
+%if 0%{?fedora:1}%{?eln:1}
+%{_prefix}/libexec/gcc/s390x-redhat-linux/%{gcc_major}/as
+%{_prefix}/libexec/gcc/s390x-redhat-linux/%{gcc_major}/ld
+%{_prefix}/libexec/gcc/s390x-redhat-linux/%{gcc_major}/ld.bfd
+%{_prefix}/libexec/gcc/s390x-redhat-linux/%{gcc_major}/nm
+%{_prefix}/libexec/gcc/s390x-redhat-linux/%{gcc_major}/strip
+%endif
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/s390x-redhat-linux
+%dir %{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}
+%dir %{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/include
+%dir %{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/include/sanitizer
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/crt*.o
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libgcc.a
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libgcc_eh.a
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libgcov.a
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/include/*.h
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/include/sanitizer/*.h
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/rpmver
+# These are here for ld(1) purposes only.
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libgcc_s.so
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libgcc_s_asneeded.so
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libgomp.so
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libgomp.spec
+%if %{build_libatomic}
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libatomic.so
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libatomic_asneeded.so
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libatomic.a
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libatomic_asneeded.a
+%endif
+%if %{build_libitm}
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libitm.so
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libitm.a
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libitm.spec
+%endif
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libasan.so
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libasan_preinit.o
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libtsan.so
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libtsan_preinit.o
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/liblsan.so
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/liblsan_preinit.o
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libubsan.so
+
+%files -n cross-gcc-c++-s390x
+%{_prefix}/bin/s390x-redhat-linux-c++
+%{_prefix}/bin/s390x-redhat-linux-g++
+%{_prefix}/libexec/gcc/s390x-redhat-linux/%{gcc_major}/cc1plus
+%{_prefix}/libexec/gcc/s390x-redhat-linux/%{gcc_major}/g++-mapper-server
+# For ld(1) purposes only.
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libstdc++.so
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libstdc++.a
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libstdc++fs.a
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libstdc++exp.a
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/libsupc++.a
+
+%files -n cross-gcc-plugin-s390x
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/s390x-redhat-linux
+%dir %{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}
+%dir %{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/plugin
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/plugin/gtype.state
+%{_prefix}/lib/gcc/s390x-redhat-linux/%{gcc_major}/plugin/include
+%dir %{_prefix}/libexec/gcc
+%dir %{_prefix}/libexec/gcc/s390x-redhat-linux
+%dir %{_prefix}/libexec/gcc/s390x-redhat-linux/%{gcc_major}
+%{_prefix}/libexec/gcc/s390x-redhat-linux/%{gcc_major}/plugin
+%endif
+
+%ifnarch x86_64
+%files -n cross-gcc-x86_64
+%{_prefix}/bin/x86_64-redhat-linux-cpp
+%{_prefix}/bin/x86_64-redhat-linux-gcc
+%{_prefix}/bin/x86_64-redhat-linux-gcc-%{gcc_major}
+%{_prefix}/bin/x86_64-redhat-linux-gcc-ar
+%{_prefix}/bin/x86_64-redhat-linux-gcc-nm
+%{_prefix}/bin/x86_64-redhat-linux-gcc-ranlib
+%{_prefix}/bin/x86_64-redhat-linux-gcov*
+%{_prefix}/bin/x86_64-redhat-linux-lto-dump
+%{_prefix}/libexec/gcc/x86_64-redhat-linux/%{gcc_major}/cc1
+%{_prefix}/libexec/gcc/x86_64-redhat-linux/%{gcc_major}/collect2
+%{_prefix}/libexec/gcc/x86_64-redhat-linux/%{gcc_major}/lto1
+%{_prefix}/libexec/gcc/x86_64-redhat-linux/%{gcc_major}/lto-wrapper
+%{_prefix}/libexec/gcc/x86_64-redhat-linux/%{gcc_major}/liblto_plugin.so
+%if 0%{?fedora:1}%{?eln:1}
+%{_prefix}/libexec/gcc/x86_64-redhat-linux/%{gcc_major}/as
+%{_prefix}/libexec/gcc/x86_64-redhat-linux/%{gcc_major}/ld
+%{_prefix}/libexec/gcc/x86_64-redhat-linux/%{gcc_major}/ld.bfd
+%{_prefix}/libexec/gcc/x86_64-redhat-linux/%{gcc_major}/nm
+%{_prefix}/libexec/gcc/x86_64-redhat-linux/%{gcc_major}/strip
+%endif
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/x86_64-redhat-linux
+%dir %{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}
+%dir %{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/include
+%dir %{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/include/sanitizer
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/crt*.o
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libgcc.a
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libgcc_eh.a
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libgcov.a
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/include/*.h
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/include/sanitizer/*.h
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/rpmver
+# These are here for ld(1) purposes only.
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libgcc_s.so
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libgcc_s_asneeded.so
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libgomp.so
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libgomp.spec
+%if %{build_libatomic}
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libatomic.so
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libatomic_asneeded.so
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libatomic.a
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libatomic_asneeded.a
+%endif
+%if %{build_libitm}
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libitm.so
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libitm.a
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libitm.spec
+%endif
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libasan.so
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libasan_preinit.o
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libtsan.so
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libtsan_preinit.o
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/liblsan.so
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/liblsan_preinit.o
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libubsan.so
+
+%files -n cross-gcc-c++-x86_64
+%{_prefix}/bin/x86_64-redhat-linux-c++
+%{_prefix}/bin/x86_64-redhat-linux-g++
+%{_prefix}/libexec/gcc/x86_64-redhat-linux/%{gcc_major}/cc1plus
+%{_prefix}/libexec/gcc/x86_64-redhat-linux/%{gcc_major}/g++-mapper-server
+# For ld(1) purposes only.
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libstdc++.so
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libstdc++.a
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libstdc++fs.a
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libstdc++exp.a
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/libsupc++.a
+
+%files -n cross-gcc-plugin-x86_64
+%dir %{_prefix}/lib/gcc
+%dir %{_prefix}/lib/gcc/x86_64-redhat-linux
+%dir %{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}
+%dir %{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/plugin
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/plugin/gtype.state
+%{_prefix}/lib/gcc/x86_64-redhat-linux/%{gcc_major}/plugin/include
+%dir %{_prefix}/libexec/gcc
+%dir %{_prefix}/libexec/gcc/x86_64-redhat-linux
+%dir %{_prefix}/libexec/gcc/x86_64-redhat-linux/%{gcc_major}
+%{_prefix}/libexec/gcc/x86_64-redhat-linux/%{gcc_major}/plugin
+%endif
+
+%dnl build_cross
+%endif
+
+%if %{build_sysroot}
+%files -n %{sysroot_package_arch}-libgcc
+# Package the symlinks into usr/ here.
+%{sysroot_prefix}/lib
+%{sysroot_prefix}/lib64
+%{sysroot_prefix}%{_prefix}/%{_lib}/libgcc_s.so.1
+
+%files -n %{sysroot_package_arch}-libgomp
+%{sysroot_prefix}%{_prefix}/%{_lib}/libgomp.so.1
+
+%files -n %{sysroot_package_arch}-libstdc++
+%{sysroot_prefix}%{_prefix}/include/c++
+%{sysroot_prefix}%{_prefix}/%{_lib}/libstdc++.so.6
+%{sysroot_prefix}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libstdc++.a
+%{sysroot_prefix}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libstdc++fs.a
+%{sysroot_prefix}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libstdc++exp.a
+%{sysroot_prefix}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libsupc++.a
+
+%if %{build_libatomic}
+%files -n %{sysroot_package_arch}-libatomic
+%{sysroot_prefix}%{_prefix}/%{_lib}/libatomic.so.1
+%{sysroot_prefix}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libatomic.a
+%endif
+
+%if %{build_libitm}
+%files -n %{sysroot_package_arch}-libitm
+%{sysroot_prefix}%{_prefix}/%{_lib}/libitm.so.1
+%{sysroot_prefix}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libitm.a
+%endif
+
+%files -n %{sysroot_package_arch}-libsanitizer
+%if %{build_libasan}
+%{sysroot_prefix}%{_prefix}/%{_lib}/libasan.so.8
+%{sysroot_prefix}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libasan_preinit.o
+%endif
+%if %{build_libhwasan}
+%{sysroot_prefix}%{_prefix}/%{_lib}/libhwasan.so.0
+%{sysroot_prefix}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libhwasan_preinit.o
+%endif
+%if %{build_libtsan}
+%{sysroot_prefix}%{_prefix}/%{_lib}/libtsan.so.2
+%{sysroot_prefix}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/libtsan_preinit.o
+%endif
+%if %{build_liblsan}
+%{sysroot_prefix}%{_prefix}/%{_lib}/liblsan.so.0
+%{sysroot_prefix}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/liblsan_preinit.o
+%endif
+%if %{build_libubsan}
+%{sysroot_prefix}%{_prefix}/%{_lib}/libubsan.so.1
+%endif
+
+%files -n %{sysroot_package_arch}-test-support
+# Package the symlinks into usr/ here.
+%{sysroot_prefix}/test-support
+%{sysroot_prefix}/test-support/auto-host.h
+
+%dnl build_cross
+%endif
+
%changelog
+* Fri Aug 21 2026 Jakub Jelinek <jakub@redhat.com>
+- add cross compiler support for Fedora arches, for the time being
+ disabled through macros
+
* Tue Aug 18 2026 David Malcolm <dmalcolm@redhat.com> gcc-17.0.0-999.20260818s.0
- update from trunk
- PRs ada/126379, ada/126482, ada/126553, algol68/126330, analyzer/97114,
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-31 22:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-31 22:38 [rpms/gcc] snapshot: Add cross compiler support for Fedora arches, for the time being disabled through macros Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox