Add cross compilers for aarch64, ppc64le and s390x for non-production uses

Resolves: RHEL-114519
This commit is contained in:
Marek Polacek 2025-10-10 16:16:46 -04:00
parent 3da838f917
commit ad2ef88163

531
gcc.spec
View File

@ -140,10 +140,21 @@
%else
%global build_annobin_plugin 0
%endif
%if 0%{?rhel} == 10
%ifarch x86_64
%global build_cross 1
%else
%global build_cross 0
%endif
%else
%dnl rhel != 10
%global build_cross 0
%endif
%global cross_targets aarch64-redhat-linux ppc64le-redhat-linux s390x-redhat-linux
Summary: Various compilers (C, C++, Objective-C, ...)
Name: gcc
Version: %{gcc_version}
Release: %{gcc_release}.2%{?dist}
Release: %{gcc_release}.3%{?dist}
# License notes for some of the less obvious ones:
# gcc/doc/cppinternals.texi: Linux-man-pages-copyleft-2-para
# isl: MIT, BSD-2-Clause
@ -893,6 +904,123 @@ 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}
Requires: cross-binutils-aarch64 >= 2.41
BuildRequires: sysroot-aarch64-el10-glibc >= 2.39
BuildRequires: cross-binutils-aarch64 >= 2.41
%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}
BuildRequires: sysroot-aarch64-el10-glibc >= 2.39
BuildRequires: cross-binutils-aarch64 >= 2.41
%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-ppc64le
Summary: Cross targeted PPC64le gcc for developer use. Not intended for production.
Provides: cross-gcc-ppc64le = %{version}-%{release}
%if %{build_cross}
Requires: cross-binutils-ppc64le >= 2.41
BuildRequires: sysroot-ppc64le-el10-glibc >= 2.39
BuildRequires: cross-binutils-ppc64le >= 2.41
%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}
BuildRequires: sysroot-ppc64le-el10-glibc >= 2.39
BuildRequires: cross-binutils-ppc64le >= 2.41
%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-s390x
Summary: Cross targeted S/390 gcc for developer use. Not intended for production.
Provides: cross-gcc-s390x = %{version}-%{release}
%if %{build_cross}
Requires: cross-binutils-s390x >= 2.41
BuildRequires: sysroot-s390x-el10-glibc >= 2.39
BuildRequires: cross-binutils-s390x >= 2.41
%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}
BuildRequires: sysroot-s390x-el10-glibc >= 2.39
BuildRequires: cross-binutils-s390x >= 2.41
%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.
%prep
%setup -q -n gcc-%{version}-%{DATE} -a 1 -a 2 -a 3
%patch -P0 -p0 -b .hack~
@ -932,7 +1060,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/DEV-PHASE
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE.native
echo 'Red Hat %{version}-%{gcc_release} cross from %{_arch}' > gcc/DEV-PHASE.cross
cp -p gcc/DEV-PHASE{.native,}
cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
@ -1124,10 +1254,40 @@ 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=http://bugzilla.redhat.com/bugzilla \
--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
"
# 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
@ -1144,17 +1304,8 @@ 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 \
@ -1287,9 +1438,13 @@ 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
"
CONFIGURE_OPTS="$CONFIGURE_OPTS_BASE $CONFIGURE_OPTS_NATIVE"
CONFIGURE_OPTS_CROSS="\
--enable-languages=c,c++ --disable-bootstrap --disable-libsanitizer \
--host=%{gcc_target_platform} --build=%{gcc_target_platform} \
--disable-multilib --disable-libstdcxx-pch --disable-libcc1 \
"
CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \
@ -1331,6 +1486,55 @@ 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
mkdir obj-$crossarch
cd obj-$crossarch
case $crossarch in
aarch64*)
CONFIGURE_OPTS_FOR_ARCH=""
;;
s390x*)
CONFIGURE_OPTS_FOR_ARCH="--with-arch=z14 --with-tune=z16"
;;
ppc64le*)
CONFIGURE_OPTS_FOR_ARCH="--with-cpu-32=power9 --with-tune-32=power10 --with-cpu-64=power9 --with-tune-64=power10"
;;
*)
echo >&2 "ERROR: unknown cross arch $crossarch"
exit 1
;;
esac
# 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/el10/ \
--with-gxx-include-dir="/usr/$crossarch/sys-root/el10/%{_prefix}/include/c++/%{gcc_major}" \
--target=$crossarch \
$CONFIGURE_OPTS_FOR_ARCH
make %{?_smp_mflags} LDFLAGS_FOR_TARGET=-Wl,-z,relro,-z,now
# 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
@ -1528,6 +1732,151 @@ 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
cd obj-$crossarch
CROSS_LIBPATH=%{buildroot}%{_prefix}/lib/gcc/$crossarch/%{gcc_major}/
# Temporarily replace DEV-PHASE.
cp -p ../gcc/DEV-PHASE{.cross,}
# --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 therse 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.*
# 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
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"
;;
*)
echo >&2 "ERROR: unknown cross arch $crossarch"
exit 1
;;
esac
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
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. */
INPUT( =%{_prefix}/lib/gcc/$crossarch/%{gcc_major}/libstdc++.a )" > $CROSS_LIBPATH/libstdc++.a
echo "/* GNU ld script
Use the static library from sysroot. */
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
Use the static library from sysroot. */
INPUT( =%{_prefix}/lib/gcc/$crossarch/%{gcc_major}/libatomic.a )" > $CROSS_LIBPATH/libatomic.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. */
INPUT( =%{_prefix}/lib/gcc/$crossarch/%{gcc_major}/libitm.a )" > $CROSS_LIBPATH/libitm.a
# Help plugins find out nvra.
echo gcc-%{version}-%{release}.%{_arch} > $CROSS_LIBPATH/rpmver
# 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}
@ -3633,7 +3982,159 @@ end
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/gcc-annobin.so.0.0.0
%endif
%if %{build_cross}
%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
%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
%{_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}/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}/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.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
%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}/libsupc++.a
%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
%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
%{_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}/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}/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.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
%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}/libsupc++.a
%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
%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
%{_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}/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}/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.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
%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}/libsupc++.a
%dnl build_cross
%endif
%changelog
* Thu Oct 16 2025 Marek Polacek <polacek@redhat.com> 14.3.1-2.3
- add cross compilers for aarch64, ppc64le and s390x for non-production uses
(RHEL-114519)
* Mon Sep 22 2025 Siddhesh Poyarekar <siddhesh@redhat.com> - 14.3.1-2.2
- Add branch, conditions, and calls to gcov function summaries (RHEL-105464)