File cang.spec.patch of Package gcc12
--- org/cross-arm-none-gcc12.spec 2024-10-09 16:23:00.197259261 +0200
+++ patched/cross-arm-none-gcc12.spec 2024-10-09 16:58:32.610982941 +0200
@@ -15,6 +15,8 @@
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
+# Compatible to the configuration of the corepondig package for arch linux
+%define arch_compat 1
%define pkgname cross-arm-none-gcc12
%define cross_arch arm-none
@@ -38,7 +40,11 @@
%define build_gcn 0
%define build_d 0
+%if %{arch_compat}
+%define enable_plugins 1
+%else
%define enable_plugins 0
+%endif
%define build_jit 0
%define use_lto_bootstrap 0
@@ -101,7 +107,7 @@
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
URL: https://gcc.gnu.org/
-Version: 12.2.1+git749
+Version: 12.5.0+git2949
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/+/-/')
@@ -153,7 +159,7 @@
%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/;")
+%define HOST_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
%ifarch ppc
%define GCCDIST powerpc64-suse-linux
%else
@@ -315,28 +321,28 @@
#test patching start
-%patch2
-%patch5
-%patch6
-%patch7
-%patch11
-%patch15
-%patch16
-%patch17 -p1
-%patch22 -p1
-%patch23 -p1
+%patch -P 2
+%patch -P 5
+%patch -P 6
+%patch -P 7
+%patch -P 11
+%patch -P 15
+%patch -P 16
+%patch -P 17 -p1
+%patch -P 22 -p1
+%patch -P 23 -p1
# These patches are needed only for llvm11
%if "%{TARGET_ARCH}" == "amdgcn" && %{suse_version} < 1550
-%patch18 -p1
-%patch20 -p1
+%patch -P 18 -p1
+%patch -P 20 -p1
%endif
# In SLE15 and earlier default to dwarf4, not dwarf5
%if %{suse_version} < 1550
-%patch19 -p1
+%patch -P 19 -p1
%endif
-%patch51
-%patch60 -p1
-%patch61
+%patch -P 51
+%patch -P 60 -p1
+%patch -P 61
#test patching end
@@ -695,6 +701,10 @@
--with-build-config=bootstrap-lto-lean \
%endif
--enable-link-serialization \
+%if %{arch_compat}
+ --with-gnu-as \
+ --with-gnu-ld \
+%endif
$CONFARGS \
--build=%{GCCDIST} \
--host=%{GCCDIST} || \