Sync from SUSE:SLFO:Main gcc13 revision 883992aba195cafec399cfbddff700f0

This commit is contained in:
2025-07-21 23:05:04 +02:00
parent ed11e9d378
commit 46c5056d07
36 changed files with 669 additions and 4674 deletions

View File

@@ -292,26 +292,24 @@ ExclusiveArch: i586 ppc64le ppc64 x86_64 s390x aarch64 riscv64
%if "%pkgname" == "cross-ppc64-gcc49"
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
%endif
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1} || "%{cross_arch}" == "avr"
%if 0%{!?gcc_accel:1}
# Generally only one cross for the same target triplet can be installed
# at the same time as we are populating a non-version-specific sysroot
Provides: %{gcc_target_arch}-gcc
Conflicts: %selfconflict %{gcc_target_arch}-gcc
%endif
%if 0%{?gcc_libc_bootstrap:1}
# The -bootstrap packages file-conflict with the non-bootstrap variants.
# Even if we don't actually (want to) distribute the bootstrap variants
# the following avoids repo-checker spamming us endlessly.
Provides: %{gcc_target_arch}-gcc
Conflicts: %{gcc_target_arch}-gcc
Conflicts: %{pkgname}-bootstrap
%endif
#!BuildIgnore: gcc-PIE
%if 0%{build_cp:1}
%if %{build_cp}
# The cross compiler only packages the arch specific c++ headers, so
# we need to depend on the host libstdc++ devel headers (we wouldn't need
# the libs, though)
Requires: libstdc++6-devel-gcc13
%endif
%if 0%{!?gcc_accel:1}
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
@@ -587,11 +585,11 @@ amdgcn-amdhsa,\
--enable-gnu-indirect-function \
%endif
%endif
--program-suffix=%{binsuffix} \
%ifarch %{disable_multilib_arch}
--disable-multilib \
%endif
%if 0%{!?gcc_target_arch:1}
--program-suffix=%{binsuffix} \
%ifarch ia64
--with-system-libunwind \
%else
@@ -599,6 +597,9 @@ amdgcn-amdhsa,\
%endif
%endif
%if 0%{?gcc_target_arch:1}
%if 0%{?gcc_accel:1} || %{suse_version} < 1600
--program-suffix=%{binsuffix} \
%endif
--program-prefix=%{gcc_target_arch}- \
--target=%{gcc_target_arch} \
--disable-nls \
@@ -861,7 +862,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
make DESTDIR=$RPM_BUILD_ROOT install-target
%if %{build_cp}
# So we installed libstdc++ headers into %prefix where they conflict
# So we installed libstdc++ headers into %%prefix where they conflict
# with other host compilers. Rip out the non-target specific parts
# again. Note not all cross targets support libstdc++, so create the
# directory to make things easier.
@@ -886,6 +887,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
# for accelerators remove all frontends but lto1 and also install-tools
%if 0%{?gcc_accel:1}
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
rm -rf $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/install-tools
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
@@ -893,6 +895,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
# that is the place where we later search for (only)
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
# also remove installed libstdc++ headers
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
%endif
# for amdgcn install the symlinks to the llvm tools
# follow alternatives symlinks to the hardcoded version requirement
@@ -957,7 +961,7 @@ rm -r env
# we provide update-alternatives for selecting a compiler version for
# crosses
%if 0%{!?gcc_accel:1}
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
for ex in gcc cpp \
%if %{build_cp}
@@ -1013,15 +1017,19 @@ fi
%endif
%else
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
%if %{suse_version} < 1600
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
%endif
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
%if %{suse_version} < 1600
%{_prefix}/bin/%{gcc_target_arch}-gcov%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
%endif
%{_prefix}/bin/%{gcc_target_arch}-gcov
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
@@ -1032,6 +1040,7 @@ fi
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
%if %{suse_version} < 1600
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
@@ -1043,13 +1052,16 @@ fi
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
%endif
%endif
%if %{build_cp}
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-c++
%{_prefix}/bin/%{gcc_target_arch}-g++
%if %{suse_version} < 1600
%{_prefix}/bin/%{gcc_target_arch}-c++%{binsuffix}
%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix}
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-c++
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
%endif
%if 0%{!?gcc_libc_bootstrap:1}
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
%{_prefix}/include/c++