forked from pool/gcc15
Compare commits
56 Commits
Author | SHA256 | Date | |
---|---|---|---|
7dd45961ca | |||
51935c6c62 | |||
5d278918ea | |||
7c08c1321a | |||
587a1ce451 | |||
b917f5c210 | |||
22344762ee | |||
64904bc0f1 | |||
e6d7929ba4 | |||
1b135d7b0c | |||
d95bf34ba9 | |||
8e9dcc6119 | |||
b78807102f | |||
5b5f71f751 | |||
9571696f4c | |||
ae4ef93729 | |||
52f9284e3c | |||
306ae4bf92 | |||
3c6282cec5 | |||
a8dda4566b | |||
fafa6a5b35 | |||
f129282d6c | |||
1b123a6f7b | |||
60e813581c | |||
9bd6296c5c | |||
4dc752eda8 | |||
080ad5ad18 | |||
90a54921fc | |||
7206eb18e5 | |||
470132c5bd | |||
9afbf78cb8 | |||
6d67549777 | |||
297912ef23 | |||
11545aa5bc | |||
409dd0d72a | |||
44bd88ce35 | |||
eefd08b8e2 | |||
78f0992801 | |||
41aa3321a1 | |||
051899bb88 | |||
491a1ef46c | |||
d717235e10 | |||
0611d3a503 | |||
3e3ac5622c | |||
919588990e | |||
e9e66f04ff | |||
07fc7c5f65 | |||
cbb7307500 | |||
13c9e5e14a | |||
263a99aa55 | |||
f233da913e | |||
6f129d4e13 | |||
54321e2dca | |||
b4a9a2a51e | |||
aff96e3978 | |||
47a0ad4db2 |
@@ -18,11 +18,7 @@
|
|||||||
<flavor>cross-pru-gcc15-bootstrap</flavor>
|
<flavor>cross-pru-gcc15-bootstrap</flavor>
|
||||||
<flavor>cross-pru-gcc15</flavor>
|
<flavor>cross-pru-gcc15</flavor>
|
||||||
<flavor>cross-x86_64-gcc15</flavor>
|
<flavor>cross-x86_64-gcc15</flavor>
|
||||||
<flavor>cross-sparc-gcc15</flavor>
|
|
||||||
<flavor>cross-sparc64-gcc15</flavor>
|
|
||||||
<flavor>cross-ppc64-gcc15</flavor>
|
<flavor>cross-ppc64-gcc15</flavor>
|
||||||
<flavor>cross-m68k-gcc15</flavor>
|
|
||||||
<flavor>cross-mips-gcc15</flavor>
|
|
||||||
<flavor>cross-arm-none-gcc15-bootstrap</flavor>
|
<flavor>cross-arm-none-gcc15-bootstrap</flavor>
|
||||||
<flavor>cross-arm-none-gcc15</flavor>
|
<flavor>cross-arm-none-gcc15</flavor>
|
||||||
<flavor>cross-riscv64-elf-gcc15-bootstrap</flavor>
|
<flavor>cross-riscv64-elf-gcc15-bootstrap</flavor>
|
||||||
|
7
_service
7
_service
@@ -1,16 +1,19 @@
|
|||||||
<services>
|
<services>
|
||||||
<service name="obs_scm" mode="manual">
|
<service name="obs_scm" mode="manual">
|
||||||
<param name="versionformat">@PARENT_TAG@.0.1+git@TAG_OFFSET@</param>
|
<param name="versionformat">@PARENT_TAG@.1.1+git@TAG_OFFSET@</param>
|
||||||
<param name="versionrewrite-pattern">basepoints/gcc-(.*)</param>
|
<param name="versionrewrite-pattern">basepoints/gcc-(.*)</param>
|
||||||
<param name="versionrewrite-replacement">\1</param>
|
<param name="versionrewrite-replacement">\1</param>
|
||||||
<param name="match-tag">basepoints/gcc-*</param>
|
<param name="match-tag">basepoints/gcc-*</param>
|
||||||
<param name="url">git://gcc.gnu.org/git/gcc.git</param>
|
<param name="url">git://gcc.gnu.org/git/gcc.git</param>
|
||||||
<param name="scm">git</param>
|
<param name="scm">git</param>
|
||||||
|
<param name="revision">releases/gcc-15</param>
|
||||||
</service>
|
</service>
|
||||||
<service name="tar" mode="manual"/>
|
<service name="tar" mode="manual"/>
|
||||||
<service name="recompress" mode="manual">
|
<service name="recompress" mode="manual">
|
||||||
<param name="compression">xz</param>
|
<param name="compression">xz</param>
|
||||||
<param name="file">*.tar</param>
|
<param name="file">*.tar</param>
|
||||||
</service>
|
</service>
|
||||||
<service name="set_version" mode="manual"/>
|
<service name="set_version" mode="manual">
|
||||||
|
<param name="basename">gcc</param>
|
||||||
|
</service>
|
||||||
</services>
|
</services>
|
||||||
|
22
change_spec
22
change_spec
@@ -87,10 +87,16 @@ add_newlib_cross() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
add_glibc_cross() {
|
add_glibc_cross() {
|
||||||
add_cross $1-bootstrap $2 $3 "%define gcc_libc_bootstrap 1"
|
add_cross $1-bootstrap $2 $3 "%define gcc_target_glibc 1
|
||||||
|
%define gcc_libc_bootstrap 1"
|
||||||
add_cross $1 $2 $3 "%define gcc_target_glibc 1"
|
add_cross $1 $2 $3 "%define gcc_target_glibc 1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
add_glibc_bootstrap_cross() {
|
||||||
|
add_cross $1 $2 $3 "%define gcc_target_glibc 1
|
||||||
|
%define gcc_libc_bootstrap 1"
|
||||||
|
}
|
||||||
|
|
||||||
# We now support "proper" cross-compilers to suse targets via a
|
# We now support "proper" cross-compilers to suse targets via a
|
||||||
# cross-glibc package, enable that via for example
|
# cross-glibc package, enable that via for example
|
||||||
#
|
#
|
||||||
@@ -105,16 +111,16 @@ add_glibc_cross cross-s390x-gcc$base_ver s390x s390x-suse-linux
|
|||||||
add_glibc_cross cross-ppc64le-gcc$base_ver ppc64le powerpc64le-suse-linux
|
add_glibc_cross cross-ppc64le-gcc$base_ver ppc64le powerpc64le-suse-linux
|
||||||
add_glibc_cross cross-hppa-gcc$base_ver hppa hppa-suse-linux
|
add_glibc_cross cross-hppa-gcc$base_ver hppa hppa-suse-linux
|
||||||
|
|
||||||
add_cross cross-arm-gcc$base_ver arm arm-suse-linux-gnueabi %define gcc_icecream 1
|
add_glibc_bootstrap_cross cross-arm-gcc$base_ver arm arm-suse-linux-gnueabi
|
||||||
add_cross cross-avr-gcc$base_ver-bootstrap avr avr "%define gcc_libc_bootstrap 1"
|
add_cross cross-avr-gcc$base_ver-bootstrap avr avr "%define gcc_libc_bootstrap 1"
|
||||||
add_cross cross-avr-gcc$base_ver avr avr
|
add_cross cross-avr-gcc$base_ver avr avr
|
||||||
add_newlib_cross cross-pru-gcc$base_ver pru pru
|
add_newlib_cross cross-pru-gcc$base_ver pru pru
|
||||||
add_cross cross-x86_64-gcc$base_ver x86_64 x86_64-suse-linux %define gcc_icecream 1
|
add_glibc_bootstrap_cross cross-x86_64-gcc$base_ver x86_64 x86_64-suse-linux
|
||||||
add_cross cross-sparc-gcc$base_ver sparcv9 sparc-suse-linux %define gcc_icecream 1
|
#add_cross cross-sparc-gcc$base_ver sparcv9 sparc-suse-linux %define gcc_icecream 1
|
||||||
add_cross cross-sparc64-gcc$base_ver sparc64 sparc64-suse-linux %define gcc_icecream 1
|
#add_cross cross-sparc64-gcc$base_ver sparc64 sparc64-suse-linux %define gcc_icecream 1
|
||||||
add_cross cross-ppc64-gcc$base_ver ppc64 powerpc64-suse-linux %define gcc_icecream 1
|
add_glibc_bootstrap_cross cross-ppc64-gcc$base_ver ppc64 powerpc64-suse-linux %define
|
||||||
add_cross cross-m68k-gcc$base_ver m68k m68k-suse-linux %define gcc_icecream 1
|
#add_cross cross-m68k-gcc$base_ver m68k m68k-suse-linux %define gcc_icecream 1
|
||||||
add_cross cross-mips-gcc$base_ver mips mips-suse-linux %define gcc_icecream 1
|
#add_cross cross-mips-gcc$base_ver mips mips-suse-linux %define gcc_icecream 1
|
||||||
add_newlib_cross cross-arm-none-gcc$base_ver arm-none arm-none-eabi
|
add_newlib_cross cross-arm-none-gcc$base_ver arm-none arm-none-eabi
|
||||||
#add_newlib_cross cross-epiphany-gcc$base_ver epiphany epiphany-elf
|
#add_newlib_cross cross-epiphany-gcc$base_ver epiphany epiphany-elf
|
||||||
#add_newlib_cross cross-nds32le-gcc$base_ver nds32le nds32le-elf
|
#add_newlib_cross cross-nds32le-gcc$base_ver nds32le nds32le-elf
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-aarch64-gcc15-bootstrap
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -19,10 +19,11 @@
|
|||||||
%define pkgname cross-aarch64-gcc15-bootstrap
|
%define pkgname cross-aarch64-gcc15-bootstrap
|
||||||
%define cross_arch aarch64
|
%define cross_arch aarch64
|
||||||
%define gcc_target_arch aarch64-suse-linux
|
%define gcc_target_arch aarch64-suse-linux
|
||||||
|
%define gcc_target_glibc 1
|
||||||
%define gcc_libc_bootstrap 1
|
%define gcc_libc_bootstrap 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +66,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +103,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +129,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +211,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +258,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +270,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +317,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +416,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +480,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +548,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +560,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +595,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +603,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +649,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +713,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +821,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +846,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +854,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +920,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +976,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +999,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1011,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-aarch64-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
%define gcc_target_glibc 1
|
%define gcc_target_glibc 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +102,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +128,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +210,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +257,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +269,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +316,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +415,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +479,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +547,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +559,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +594,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +602,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +648,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +712,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +820,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +853,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +919,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +975,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +998,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1010,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-amdgcn-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
%define gcc_accel 1
|
%define gcc_accel 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +102,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +128,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +210,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +257,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +269,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +316,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +415,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +479,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +547,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +559,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +594,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +602,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +648,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +712,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +820,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +853,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +919,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +975,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +998,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1010,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-arm-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -19,10 +19,11 @@
|
|||||||
%define pkgname cross-arm-gcc15
|
%define pkgname cross-arm-gcc15
|
||||||
%define cross_arch arm
|
%define cross_arch arm
|
||||||
%define gcc_target_arch arm-suse-linux-gnueabi
|
%define gcc_target_arch arm-suse-linux-gnueabi
|
||||||
%define gcc_icecream 1
|
%define gcc_target_glibc 1
|
||||||
|
%define gcc_libc_bootstrap 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +66,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +103,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +129,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +211,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +258,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +270,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +317,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +416,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +480,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +548,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +560,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +595,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +603,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +649,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +713,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +821,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +846,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +854,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +920,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +976,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +999,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1011,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-arm-none-gcc15-bootstrap
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
%define gcc_libc_bootstrap 1
|
%define gcc_libc_bootstrap 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -40,6 +40,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -65,7 +66,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -102,7 +103,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -128,6 +129,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -208,6 +211,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -249,7 +258,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -257,29 +270,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -304,6 +317,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -402,6 +416,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -463,6 +480,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -528,11 +548,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -540,6 +560,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -572,10 +595,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -584,6 +603,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -627,7 +649,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -691,7 +713,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -799,7 +821,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -824,6 +846,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -831,6 +854,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -895,7 +920,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -951,15 +976,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -970,6 +999,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -981,13 +1011,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-arm-none-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
%define gcc_target_newlib 1
|
%define gcc_target_newlib 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +102,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +128,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +210,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +257,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +269,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +316,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +415,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +479,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +547,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +559,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +594,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +602,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +648,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +712,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +820,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +853,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +919,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +975,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +998,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1010,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-avr-gcc15-bootstrap
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
%define gcc_libc_bootstrap 1
|
%define gcc_libc_bootstrap 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +102,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +128,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +210,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +257,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +269,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +316,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +415,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +479,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +547,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +559,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +594,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +602,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +648,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +712,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +820,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +853,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +919,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +975,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +998,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1010,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-avr-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +102,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +128,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +210,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +257,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +269,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +316,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +415,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +479,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +547,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +559,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +594,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +602,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +648,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +712,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +820,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +853,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +919,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +975,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +998,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1010,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-bpf-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +102,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +128,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +210,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +257,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +269,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +316,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +415,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +479,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +547,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +559,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +594,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +602,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +648,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +712,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +820,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +853,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +919,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +975,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +998,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1010,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-hppa-gcc15-bootstrap
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -19,10 +19,11 @@
|
|||||||
%define pkgname cross-hppa-gcc15-bootstrap
|
%define pkgname cross-hppa-gcc15-bootstrap
|
||||||
%define cross_arch hppa
|
%define cross_arch hppa
|
||||||
%define gcc_target_arch hppa-suse-linux
|
%define gcc_target_arch hppa-suse-linux
|
||||||
|
%define gcc_target_glibc 1
|
||||||
%define gcc_libc_bootstrap 1
|
%define gcc_libc_bootstrap 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +66,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +103,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +129,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +211,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +258,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +270,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +317,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +416,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +480,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +548,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +560,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +595,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +603,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +649,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +713,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +821,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +846,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +854,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +920,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +976,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +999,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1011,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-hppa-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
%define gcc_target_glibc 1
|
%define gcc_target_glibc 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +102,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +128,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +210,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +257,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +269,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +316,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +415,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +479,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +547,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +559,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +594,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +602,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +648,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +712,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +820,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +853,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +919,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +975,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +998,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1010,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-loongarch64-gcc15-bootstrap
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -19,10 +19,11 @@
|
|||||||
%define pkgname cross-loongarch64-gcc15-bootstrap
|
%define pkgname cross-loongarch64-gcc15-bootstrap
|
||||||
%define cross_arch loongarch64
|
%define cross_arch loongarch64
|
||||||
%define gcc_target_arch loongarch64-suse-linux
|
%define gcc_target_arch loongarch64-suse-linux
|
||||||
|
%define gcc_target_glibc 1
|
||||||
%define gcc_libc_bootstrap 1
|
%define gcc_libc_bootstrap 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +66,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +103,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +129,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +211,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,37 +258,41 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
# file conflicts with it and is no longer packaged
|
# file conflicts with it and is no longer packaged
|
||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +317,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +416,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +480,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +548,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +560,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +595,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +603,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +649,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +713,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +821,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +846,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +854,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +920,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +976,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +999,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1011,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-loongarch64-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
%define gcc_target_glibc 1
|
%define gcc_target_glibc 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +102,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +128,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +210,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,37 +257,41 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
# file conflicts with it and is no longer packaged
|
# file conflicts with it and is no longer packaged
|
||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +316,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +415,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +479,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +547,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +559,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +594,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +602,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +648,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +712,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +820,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +853,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +919,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +975,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +998,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1010,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-nvptx-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
%define gcc_accel 1
|
%define gcc_accel 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +102,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +128,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +210,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +257,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +269,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +316,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +415,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +479,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +547,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +559,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +594,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +602,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +648,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +712,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +820,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +853,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +919,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +975,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +998,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1010,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-ppc64-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -19,10 +19,11 @@
|
|||||||
%define pkgname cross-ppc64-gcc15
|
%define pkgname cross-ppc64-gcc15
|
||||||
%define cross_arch ppc64
|
%define cross_arch ppc64
|
||||||
%define gcc_target_arch powerpc64-suse-linux
|
%define gcc_target_arch powerpc64-suse-linux
|
||||||
%define gcc_icecream 1
|
%define gcc_target_glibc 1
|
||||||
|
%define gcc_libc_bootstrap 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +66,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +103,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +129,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +211,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +258,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +270,29 @@ ExclusiveArch: i586 x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +317,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +416,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +480,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +548,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +560,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +595,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +603,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +649,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +713,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +821,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +846,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +854,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +920,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +976,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +999,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1011,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-ppc64le-gcc15-bootstrap
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -19,10 +19,11 @@
|
|||||||
%define pkgname cross-ppc64le-gcc15-bootstrap
|
%define pkgname cross-ppc64le-gcc15-bootstrap
|
||||||
%define cross_arch ppc64le
|
%define cross_arch ppc64le
|
||||||
%define gcc_target_arch powerpc64le-suse-linux
|
%define gcc_target_arch powerpc64le-suse-linux
|
||||||
|
%define gcc_target_glibc 1
|
||||||
%define gcc_libc_bootstrap 1
|
%define gcc_libc_bootstrap 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +66,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +103,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +129,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +211,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +258,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +270,29 @@ ExclusiveArch: i586 x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +317,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +416,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +480,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +548,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +560,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +595,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +603,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +649,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +713,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +821,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +846,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +854,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +920,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +976,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +999,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1011,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-ppc64le-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
%define gcc_target_glibc 1
|
%define gcc_target_glibc 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +102,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +128,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +210,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +257,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +269,29 @@ ExclusiveArch: i586 x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +316,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +415,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +479,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +547,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +559,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +594,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +602,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +648,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +712,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +820,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +853,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +919,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +975,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +998,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1010,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-pru-gcc15-bootstrap
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
%define gcc_libc_bootstrap 1
|
%define gcc_libc_bootstrap 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -40,6 +40,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -65,7 +66,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -102,7 +103,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -128,6 +129,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -208,6 +211,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -249,7 +258,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -257,29 +270,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -304,6 +317,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -402,6 +416,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -463,6 +480,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -528,11 +548,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -540,6 +560,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -572,10 +595,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -584,6 +603,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -627,7 +649,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -691,7 +713,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -799,7 +821,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -824,6 +846,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -831,6 +854,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -895,7 +920,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -951,15 +976,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -970,6 +999,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -981,13 +1011,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-pru-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
%define gcc_target_newlib 1
|
%define gcc_target_newlib 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +102,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +128,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +210,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +257,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +269,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +316,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +415,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +479,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +547,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +559,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +594,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +602,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +648,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +712,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +820,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +853,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +919,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +975,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +998,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1010,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-riscv64-elf-gcc15-bootstrap
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
%define gcc_libc_bootstrap 1
|
%define gcc_libc_bootstrap 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -40,6 +40,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -65,7 +66,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -102,7 +103,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -128,6 +129,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -208,6 +211,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -249,7 +258,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -257,29 +270,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -304,6 +317,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -402,6 +416,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -463,6 +480,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -528,11 +548,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -540,6 +560,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -572,10 +595,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -584,6 +603,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -627,7 +649,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -691,7 +713,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -799,7 +821,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -824,6 +846,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -831,6 +854,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -895,7 +920,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -951,15 +976,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -970,6 +999,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -981,13 +1011,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-riscv64-elf-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
%define gcc_target_newlib 1
|
%define gcc_target_newlib 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +102,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +128,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +210,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +257,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +269,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +316,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +415,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +479,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +547,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +559,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +594,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +602,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +648,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +712,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +820,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +853,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +919,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +975,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +998,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1010,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-riscv64-gcc15-bootstrap
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -19,10 +19,11 @@
|
|||||||
%define pkgname cross-riscv64-gcc15-bootstrap
|
%define pkgname cross-riscv64-gcc15-bootstrap
|
||||||
%define cross_arch riscv64
|
%define cross_arch riscv64
|
||||||
%define gcc_target_arch riscv64-suse-linux
|
%define gcc_target_arch riscv64-suse-linux
|
||||||
|
%define gcc_target_glibc 1
|
||||||
%define gcc_libc_bootstrap 1
|
%define gcc_libc_bootstrap 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +66,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +103,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +129,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +211,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +258,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +270,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +317,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +416,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +480,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +548,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +560,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +595,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +603,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +649,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +713,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +821,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +846,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +854,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +920,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +976,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +999,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1011,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-riscv64-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
%define gcc_target_glibc 1
|
%define gcc_target_glibc 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +102,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +128,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +210,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +257,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +269,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +316,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +415,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +479,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +547,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +559,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +594,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +602,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +648,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +712,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +820,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +853,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +919,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +975,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +998,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1010,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-rx-gcc15-bootstrap
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
%define gcc_libc_bootstrap 1
|
%define gcc_libc_bootstrap 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -40,6 +40,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -65,7 +66,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -102,7 +103,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -128,6 +129,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -208,6 +211,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -249,7 +258,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -257,29 +270,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -304,6 +317,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -402,6 +416,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -463,6 +480,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -528,11 +548,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -540,6 +560,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -572,10 +595,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -584,6 +603,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -627,7 +649,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -691,7 +713,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -799,7 +821,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -824,6 +846,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -831,6 +854,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -895,7 +920,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -951,15 +976,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -970,6 +999,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -981,13 +1011,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-rx-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
%define gcc_target_newlib 1
|
%define gcc_target_newlib 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +102,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +128,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +210,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +257,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +269,29 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +316,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +415,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +479,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +547,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +559,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +594,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +602,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +648,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +712,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +820,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +853,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +919,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +975,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +998,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1010,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-s390x-gcc15-bootstrap
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -19,10 +19,11 @@
|
|||||||
%define pkgname cross-s390x-gcc15-bootstrap
|
%define pkgname cross-s390x-gcc15-bootstrap
|
||||||
%define cross_arch s390x
|
%define cross_arch s390x
|
||||||
%define gcc_target_arch s390x-suse-linux
|
%define gcc_target_arch s390x-suse-linux
|
||||||
|
%define gcc_target_glibc 1
|
||||||
%define gcc_libc_bootstrap 1
|
%define gcc_libc_bootstrap 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +66,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +103,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +129,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +211,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +258,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +270,29 @@ ExclusiveArch: i586 ppc64le x86_64 aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +317,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +416,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +480,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +548,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +560,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +595,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +603,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +649,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +713,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +821,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +846,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +854,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +920,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +976,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +999,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1011,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-s390x-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
%define gcc_target_glibc 1
|
%define gcc_target_glibc 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +65,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +102,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +128,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +210,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +257,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +269,29 @@ ExclusiveArch: i586 ppc64le x86_64 aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +316,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +415,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +479,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +547,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +559,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +594,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +602,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +648,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +712,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +820,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +845,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +853,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +919,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +975,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +998,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1010,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file for package cross-x86_64-gcc15
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC
|
||||||
#
|
#
|
||||||
@@ -19,10 +19,11 @@
|
|||||||
%define pkgname cross-x86_64-gcc15
|
%define pkgname cross-x86_64-gcc15
|
||||||
%define cross_arch x86_64
|
%define cross_arch x86_64
|
||||||
%define gcc_target_arch x86_64-suse-linux
|
%define gcc_target_arch x86_64-suse-linux
|
||||||
%define gcc_icecream 1
|
%define gcc_target_glibc 1
|
||||||
|
%define gcc_libc_bootstrap 1
|
||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -39,6 +40,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -64,7 +66,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -101,7 +103,7 @@ Name: %{pkgname}
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -127,6 +129,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# Define the canonical target and host architecture
|
# Define the canonical target and host architecture
|
||||||
# %%gcc_target_arch is supposed to be the full target triple
|
# %%gcc_target_arch is supposed to be the full target triple
|
||||||
@@ -207,6 +211,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -248,7 +258,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -256,29 +270,29 @@ ExclusiveArch: i586 ppc64le s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc15
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc15
|
Requires: libstdc++6-devel-gcc15
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun):update-alternatives
|
Requires(preun): update-alternatives
|
||||||
%endif
|
%endif
|
||||||
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
Summary: The GNU Compiler Collection targeting %{cross_arch}
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
@@ -303,6 +317,7 @@ only, it is not intended for any other use.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -401,6 +416,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -462,6 +480,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -527,11 +548,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -539,6 +560,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -571,10 +595,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -583,6 +603,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -626,7 +649,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -690,7 +713,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -798,7 +821,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -823,6 +846,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -830,6 +854,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -894,7 +920,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -950,15 +976,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -969,6 +999,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -980,13 +1011,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# nospeccleaner
|
# nospeccleaner
|
||||||
|
|
||||||
%define build_cp 0%{!?gcc_accel:1}
|
%define build_cp 1
|
||||||
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
%if 0%{?gcc_libc_bootstrap:1} || "%{cross_arch}" == "bpf"
|
||||||
%define build_cp 0
|
%define build_cp 0
|
||||||
%endif
|
%endif
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
|
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
@@ -42,7 +43,7 @@
|
|||||||
%define binutils_target sparc
|
%define binutils_target sparc
|
||||||
%endif
|
%endif
|
||||||
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
%define canonical_target %(echo %{binutils_target} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
|
||||||
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "spu" || "%{binutils_target}" == "pru"
|
%if "%{binutils_target}" == "avr" || "%{binutils_target}" == "pru"
|
||||||
%define binutils_os %{canonical_target}
|
%define binutils_os %{canonical_target}
|
||||||
%else
|
%else
|
||||||
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
%if "%{binutils_target}" == "epiphany" || "%{binutils_target}" == "nds32le" || "%{binutils_target}" == "rl78" || "%{binutils_target}" == "rx"
|
||||||
@@ -123,6 +124,12 @@ BuildRequires: avr-libc
|
|||||||
%if 0%{?gcc_target_glibc:1}
|
%if 0%{?gcc_target_glibc:1}
|
||||||
%if %{suse_version} < 1600
|
%if %{suse_version} < 1600
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
%if %{suse_version} < 1699
|
||||||
|
%if "%{cross_arch}" == "hppa" || "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: cross-%cross_arch-glibc-devel
|
BuildRequires: cross-%cross_arch-glibc-devel
|
||||||
%requires_ge cross-%cross_arch-glibc-devel
|
%requires_ge cross-%cross_arch-glibc-devel
|
||||||
@@ -164,7 +171,11 @@ ExcludeArch: %{cross_arch}
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
%if 0%{?gcc_icecream:1}%{?gcc_libc_bootstrap:1}
|
||||||
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
%if %{suse_version} < 1699 && "%{cross_arch}" == "loongarch64"
|
||||||
|
ExclusiveArch: do-not-build
|
||||||
|
%else
|
||||||
|
ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64 loongarch64
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%define _binary_payload w.ufdio
|
%define _binary_payload w.ufdio
|
||||||
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
|
||||||
@@ -172,26 +183,26 @@ ExclusiveArch: i586 ppc64le x86_64 s390x aarch64 riscv64
|
|||||||
%if "%pkgname" == "cross-ppc64-gcc49"
|
%if "%pkgname" == "cross-ppc64-gcc49"
|
||||||
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
Obsoletes: cross-ppc-gcc49 <= 4.9.0+r209354
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_newlib:1}%{?gcc_target_glibc:1}
|
%if 0%{!?gcc_accel:1}
|
||||||
# Generally only one cross for the same target triplet can be installed
|
# 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
|
# at the same time as we are populating a non-version-specific sysroot
|
||||||
Provides: %{gcc_target_arch}-gcc
|
|
||||||
Conflicts: %{gcc_target_arch}-gcc
|
|
||||||
%endif
|
|
||||||
%if 0%{?gcc_libc_bootstrap:1}
|
|
||||||
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
# The -bootstrap packages file-conflict with the non-bootstrap variants.
|
||||||
# Even if we don't actually (want to) distribute the bootstrap variants
|
# Even if we don't actually (want to) distribute the bootstrap variants
|
||||||
# the following avoids repo-checker spamming us endlessly.
|
# the following avoids repo-checker spamming us endlessly.
|
||||||
Conflicts: cross-%{cross_arch}-gcc@base_ver@
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
|
Provides: %{gcc_target_arch}-gcc
|
||||||
|
Conflicts: %{pkgname}-bootstrap
|
||||||
|
%endif
|
||||||
|
Conflicts: %{gcc_target_arch}-gcc
|
||||||
%endif
|
%endif
|
||||||
#!BuildIgnore: gcc-PIE
|
#!BuildIgnore: gcc-PIE
|
||||||
%if 0%{build_cp:1}
|
%if %{build_cp}
|
||||||
# The cross compiler only packages the arch specific c++ headers, so
|
# 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
|
# we need to depend on the host libstdc++ devel headers (we wouldn't need
|
||||||
# the libs, though)
|
# the libs, though)
|
||||||
Requires: libstdc++6-devel-gcc@base_ver@
|
Requires: libstdc++6-devel-gcc@base_ver@
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
BuildRequires: update-alternatives
|
BuildRequires: update-alternatives
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(preun): update-alternatives
|
Requires(preun): update-alternatives
|
||||||
@@ -284,7 +295,7 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
|
|||||||
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
mkdir -p $RPM_BUILD_ROOT/%{?sysroot:%sysroot}
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install-target
|
make DESTDIR=$RPM_BUILD_ROOT install-target
|
||||||
%if %{build_cp}
|
%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
|
# with other host compilers. Rip out the non-target specific parts
|
||||||
# again. Note not all cross targets support libstdc++, so create the
|
# again. Note not all cross targets support libstdc++, so create the
|
||||||
# directory to make things easier.
|
# directory to make things easier.
|
||||||
@@ -309,6 +320,7 @@ rm -rf $RPM_BUILD_ROOT%{_infodir}
|
|||||||
# for accelerators remove all frontends but lto1 and also install-tools
|
# for accelerators remove all frontends but lto1 and also install-tools
|
||||||
%if 0%{?gcc_accel:1}
|
%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}/cc1
|
||||||
|
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/f951
|
||||||
rm -f $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch}/cc1plus
|
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%{libsubdir}/accel/%{gcc_target_arch}/install-tools
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
||||||
@@ -316,6 +328,8 @@ rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}/install-tools
|
|||||||
# that is the place where we later search for (only)
|
# 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 - )
|
( cd $RPM_BUILD_ROOT%{targetlibsubdir} && tar cf - . ) | ( cd $RPM_BUILD_ROOT%{libsubdir}/accel/%{gcc_target_arch} && tar xf - )
|
||||||
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
rm -rf $RPM_BUILD_ROOT%{targetlibsubdir}
|
||||||
|
# also remove installed libstdc++ headers
|
||||||
|
rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++
|
||||||
%endif
|
%endif
|
||||||
# for amdgcn install the symlinks to the llvm tools
|
# for amdgcn install the symlinks to the llvm tools
|
||||||
# follow alternatives symlinks to the hardcoded version requirement
|
# follow alternatives symlinks to the hardcoded version requirement
|
||||||
@@ -380,7 +394,7 @@ rm -r env
|
|||||||
|
|
||||||
# we provide update-alternatives for selecting a compiler version for
|
# we provide update-alternatives for selecting a compiler version for
|
||||||
# crosses
|
# crosses
|
||||||
%if 0%{!?gcc_accel:1}
|
%if 0%{!?gcc_accel:1} && %{suse_version} < 1600
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||||
for ex in gcc cpp \
|
for ex in gcc cpp \
|
||||||
%if %{build_cp}
|
%if %{build_cp}
|
||||||
@@ -436,15 +450,19 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-cpp%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ar%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump%{binsuffix}
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1} && "%{cross_arch}" != "bpf"
|
%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%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump%{binsuffix}
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool%{binsuffix}
|
||||||
|
%endif
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
%{_prefix}/bin/%{gcc_target_arch}-gcov
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-dump
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
%{_prefix}/bin/%{gcc_target_arch}-gcov-tool
|
||||||
@@ -455,6 +473,7 @@ fi
|
|||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-nm
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
%{_prefix}/bin/%{gcc_target_arch}-gcc-ranlib
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
%{_prefix}/bin/%{gcc_target_arch}-lto-dump
|
||||||
|
%if %{suse_version} < 1600
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-cpp
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcc-ar
|
||||||
@@ -466,13 +485,16 @@ fi
|
|||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-dump
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-gcov-tool
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
%if %{build_cp}
|
%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}-c++
|
||||||
%{_prefix}/bin/%{gcc_target_arch}-g++
|
%{_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}-c++
|
||||||
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
%ghost %{_sysconfdir}/alternatives/%{gcc_target_arch}-g++
|
||||||
|
%endif
|
||||||
%if 0%{!?gcc_libc_bootstrap:1}
|
%if 0%{!?gcc_libc_bootstrap:1}
|
||||||
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
%if "%{cross_arch}" == "avr" || 0%{?gcc_target_newlib:1} || 0%{?gcc_target_glibc:1}
|
||||||
%{_prefix}/include/c++
|
%{_prefix}/include/c++
|
||||||
@@ -506,4 +528,4 @@ fi
|
|||||||
%exclude %{_prefix}/%{gcc_target_arch}/bin
|
%exclude %{_prefix}/%{gcc_target_arch}/bin
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog -n cross-%{pkgname}-gcc@base_ver@
|
%changelog -n %{pkgname}
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:c1e7fcd7a64f629e63c3f5fb95562d195e92611dc816520a0e8e20c0bbc5be22
|
|
||||||
size 93929784
|
|
BIN
gcc-15.1.1+git9866.tar.xz
(Stored with Git LFS)
Normal file
BIN
gcc-15.1.1+git9866.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
name: gcc
|
name: gcc
|
||||||
version: 15.0.1+git7330
|
version: 15.1.1+git9866
|
||||||
mtime: 1738562380
|
mtime: 1750920781
|
||||||
commit: 75ab30f77f6d8a555aa78472b45a75a508544c68
|
commit: 8d600e98004b63e788614fc8958cbafbc1bb52c0
|
||||||
|
179
gcc.spec.in
179
gcc.spec.in
@@ -44,7 +44,7 @@
|
|||||||
%define build_ada 0
|
%define build_ada 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%define quadmath_arch %ix86 x86_64 ia64 ppc64le
|
%define quadmath_arch %ix86 x86_64 ia64 ppc64le loongarch64
|
||||||
%define tsan_arch x86_64 aarch64 ppc ppc64 ppc64le s390 s390x riscv64 loongarch64
|
%define tsan_arch x86_64 aarch64 ppc ppc64 ppc64le s390 s390x riscv64 loongarch64
|
||||||
%define asan_arch x86_64 %ix86 ppc ppc64 ppc64le s390 s390x %sparc %arm aarch64 riscv64 loongarch64
|
%define asan_arch x86_64 %ix86 ppc ppc64 ppc64le s390 s390x %sparc %arm aarch64 riscv64 loongarch64
|
||||||
%define hwasan_arch aarch64 x86_64
|
%define hwasan_arch aarch64 x86_64
|
||||||
@@ -87,6 +87,14 @@
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%define build_cobol 0
|
||||||
|
%if %{suse_version} >= 1699
|
||||||
|
# build cobol for factory and x86_64 for now
|
||||||
|
%ifarch x86_64 aarch64 ppc64le riscv64
|
||||||
|
%define build_cobol 1
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
# For optional compilers only build C, C++, Fortran, Ada and Go
|
# For optional compilers only build C, C++, Fortran, Ada and Go
|
||||||
%if 0%{?build_optional_compiler_languages:1}
|
%if 0%{?build_optional_compiler_languages:1}
|
||||||
%define build_objc 0
|
%define build_objc 0
|
||||||
@@ -94,6 +102,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
@@ -124,9 +133,14 @@
|
|||||||
# Enable plugins just for Tumbleweed, not for SLES
|
# Enable plugins just for Tumbleweed, not for SLES
|
||||||
%if 0%{?is_opensuse:%is_opensuse}
|
%if 0%{?is_opensuse:%is_opensuse}
|
||||||
%define enable_plugins 1
|
%define enable_plugins 1
|
||||||
%define build_jit 1
|
|
||||||
%else
|
%else
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Do not enable JIT support on SLE15
|
||||||
|
%if %{suse_version} >= 1600
|
||||||
|
%define build_jit 1
|
||||||
|
%else
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@@ -156,11 +170,12 @@
|
|||||||
%define libubsan_sover 1
|
%define libubsan_sover 1
|
||||||
%define liblsan_sover 0
|
%define liblsan_sover 0
|
||||||
%define libvtv_sover 0
|
%define libvtv_sover 0
|
||||||
%define libgo_sover 23
|
%define libgo_sover 24
|
||||||
%define libgphobos_sover 6
|
%define libgphobos_sover 6
|
||||||
%define libgdruntime_sover 6
|
%define libgdruntime_sover 6
|
||||||
%define libgccjit_sover 0
|
%define libgccjit_sover 0
|
||||||
%define libm2_sover 20
|
%define libm2_sover 20
|
||||||
|
%define libgcobol_sover 1
|
||||||
|
|
||||||
# Shared library package suffix
|
# Shared library package suffix
|
||||||
# This is used for the "non-standard" set of libraries, the standard
|
# This is used for the "non-standard" set of libraries, the standard
|
||||||
@@ -195,6 +210,7 @@
|
|||||||
%define libgdruntime_suffix %{plv libgdruntime %{libgdruntime_sover}}
|
%define libgdruntime_suffix %{plv libgdruntime %{libgdruntime_sover}}
|
||||||
%define libgccjit_suffix %{plv libgccjit %{libgccjit_sover}}
|
%define libgccjit_suffix %{plv libgccjit %{libgccjit_sover}}
|
||||||
%define libm2_suffix %{plv libm2 %{libm2_sover}}
|
%define libm2_suffix %{plv libm2 %{libm2_sover}}
|
||||||
|
%define libgcobol_suffix %{plv libgcobol %{libgcobol_sover}}
|
||||||
|
|
||||||
|
|
||||||
# libFOO-devel package suffix
|
# libFOO-devel package suffix
|
||||||
@@ -379,6 +395,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
# GCC-TESTSUITE-DELETE-BEGIN
|
# GCC-TESTSUITE-DELETE-BEGIN
|
||||||
# SRC-COMMON-END
|
# SRC-COMMON-END
|
||||||
@@ -1211,6 +1229,41 @@ Runtime library for the GNU Modula-2 language.
|
|||||||
# PACKAGE-END
|
# PACKAGE-END
|
||||||
|
|
||||||
|
|
||||||
|
# PACKAGE-BEGIN
|
||||||
|
%package cobol@variant@
|
||||||
|
Summary: GNU GCC COBOL Compiler
|
||||||
|
License: GPL-3.0-or-later
|
||||||
|
Group: Development/Languages/Other
|
||||||
|
Requires: gcc@base_ver@@variant@ = %{version}-%{release}
|
||||||
|
Requires: gcc@base_ver@-cobol = %{version}-%{release}
|
||||||
|
Requires: libgcobol%{libgcobol_sover}@variant@ >= %{version}-%{release}
|
||||||
|
%ifarch %quadmath_arch
|
||||||
|
Requires: libquadmath%{libquadmath_sover}-devel%{libdevel_suffix}@variant@ = %{version}-%{release}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description cobol@variant@
|
||||||
|
This package contains a COBOL compiler.
|
||||||
|
# PACKAGE-END
|
||||||
|
|
||||||
|
# PACKAGE-BEGIN
|
||||||
|
%package -n libgcobol%{libgcobol_sover}%{libgcobol_suffix}@variant@
|
||||||
|
Summary: GNU GCC COBOL compiler runtime library
|
||||||
|
License: BSD-3-Clause
|
||||||
|
Group: Development/Languages/Other
|
||||||
|
Provides: libgcobol%{libgcobol_sover}@variant@ = %{version}-%{release}
|
||||||
|
# Only one package may provide this - allows multiple gcc versions
|
||||||
|
# to co-exist without an overly large list of provides/obsoletes
|
||||||
|
Conflicts: libgcobol%{libgcobol_sover}@variant@
|
||||||
|
|
||||||
|
%description -n libgcobol%{libgcobol_sover}%{libgcobol_suffix}@variant@
|
||||||
|
Runtime library for the GNU GCC COBOL language.
|
||||||
|
|
||||||
|
%post -n libgcobol%{libgcobol_sover}%{libgcobol_suffix}@variant@ -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun -n libgcobol%{libgcobol_sover}%{libgcobol_suffix}@variant@ -p /sbin/ldconfig
|
||||||
|
# PACKAGE-END
|
||||||
|
|
||||||
|
|
||||||
%package -n gcc@base_ver@-testresults
|
%package -n gcc@base_ver@-testresults
|
||||||
# GCC-TESTSUITE-DELETE-END
|
# GCC-TESTSUITE-DELETE-END
|
||||||
Summary: Testsuite results
|
Summary: Testsuite results
|
||||||
@@ -1328,6 +1381,7 @@ Results from running the gcc and target library testsuites.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -1426,6 +1480,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -1487,6 +1544,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -1552,11 +1612,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -1564,6 +1624,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -1596,10 +1659,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -1608,6 +1667,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -1651,7 +1713,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -1715,7 +1777,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -1759,7 +1821,7 @@ export QEMU_STACK_SIZE=64M
|
|||||||
# BUILD-COMMON-END
|
# BUILD-COMMON-END
|
||||||
|
|
||||||
STAGE1_FLAGS="-g -O2"
|
STAGE1_FLAGS="-g -O2"
|
||||||
%if 0%{?do_profiling} && !0%{?building_testsuite:1}
|
%if 0%{?do_profiling} && !0%{?building_testsuite:1} && !0%{?want_reproducible_builds}
|
||||||
%ifarch x86_64 %ix86 ppc64le s390x aarch64
|
%ifarch x86_64 %ix86 ppc64le s390x aarch64
|
||||||
%if %{with bootstrap}
|
%if %{with bootstrap}
|
||||||
%define use_pgo_bootstrap 1
|
%define use_pgo_bootstrap 1
|
||||||
@@ -1783,6 +1845,8 @@ mkdir ../testresults
|
|||||||
../contrib/test_summary | tee ../testresults/test_summary.txt
|
../contrib/test_summary | tee ../testresults/test_summary.txt
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%define __provides_exclude_from ^%{libsubdir}/.*\.so.*$
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# Make sure libtool re-linking libasan at install time doesn't drop the
|
# Make sure libtool re-linking libasan at install time doesn't drop the
|
||||||
# libstdc++ reference to make asan of C++ modules in python work
|
# libstdc++ reference to make asan of C++ modules in python work
|
||||||
@@ -1810,7 +1874,8 @@ for lib in libobjc libgfortran libquadmath libcaf_single \
|
|||||||
libgo libasan libhwasan libatomic libitm libtsan liblsan libubsan libvtv \
|
libgo libasan libhwasan libatomic libitm libtsan liblsan libubsan libvtv \
|
||||||
libstdc++fs libgomp-plugin-nvptx libgomp-plugin-gcn \
|
libstdc++fs libgomp-plugin-nvptx libgomp-plugin-gcn \
|
||||||
libgdruntime libgphobos libstdc++exp \
|
libgdruntime libgphobos libstdc++exp \
|
||||||
libm2cor libm2iso libm2log libm2min libm2pim; do
|
libm2cor libm2iso libm2log libm2min libm2pim \
|
||||||
|
libgcobol; do
|
||||||
rm -f %{buildroot}/%{versmainlibdir}/$lib.la
|
rm -f %{buildroot}/%{versmainlibdir}/$lib.la
|
||||||
%if %{biarch}
|
%if %{biarch}
|
||||||
rm -f %{buildroot}/%{versmainlibdirbi}/$lib.la
|
rm -f %{buildroot}/%{versmainlibdirbi}/$lib.la
|
||||||
@@ -1872,7 +1937,8 @@ if ! test -z "$dir_ml"; then
|
|||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# move shared libs from versionspecific dir to main libdir
|
# move shared libs from versionspecific dir to main libdir, keep a copy
|
||||||
|
# for link-editing in the .so
|
||||||
for libname in \
|
for libname in \
|
||||||
%if %{build_fortran}
|
%if %{build_fortran}
|
||||||
libgfortran \
|
libgfortran \
|
||||||
@@ -1907,6 +1973,9 @@ for libname in \
|
|||||||
libm2pim \
|
libm2pim \
|
||||||
libm2min \
|
libm2min \
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
libgcobol \
|
||||||
|
%endif
|
||||||
%ifarch %atomic_arch
|
%ifarch %atomic_arch
|
||||||
libatomic \
|
libatomic \
|
||||||
%endif
|
%endif
|
||||||
@@ -1936,8 +2005,16 @@ for libname in \
|
|||||||
mv $lib %{buildroot}/%{mainlibdir}/
|
mv $lib %{buildroot}/%{mainlibdir}/
|
||||||
done
|
done
|
||||||
if test -L %{buildroot}/%{versmainlibdir}/$libname.so; then
|
if test -L %{buildroot}/%{versmainlibdir}/$libname.so; then
|
||||||
ln -sf %{mainlibdir}/`readlink %{buildroot}/%{versmainlibdir}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \
|
cp %{buildroot}/%{mainlibdir}/`readlink %{buildroot}/%{versmainlibdir}/$libname.so` \
|
||||||
%{buildroot}/%{versmainlibdir}/$libname.so
|
%{buildroot}/%{versmainlibdir}/$libname.so.tem
|
||||||
|
rm %{buildroot}/%{versmainlibdir}/$libname.so
|
||||||
|
mv %{buildroot}/%{versmainlibdir}/$libname.so.tem %{buildroot}/%{versmainlibdir}/$libname.so
|
||||||
|
strip -g %{buildroot}/%{versmainlibdir}/$libname.so
|
||||||
|
else
|
||||||
|
if test -e %{buildroot}/%{versmainlibdir}/$libname.so; then
|
||||||
|
echo ERROR: unexpected linker script for $libname.so
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
%if %{biarch}
|
%if %{biarch}
|
||||||
if test -d %{buildroot}/%{versmainlibdirbi}; then
|
if test -d %{buildroot}/%{versmainlibdirbi}; then
|
||||||
@@ -1945,8 +2022,16 @@ for libname in \
|
|||||||
mv $lib %{buildroot}/%{mainlibdirbi}/
|
mv $lib %{buildroot}/%{mainlibdirbi}/
|
||||||
done
|
done
|
||||||
if test -L %{buildroot}/%{versmainlibdirbi}/$libname.so; then
|
if test -L %{buildroot}/%{versmainlibdirbi}/$libname.so; then
|
||||||
ln -sf %{mainlibdirbi}/`readlink %{buildroot}/%{versmainlibdirbi}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \
|
cp %{buildroot}/%{mainlibdirbi}/`readlink %{buildroot}/%{versmainlibdirbi}/$libname.so` \
|
||||||
%{buildroot}/%{versmainlibdirbi}/$libname.so
|
%{buildroot}/%{versmainlibdirbi}/$libname.so.tem
|
||||||
|
rm %{buildroot}/%{versmainlibdirbi}/$libname.so
|
||||||
|
mv %{buildroot}/%{versmainlibdirbi}/$libname.so.tem %{buildroot}/%{versmainlibdirbi}/$libname.so
|
||||||
|
strip -g %{buildroot}/%{versmainlibdirbi}/$libname.so
|
||||||
|
else
|
||||||
|
if test -e %{buildroot}/%{versmainlibdirbi}/$libname.so; then
|
||||||
|
echo ERROR: unexpected linker script for $libname.so
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
@@ -1966,40 +2051,50 @@ sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' %{buildroot}/%{_
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Move libgcc_s around
|
# Move libgcc_s around, make sure a version specific copy is available
|
||||||
|
# for link editing
|
||||||
|
chmod a+x %{buildroot}/%{_lib}/libgcc_s.so.%{libgcc_s}
|
||||||
if test -L %{buildroot}/%{_lib}/libgcc_s.so; then
|
if test -L %{buildroot}/%{_lib}/libgcc_s.so; then
|
||||||
rm -f %{buildroot}/%{_lib}/libgcc_s.so
|
rm -f %{buildroot}/%{_lib}/libgcc_s.so
|
||||||
ln -sf /%{_lib}/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdir}/libgcc_s.so
|
cp %{buildroot}//%{_lib}/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdir}/libgcc_s.so
|
||||||
|
strip -g %{buildroot}/%{versmainlibdir}/libgcc_s.so
|
||||||
else
|
else
|
||||||
mv %{buildroot}/%{_lib}/libgcc_s.so %{buildroot}/%{versmainlibdir}/
|
mv %{buildroot}/%{_lib}/libgcc_s.so %{buildroot}/%{versmainlibdir}/
|
||||||
|
cp %{buildroot}//%{_lib}/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdir}/libgcc_s.so.%{libgcc_s}
|
||||||
|
strip -g %{buildroot}/%{versmainlibdir}/libgcc_s.so.%{libgcc_s}
|
||||||
fi
|
fi
|
||||||
chmod a+x %{buildroot}/%{_lib}/libgcc_s.so.%{libgcc_s}
|
|
||||||
%if 0%{?usrmerged}
|
%if 0%{?usrmerged}
|
||||||
mv %{buildroot}/%{_lib}/libgcc_s.so.%{libgcc_s} %{buildroot}/%{_slibdir}/libgcc_s.so.%{libgcc_s}
|
mv %{buildroot}/%{_lib}/libgcc_s.so.%{libgcc_s} %{buildroot}/%{_slibdir}/libgcc_s.so.%{libgcc_s}
|
||||||
%endif
|
%endif
|
||||||
%if %{biarch}
|
%if %{biarch}
|
||||||
|
chmod a+x %{buildroot}/lib/libgcc_s.so.%{libgcc_s}
|
||||||
%if %{build_primary_64bit}
|
%if %{build_primary_64bit}
|
||||||
if test -L %{buildroot}/lib/libgcc_s.so; then
|
if test -L %{buildroot}/lib/libgcc_s.so; then
|
||||||
rm -f %{buildroot}/lib/libgcc_s.so
|
rm -f %{buildroot}/lib/libgcc_s.so
|
||||||
ln -sf /lib/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi32}/libgcc_s.so
|
cp %{buildroot}/lib/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi32}/libgcc_s.so
|
||||||
|
strip -g %{buildroot}/%{versmainlibdirbi32}/libgcc_s.so
|
||||||
else
|
else
|
||||||
mv %{buildroot}/lib/libgcc_s.so %{buildroot}/%{versmainlibdirbi32}/
|
mv %{buildroot}/lib/libgcc_s.so %{buildroot}/%{versmainlibdirbi32}/
|
||||||
|
cp %{buildroot}/lib/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi32}/libgcc_s.so.%{libgcc_s}
|
||||||
|
strip -g %{buildroot}/%{versmainlibdirbi32}/libgcc_s.so.%{libgcc_s}
|
||||||
fi
|
fi
|
||||||
ln -sf %{versmainlibdirbi32}/libgcc_s.so %{buildroot}/%{versmainlibdirbi32}/libgcc_s_32.so
|
ln -sf %{versmainlibdirbi32}/libgcc_s.so %{buildroot}/%{versmainlibdirbi32}/libgcc_s_32.so
|
||||||
chmod a+x %{buildroot}/lib/libgcc_s.so.%{libgcc_s}
|
|
||||||
%if 0%{?usrmerged}
|
%if 0%{?usrmerged}
|
||||||
mv %{buildroot}/lib/libgcc_s.so.%{libgcc_s} %{buildroot}/%{slibdir}/libgcc_s.so.%{libgcc_s}
|
mv %{buildroot}/lib/libgcc_s.so.%{libgcc_s} %{buildroot}/%{slibdir}/libgcc_s.so.%{libgcc_s}
|
||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
# 32-bit biarch systems
|
# 32-bit biarch systems
|
||||||
|
chmod a+x %{buildroot}/lib64/libgcc_s.so.%{libgcc_s}
|
||||||
if test -L %{buildroot}/lib64/libgcc_s.so; then
|
if test -L %{buildroot}/lib64/libgcc_s.so; then
|
||||||
rm -f %{buildroot}/lib64/libgcc_s.so
|
rm -f %{buildroot}/lib64/libgcc_s.so
|
||||||
ln -sf /lib64/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi64}/libgcc_s.so
|
cp %{buildroot}/lib64/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi64}/libgcc_s.so
|
||||||
|
strip -g %{buildroot}/%{versmainlibdirbi64}/libgcc_s.so
|
||||||
else
|
else
|
||||||
mv %{buildroot}/lib64/libgcc_s.so %{buildroot}/%{versmainlibdirbi64}/
|
mv %{buildroot}/lib64/libgcc_s.so %{buildroot}/%{versmainlibdirbi64}/
|
||||||
|
cp %{buildroot}/lib64/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi64}/libgcc_s.so.%{libgcc_s}
|
||||||
|
strip -g %{buildroot}/%{versmainlibdirbi64}/libgcc_s.so.%{libgcc_s}
|
||||||
fi
|
fi
|
||||||
ln -sf %{versmainlibdirbi64}/libgcc_s.so %{buildroot}/%{versmainlibdirbi64}/libgcc_s_64.so
|
ln -sf %{versmainlibdirbi64}/libgcc_s.so %{buildroot}/%{versmainlibdirbi64}/libgcc_s_64.so
|
||||||
chmod a+x %{buildroot}/lib64/libgcc_s.so.%{libgcc_s}
|
|
||||||
%if 0%{?usrmerged}
|
%if 0%{?usrmerged}
|
||||||
mv %{buildroot}/lib64/libgcc_s.so.%{libgcc_s} %{buildroot}/%{slibdir64}/libgcc_s.so.%{libgcc_s}
|
mv %{buildroot}/lib64/libgcc_s.so.%{libgcc_s} %{buildroot}/%{slibdir64}/libgcc_s.so.%{libgcc_s}
|
||||||
%endif
|
%endif
|
||||||
@@ -2055,7 +2150,7 @@ chmod 644 ../testresults/*
|
|||||||
# GCC-TESTSUITE-DELETE-BEGIN
|
# GCC-TESTSUITE-DELETE-BEGIN
|
||||||
# Remove files that we do not need to clean up filelist
|
# Remove files that we do not need to clean up filelist
|
||||||
|
|
||||||
# Preserve %{GCCDIST}-gcc%{binsuffix} binary for libgccjit as it is used as a driver
|
# Preserve %%{GCCDIST}-gcc%%{binsuffix} binary for libgccjit as it is used as a driver
|
||||||
mv %{buildroot}/%{_prefix}/bin/%{GCCDIST}-gcc%{binsuffix} %{buildroot}
|
mv %{buildroot}/%{_prefix}/bin/%{GCCDIST}-gcc%{binsuffix} %{buildroot}
|
||||||
rm -f %{buildroot}/%{_prefix}/bin/%{GCCDIST}-*
|
rm -f %{buildroot}/%{_prefix}/bin/%{GCCDIST}-*
|
||||||
mv %{buildroot}/%{GCCDIST}-gcc%{binsuffix} %{buildroot}/%{_prefix}/bin/
|
mv %{buildroot}/%{GCCDIST}-gcc%{binsuffix} %{buildroot}/%{_prefix}/bin/
|
||||||
@@ -2422,7 +2517,6 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc@base_ver@-locale.lang
|
|||||||
%{libsubdir}/include/sm4intrin.h
|
%{libsubdir}/include/sm4intrin.h
|
||||||
%{libsubdir}/include/avx512bitalgvlintrin.h
|
%{libsubdir}/include/avx512bitalgvlintrin.h
|
||||||
%{libsubdir}/include/usermsrintrin.h
|
%{libsubdir}/include/usermsrintrin.h
|
||||||
%{libsubdir}/include/avx10_2roundingintrin.h
|
|
||||||
%{libsubdir}/include/avx10_2-512bf16intrin.h
|
%{libsubdir}/include/avx10_2-512bf16intrin.h
|
||||||
%{libsubdir}/include/avx10_2-512convertintrin.h
|
%{libsubdir}/include/avx10_2-512convertintrin.h
|
||||||
%{libsubdir}/include/avx10_2-512mediaintrin.h
|
%{libsubdir}/include/avx10_2-512mediaintrin.h
|
||||||
@@ -2453,7 +2547,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc@base_ver@-locale.lang
|
|||||||
%versmainlib *crt*.o
|
%versmainlib *crt*.o
|
||||||
%versmainlib libgcc*.a
|
%versmainlib libgcc*.a
|
||||||
%versmainlib libgcov.a
|
%versmainlib libgcov.a
|
||||||
%versmainlib libgcc_s*.so
|
%versmainlib libgcc_s*.so*
|
||||||
%versmainlib libgomp.so
|
%versmainlib libgomp.so
|
||||||
%versmainlib libgomp.a
|
%versmainlib libgomp.a
|
||||||
%versmainlib libgomp.spec
|
%versmainlib libgomp.spec
|
||||||
@@ -2519,7 +2613,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc@base_ver@-locale.lang
|
|||||||
%versbiarchlib *crt*.o
|
%versbiarchlib *crt*.o
|
||||||
%versbiarchlib libgcc*.a
|
%versbiarchlib libgcc*.a
|
||||||
%versbiarchlib libgcov.a
|
%versbiarchlib libgcov.a
|
||||||
%versbiarchlib libgcc_s*.so
|
%versbiarchlib libgcc_s*.so*
|
||||||
%versbiarchlib libgomp.so
|
%versbiarchlib libgomp.so
|
||||||
%versbiarchlib libgomp.a
|
%versbiarchlib libgomp.a
|
||||||
%versbiarchlib libgomp.spec
|
%versbiarchlib libgomp.spec
|
||||||
@@ -3179,6 +3273,35 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc@base_ver@-locale.lang
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{build_cobol}
|
||||||
|
%files cobol
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%dir %{_datadir}/gcobol
|
||||||
|
%dir %{_datadir}/gcobol/udf
|
||||||
|
%{_datadir}/gcobol/udf/stored-char-length.cbl
|
||||||
|
%{_prefix}/bin/gcobol%{binsuffix}
|
||||||
|
%{_prefix}/bin/gcobc%{binsuffix}
|
||||||
|
%{libsubdir}/cobol1
|
||||||
|
%versmainlib libgcobol.a
|
||||||
|
%versmainlib libgcobol.so
|
||||||
|
%versmainlib libgcobol.spec
|
||||||
|
%doc %{_mandir}/man1/gcobol%{binsuffix}.1.gz
|
||||||
|
%doc %{_mandir}/man3/gcobol-io%{binsuffix}.3.gz
|
||||||
|
|
||||||
|
%if %{separate_biarch}
|
||||||
|
# 32bit not supported sofar
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files -n libgcobol%{libgcobol_sover}%{libgcobol_suffix}
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%mainlib libgcobol.so.%{libgcobol_sover}*
|
||||||
|
|
||||||
|
%if %{separate_biarch}
|
||||||
|
# 32bit not supported sofar
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
# GCC-TESTSUITE-DELETE-END
|
# GCC-TESTSUITE-DELETE-END
|
||||||
|
|
||||||
%if 0%{?run_tests:1}
|
%if 0%{?run_tests:1}
|
||||||
|
@@ -64,7 +64,7 @@
|
|||||||
%define build_ada 0
|
%define build_ada 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%define quadmath_arch %ix86 x86_64 ia64 ppc64le
|
%define quadmath_arch %ix86 x86_64 ia64 ppc64le loongarch64
|
||||||
%define tsan_arch x86_64 aarch64 ppc ppc64 ppc64le s390 s390x riscv64 loongarch64
|
%define tsan_arch x86_64 aarch64 ppc ppc64 ppc64le s390 s390x riscv64 loongarch64
|
||||||
%define asan_arch x86_64 %ix86 ppc ppc64 ppc64le s390 s390x %sparc %arm aarch64 riscv64 loongarch64
|
%define asan_arch x86_64 %ix86 ppc ppc64 ppc64le s390 s390x %sparc %arm aarch64 riscv64 loongarch64
|
||||||
%define hwasan_arch aarch64 x86_64
|
%define hwasan_arch aarch64 x86_64
|
||||||
@@ -107,6 +107,14 @@
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%define build_cobol 0
|
||||||
|
%if %{suse_version} >= 1699
|
||||||
|
# build cobol for factory and x86_64 for now
|
||||||
|
%ifarch x86_64 aarch64 ppc64le riscv64
|
||||||
|
%define build_cobol 1
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
# For optional compilers only build C, C++, Fortran, Ada and Go
|
# For optional compilers only build C, C++, Fortran, Ada and Go
|
||||||
%if 0%{?build_optional_compiler_languages:1}
|
%if 0%{?build_optional_compiler_languages:1}
|
||||||
%define build_objc 0
|
%define build_objc 0
|
||||||
@@ -114,6 +122,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
@@ -144,9 +153,14 @@
|
|||||||
# Enable plugins just for Tumbleweed, not for SLES
|
# Enable plugins just for Tumbleweed, not for SLES
|
||||||
%if 0%{?is_opensuse:%is_opensuse}
|
%if 0%{?is_opensuse:%is_opensuse}
|
||||||
%define enable_plugins 1
|
%define enable_plugins 1
|
||||||
%define build_jit 1
|
|
||||||
%else
|
%else
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Do not enable JIT support on SLE15
|
||||||
|
%if %{suse_version} >= 1600
|
||||||
|
%define build_jit 1
|
||||||
|
%else
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@@ -176,11 +190,12 @@
|
|||||||
%define libubsan_sover 1
|
%define libubsan_sover 1
|
||||||
%define liblsan_sover 0
|
%define liblsan_sover 0
|
||||||
%define libvtv_sover 0
|
%define libvtv_sover 0
|
||||||
%define libgo_sover 23
|
%define libgo_sover 24
|
||||||
%define libgphobos_sover 6
|
%define libgphobos_sover 6
|
||||||
%define libgdruntime_sover 6
|
%define libgdruntime_sover 6
|
||||||
%define libgccjit_sover 0
|
%define libgccjit_sover 0
|
||||||
%define libm2_sover 20
|
%define libm2_sover 20
|
||||||
|
%define libgcobol_sover 1
|
||||||
|
|
||||||
# Shared library package suffix
|
# Shared library package suffix
|
||||||
# This is used for the "non-standard" set of libraries, the standard
|
# This is used for the "non-standard" set of libraries, the standard
|
||||||
@@ -215,6 +230,7 @@
|
|||||||
%define libgdruntime_suffix %{plv libgdruntime %{libgdruntime_sover}}
|
%define libgdruntime_suffix %{plv libgdruntime %{libgdruntime_sover}}
|
||||||
%define libgccjit_suffix %{plv libgccjit %{libgccjit_sover}}
|
%define libgccjit_suffix %{plv libgccjit %{libgccjit_sover}}
|
||||||
%define libm2_suffix %{plv libm2 %{libm2_sover}}
|
%define libm2_suffix %{plv libm2 %{libm2_sover}}
|
||||||
|
%define libgcobol_suffix %{plv libgcobol %{libgcobol_sover}}
|
||||||
|
|
||||||
# libFOO-devel package suffix
|
# libFOO-devel package suffix
|
||||||
%define libdevel_suffix -gcc15
|
%define libdevel_suffix -gcc15
|
||||||
@@ -222,7 +238,7 @@
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -395,6 +411,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
Summary: Testsuite results
|
Summary: Testsuite results
|
||||||
License: SUSE-Public-Domain
|
License: SUSE-Public-Domain
|
||||||
@@ -505,6 +523,7 @@ Results from running the gcc and target library testsuites.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -603,6 +622,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -664,6 +686,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -729,11 +754,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -741,6 +766,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -773,10 +801,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -785,6 +809,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -828,7 +855,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -892,7 +919,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -934,7 +961,7 @@ export QEMU_STACK_SIZE=64M
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
STAGE1_FLAGS="-g -O2"
|
STAGE1_FLAGS="-g -O2"
|
||||||
%if 0%{?do_profiling} && !0%{?building_testsuite:1}
|
%if 0%{?do_profiling} && !0%{?building_testsuite:1} && !0%{?want_reproducible_builds}
|
||||||
%ifarch x86_64 %ix86 ppc64le s390x aarch64
|
%ifarch x86_64 %ix86 ppc64le s390x aarch64
|
||||||
%if %{with bootstrap}
|
%if %{with bootstrap}
|
||||||
%define use_pgo_bootstrap 1
|
%define use_pgo_bootstrap 1
|
||||||
@@ -958,6 +985,8 @@ mkdir ../testresults
|
|||||||
../contrib/test_summary | tee ../testresults/test_summary.txt
|
../contrib/test_summary | tee ../testresults/test_summary.txt
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%define __provides_exclude_from ^%{libsubdir}/.*\.so.*$
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# Make sure libtool re-linking libasan at install time doesn't drop the
|
# Make sure libtool re-linking libasan at install time doesn't drop the
|
||||||
# libstdc++ reference to make asan of C++ modules in python work
|
# libstdc++ reference to make asan of C++ modules in python work
|
||||||
|
152
gcc15.changes
152
gcc15.changes
@@ -1,10 +1,160 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 9 11:26:24 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Prune the use of update-alternatives from openSUSE Factory and
|
||||||
|
SLFO.
|
||||||
|
- Adjust crosses to conflict consistently where they did not
|
||||||
|
already and make them use unsuffixed binaries.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jul 2 10:31:10 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Tune for power10 for SLES 16. [jsc#PED-12029]
|
||||||
|
- Tune for z15 for SLES 16. [jsc#PED-253]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 26 07:46:54 UTC 2025 - Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
- Update to GCC 15 branch head, 15.1.1+git9866
|
||||||
|
- Fix PR120827, ICE due to splitter emitting constant loads directly
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jun 10 12:32:01 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Remove all %gcc_icecream mode cross-compilers and the corresponding
|
||||||
|
icecream backend subpackages. Instead use glibc-bootstrap only
|
||||||
|
configs for cross-x86_64-gcc (ipxe,ovmf,qemu), cross-ppc64-gcc (qemu)
|
||||||
|
and cross-arm-gcc (ovmf).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jun 6 12:18:16 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Revert pruning the set of cross-compilers that conflict with different
|
||||||
|
versions from the set using update-alternatives. This causes
|
||||||
|
endless headache with file conflicts with older GCC releases.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 4 07:53:48 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Exclude shared objects present for link editing in the GCC specific
|
||||||
|
subdirectory from provides processing via __provides_exclude_from.
|
||||||
|
[bsc#1244050][bsc#1243991]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jun 3 12:36:35 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Make cross-*-gcc15-bootstrap package conflict with the non-bootstrap
|
||||||
|
variant conflict with the unversioned cross-*-gcc package.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri May 30 06:59:37 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Enable C++ for offload compilers. [bsc#1243794]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 28 08:40:24 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Update to GCC 15 branch head, 15.1.1+git9739
|
||||||
|
- Do not build any loongarch64 compiler for distros where we do
|
||||||
|
not have cross-binutils.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 13 11:20:45 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Prune set of cross-compilers that conflict with different
|
||||||
|
versions from the set using update-alternatives.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu May 8 09:10:35 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Update to GCC 15 branch head, 15.1.1+git9642
|
||||||
|
* includes fix for libgfortran.so.5 ABI regression [gcc#120152]
|
||||||
|
- Add libgcobol and libquadmath-devel dependence to the cobol frontend
|
||||||
|
package.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 28 06:12:42 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Update to GCC 15 branch head, 15.1.1+git9595
|
||||||
|
* includes GCC 15.1 release
|
||||||
|
- Enable gfx9-generic, gfx10-3-generic and gfx11-generic multilibs
|
||||||
|
for the AMD GCN offload compiler when llvm is new enough.
|
||||||
|
- Build the COBOL frontend also for risc-v
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Apr 12 09:09:23 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
- Add loongarch64 to quadmath_arch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 10 06:17:49 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Update to GCC trunk head, 15.0.1+git9352
|
||||||
|
- Make sure link editing is done against our own shared library
|
||||||
|
copy rather than the installed system runtime. [bsc#1240788]
|
||||||
|
- Add newlib-gcn-libm-fix.patch to fix newlib libm miscompilation
|
||||||
|
for GCN offloading.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 28 08:54:41 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Update to GCC trunk head, 15.0.1+git9001
|
||||||
|
* includes -msplit-patch-nops required for user-space livepatching
|
||||||
|
on powerpc
|
||||||
|
* includes fix for Ada build with --enable-host-pie
|
||||||
|
- Adjust for removed avx10_2roundingintrin.h intrinsic header.
|
||||||
|
- Build GCC executables PIE on SLE. [bsc#1239938]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 24 12:03:56 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Disable build of glibc cross to loongarch64 and hppa in SLFO.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 17 07:50:20 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Update to GCC trunk head, 15.0.1+git8082
|
||||||
|
- Includes change to also record -D_FORTIFY_SOURCE=2 in the DWARF
|
||||||
|
debug info DW_AT_producer string. [bsc#1239566]
|
||||||
|
- Package GCC COBOL compiler for openSUSE Factory for supported
|
||||||
|
targets which are x86_64, aarch64 and ppc64le.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 10 13:23:43 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Disable profiling during build when %want_reproducible_builds is set
|
||||||
|
[bsc#1238491]
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 5 09:42:44 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Update to GCC trunk head, 15.0.1+git7827
|
||||||
|
- Includes fix for emacs JIT use
|
||||||
|
- Bumps libgo SONAME to libgo24 which should fix go1.9 build
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 18 14:02:49 UTC 2025 - JS <obs.coke518@passinbox.com>
|
||||||
|
|
||||||
|
- Enable cross compilers on loongarch64
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 10 07:40:03 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
|
- Update to GCC trunk head, 15.0.1+git7452
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 7 08:26:35 UTC 2025 - JS <obs.coke518@passinbox.com>
|
||||||
|
|
||||||
|
- Remove SPU-specific sections
|
||||||
|
* SPU target was dropped upstream in GCC 10
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 6 10:29:59 UTC 2025 - Richard Biener <rguenther@suse.com>
|
Thu Feb 6 10:29:59 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
|
||||||
- Adjust cross compiler requirements to use %requires_ge
|
- Adjust cross compiler requirements to use %requires_ge
|
||||||
- Fix condition on whether to enable plugins or JIT support to
|
- Fix condition on whether to enable plugins or JIT support to
|
||||||
not check sle_version which is not defined in SLFO but to check
|
not check sle_version which is not defined in SLFO but to check
|
||||||
is_opensuse instead.
|
is_opensuse and suse_version instead.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Feb 3 10:08:21 UTC 2025 - Richard Biener <rguenther@suse.com>
|
Mon Feb 3 10:08:21 UTC 2025 - Richard Biener <rguenther@suse.com>
|
||||||
|
235
gcc15.spec
235
gcc15.spec
@@ -43,7 +43,7 @@
|
|||||||
%define build_ada 0
|
%define build_ada 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%define quadmath_arch %ix86 x86_64 ia64 ppc64le
|
%define quadmath_arch %ix86 x86_64 ia64 ppc64le loongarch64
|
||||||
%define tsan_arch x86_64 aarch64 ppc ppc64 ppc64le s390 s390x riscv64 loongarch64
|
%define tsan_arch x86_64 aarch64 ppc ppc64 ppc64le s390 s390x riscv64 loongarch64
|
||||||
%define asan_arch x86_64 %ix86 ppc ppc64 ppc64le s390 s390x %sparc %arm aarch64 riscv64 loongarch64
|
%define asan_arch x86_64 %ix86 ppc ppc64 ppc64le s390 s390x %sparc %arm aarch64 riscv64 loongarch64
|
||||||
%define hwasan_arch aarch64 x86_64
|
%define hwasan_arch aarch64 x86_64
|
||||||
@@ -86,6 +86,14 @@
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%define build_cobol 0
|
||||||
|
%if %{suse_version} >= 1699
|
||||||
|
# build cobol for factory and x86_64 for now
|
||||||
|
%ifarch x86_64 aarch64 ppc64le riscv64
|
||||||
|
%define build_cobol 1
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
# For optional compilers only build C, C++, Fortran, Ada and Go
|
# For optional compilers only build C, C++, Fortran, Ada and Go
|
||||||
%if 0%{?build_optional_compiler_languages:1}
|
%if 0%{?build_optional_compiler_languages:1}
|
||||||
%define build_objc 0
|
%define build_objc 0
|
||||||
@@ -93,6 +101,7 @@
|
|||||||
%define build_d 0
|
%define build_d 0
|
||||||
%define build_rust 0
|
%define build_rust 0
|
||||||
%define build_m2 0
|
%define build_m2 0
|
||||||
|
%define build_cobol 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
@@ -123,9 +132,14 @@
|
|||||||
# Enable plugins just for Tumbleweed, not for SLES
|
# Enable plugins just for Tumbleweed, not for SLES
|
||||||
%if 0%{?is_opensuse:%is_opensuse}
|
%if 0%{?is_opensuse:%is_opensuse}
|
||||||
%define enable_plugins 1
|
%define enable_plugins 1
|
||||||
%define build_jit 1
|
|
||||||
%else
|
%else
|
||||||
%define enable_plugins 0
|
%define enable_plugins 0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Do not enable JIT support on SLE15
|
||||||
|
%if %{suse_version} >= 1600
|
||||||
|
%define build_jit 1
|
||||||
|
%else
|
||||||
%define build_jit 0
|
%define build_jit 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@@ -155,11 +169,12 @@
|
|||||||
%define libubsan_sover 1
|
%define libubsan_sover 1
|
||||||
%define liblsan_sover 0
|
%define liblsan_sover 0
|
||||||
%define libvtv_sover 0
|
%define libvtv_sover 0
|
||||||
%define libgo_sover 23
|
%define libgo_sover 24
|
||||||
%define libgphobos_sover 6
|
%define libgphobos_sover 6
|
||||||
%define libgdruntime_sover 6
|
%define libgdruntime_sover 6
|
||||||
%define libgccjit_sover 0
|
%define libgccjit_sover 0
|
||||||
%define libm2_sover 20
|
%define libm2_sover 20
|
||||||
|
%define libgcobol_sover 1
|
||||||
|
|
||||||
# Shared library package suffix
|
# Shared library package suffix
|
||||||
# This is used for the "non-standard" set of libraries, the standard
|
# This is used for the "non-standard" set of libraries, the standard
|
||||||
@@ -194,6 +209,7 @@
|
|||||||
%define libgdruntime_suffix %{plv libgdruntime %{libgdruntime_sover}}
|
%define libgdruntime_suffix %{plv libgdruntime %{libgdruntime_sover}}
|
||||||
%define libgccjit_suffix %{plv libgccjit %{libgccjit_sover}}
|
%define libgccjit_suffix %{plv libgccjit %{libgccjit_sover}}
|
||||||
%define libm2_suffix %{plv libm2 %{libm2_sover}}
|
%define libm2_suffix %{plv libm2 %{libm2_sover}}
|
||||||
|
%define libgcobol_suffix %{plv libgcobol %{libgcobol_sover}}
|
||||||
|
|
||||||
# libFOO-devel package suffix
|
# libFOO-devel package suffix
|
||||||
%define libdevel_suffix -gcc15
|
%define libdevel_suffix -gcc15
|
||||||
@@ -201,7 +217,7 @@
|
|||||||
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
%define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
|
||||||
|
|
||||||
URL: https://gcc.gnu.org/
|
URL: https://gcc.gnu.org/
|
||||||
Version: 15.0.1+git7330
|
Version: 15.1.1+git9866
|
||||||
Release: 0
|
Release: 0
|
||||||
%define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 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 gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/')
|
||||||
@@ -374,6 +390,8 @@ Patch51: gcc41-ppc32-retaddr.patch
|
|||||||
# Some patches taken from Debian
|
# Some patches taken from Debian
|
||||||
Patch60: gcc44-textdomain.patch
|
Patch60: gcc44-textdomain.patch
|
||||||
Patch61: gcc44-rename-info-files.patch
|
Patch61: gcc44-rename-info-files.patch
|
||||||
|
# Patches for newlib
|
||||||
|
Patch70: newlib-gcn-libm-fix.patch
|
||||||
|
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
Summary: The GNU C Compiler and Support Files
|
Summary: The GNU C Compiler and Support Files
|
||||||
@@ -2244,6 +2262,96 @@ Runtime library for the GNU Modula-2 language.
|
|||||||
|
|
||||||
%postun -n libm2min%{libm2_sover}%{libm2_suffix}-64bit -p /sbin/ldconfig
|
%postun -n libm2min%{libm2_sover}%{libm2_suffix}-64bit -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%package cobol
|
||||||
|
Summary: GNU GCC COBOL Compiler
|
||||||
|
License: GPL-3.0-or-later
|
||||||
|
Group: Development/Languages/Other
|
||||||
|
Requires: gcc15 = %{version}-%{release}
|
||||||
|
Requires: gcc15-cobol = %{version}-%{release}
|
||||||
|
Requires: libgcobol%{libgcobol_sover} >= %{version}-%{release}
|
||||||
|
%ifarch %quadmath_arch
|
||||||
|
Requires: libquadmath%{libquadmath_sover}-devel%{libdevel_suffix} = %{version}-%{release}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description cobol
|
||||||
|
This package contains a COBOL compiler.
|
||||||
|
|
||||||
|
%package cobol-32bit
|
||||||
|
Summary: GNU GCC COBOL Compiler
|
||||||
|
License: GPL-3.0-or-later
|
||||||
|
Group: Development/Languages/Other
|
||||||
|
Requires: gcc15-32bit = %{version}-%{release}
|
||||||
|
Requires: gcc15-cobol = %{version}-%{release}
|
||||||
|
Requires: libgcobol%{libgcobol_sover}-32bit >= %{version}-%{release}
|
||||||
|
%ifarch %quadmath_arch
|
||||||
|
Requires: libquadmath%{libquadmath_sover}-devel%{libdevel_suffix}-32bit = %{version}-%{release}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description cobol-32bit
|
||||||
|
This package contains a COBOL compiler.
|
||||||
|
|
||||||
|
%package cobol-64bit
|
||||||
|
Summary: GNU GCC COBOL Compiler
|
||||||
|
License: GPL-3.0-or-later
|
||||||
|
Group: Development/Languages/Other
|
||||||
|
Requires: gcc15-64bit = %{version}-%{release}
|
||||||
|
Requires: gcc15-cobol = %{version}-%{release}
|
||||||
|
Requires: libgcobol%{libgcobol_sover}-64bit >= %{version}-%{release}
|
||||||
|
%ifarch %quadmath_arch
|
||||||
|
Requires: libquadmath%{libquadmath_sover}-devel%{libdevel_suffix}-64bit = %{version}-%{release}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description cobol-64bit
|
||||||
|
This package contains a COBOL compiler.
|
||||||
|
|
||||||
|
%package -n libgcobol%{libgcobol_sover}%{libgcobol_suffix}
|
||||||
|
Summary: GNU GCC COBOL compiler runtime library
|
||||||
|
License: BSD-3-Clause
|
||||||
|
Group: Development/Languages/Other
|
||||||
|
Provides: libgcobol%{libgcobol_sover} = %{version}-%{release}
|
||||||
|
# Only one package may provide this - allows multiple gcc versions
|
||||||
|
# to co-exist without an overly large list of provides/obsoletes
|
||||||
|
Conflicts: libgcobol%{libgcobol_sover}
|
||||||
|
|
||||||
|
%description -n libgcobol%{libgcobol_sover}%{libgcobol_suffix}
|
||||||
|
Runtime library for the GNU GCC COBOL language.
|
||||||
|
|
||||||
|
%post -n libgcobol%{libgcobol_sover}%{libgcobol_suffix} -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun -n libgcobol%{libgcobol_sover}%{libgcobol_suffix} -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%package -n libgcobol%{libgcobol_sover}%{libgcobol_suffix}-32bit
|
||||||
|
Summary: GNU GCC COBOL compiler runtime library
|
||||||
|
License: BSD-3-Clause
|
||||||
|
Group: Development/Languages/Other
|
||||||
|
Provides: libgcobol%{libgcobol_sover}-32bit = %{version}-%{release}
|
||||||
|
# Only one package may provide this - allows multiple gcc versions
|
||||||
|
# to co-exist without an overly large list of provides/obsoletes
|
||||||
|
Conflicts: libgcobol%{libgcobol_sover}-32bit
|
||||||
|
|
||||||
|
%description -n libgcobol%{libgcobol_sover}%{libgcobol_suffix}-32bit
|
||||||
|
Runtime library for the GNU GCC COBOL language.
|
||||||
|
|
||||||
|
%post -n libgcobol%{libgcobol_sover}%{libgcobol_suffix}-32bit -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun -n libgcobol%{libgcobol_sover}%{libgcobol_suffix}-32bit -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%package -n libgcobol%{libgcobol_sover}%{libgcobol_suffix}-64bit
|
||||||
|
Summary: GNU GCC COBOL compiler runtime library
|
||||||
|
License: BSD-3-Clause
|
||||||
|
Group: Development/Languages/Other
|
||||||
|
Provides: libgcobol%{libgcobol_sover}-64bit = %{version}-%{release}
|
||||||
|
# Only one package may provide this - allows multiple gcc versions
|
||||||
|
# to co-exist without an overly large list of provides/obsoletes
|
||||||
|
Conflicts: libgcobol%{libgcobol_sover}-64bit
|
||||||
|
|
||||||
|
%description -n libgcobol%{libgcobol_sover}%{libgcobol_suffix}-64bit
|
||||||
|
Runtime library for the GNU GCC COBOL language.
|
||||||
|
|
||||||
|
%post -n libgcobol%{libgcobol_sover}%{libgcobol_suffix}-64bit -p /sbin/ldconfig
|
||||||
|
|
||||||
|
%postun -n libgcobol%{libgcobol_sover}%{libgcobol_suffix}-64bit -p /sbin/ldconfig
|
||||||
|
|
||||||
%package -n gcc15-testresults
|
%package -n gcc15-testresults
|
||||||
Summary: Testsuite results
|
Summary: Testsuite results
|
||||||
License: SUSE-Public-Domain
|
License: SUSE-Public-Domain
|
||||||
@@ -2354,6 +2462,7 @@ Results from running the gcc and target library testsuites.
|
|||||||
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1}
|
||||||
%setup -q -n gcc-%{version} -a 5
|
%setup -q -n gcc-%{version} -a 5
|
||||||
ln -s newlib-4.5.0.20241231/newlib .
|
ln -s newlib-4.5.0.20241231/newlib .
|
||||||
|
%patch -p1 -P 70
|
||||||
%else
|
%else
|
||||||
%setup -q -n gcc-%{version}
|
%setup -q -n gcc-%{version}
|
||||||
%endif
|
%endif
|
||||||
@@ -2452,6 +2561,9 @@ languages=$languages,rust
|
|||||||
%if %{build_m2}
|
%if %{build_m2}
|
||||||
languages=$languages,m2
|
languages=$languages,m2
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
languages=$languages,cobol
|
||||||
|
%endif
|
||||||
|
|
||||||
# In general we want to ship release checking enabled compilers
|
# In general we want to ship release checking enabled compilers
|
||||||
# which is the default for released compilers
|
# which is the default for released compilers
|
||||||
@@ -2513,6 +2625,9 @@ export GDC=gdc-11
|
|||||||
--libdir=%{_libdir} \
|
--libdir=%{_libdir} \
|
||||||
--libexecdir=%{_libdir} \
|
--libexecdir=%{_libdir} \
|
||||||
--enable-languages=$languages \
|
--enable-languages=$languages \
|
||||||
|
%if !0%{?is_opensuse}
|
||||||
|
--enable-host-pie \
|
||||||
|
%endif
|
||||||
%if %{build_nvptx} || %{build_gcn}
|
%if %{build_nvptx} || %{build_gcn}
|
||||||
--enable-offload-targets=\
|
--enable-offload-targets=\
|
||||||
%if %{build_nvptx}
|
%if %{build_nvptx}
|
||||||
@@ -2578,11 +2693,11 @@ amdgcn-amdhsa,\
|
|||||||
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
%ifarch %ix86 x86_64 ppc ppc64 ppc64le %arm aarch64 s390 s390x %sparc
|
||||||
--enable-gnu-indirect-function \
|
--enable-gnu-indirect-function \
|
||||||
%endif
|
%endif
|
||||||
--program-suffix=%{binsuffix} \
|
|
||||||
%ifarch %{disable_multilib_arch}
|
%ifarch %{disable_multilib_arch}
|
||||||
--disable-multilib \
|
--disable-multilib \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{!?gcc_target_arch:1}
|
%if 0%{!?gcc_target_arch:1}
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
%ifarch ia64
|
%ifarch ia64
|
||||||
--with-system-libunwind \
|
--with-system-libunwind \
|
||||||
%else
|
%else
|
||||||
@@ -2590,6 +2705,9 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?gcc_target_arch:1}
|
%if 0%{?gcc_target_arch:1}
|
||||||
|
%if %{suse_version} < 1600
|
||||||
|
--program-suffix=%{binsuffix} \
|
||||||
|
%endif
|
||||||
--program-prefix=%{gcc_target_arch}- \
|
--program-prefix=%{gcc_target_arch}- \
|
||||||
--target=%{gcc_target_arch} \
|
--target=%{gcc_target_arch} \
|
||||||
--disable-nls \
|
--disable-nls \
|
||||||
@@ -2622,10 +2740,6 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "bpf"
|
%if "%{TARGET_ARCH}" == "bpf"
|
||||||
--disable-gcov \
|
--disable-gcov \
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "spu"
|
|
||||||
--with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
|
|
||||||
--with-newlib \
|
|
||||||
%endif
|
|
||||||
%if "%{TARGET_ARCH}" == "nvptx"
|
%if "%{TARGET_ARCH}" == "nvptx"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--disable-sjlj-exceptions \
|
--disable-sjlj-exceptions \
|
||||||
@@ -2634,6 +2748,9 @@ amdgcn-amdhsa,\
|
|||||||
%if "%{TARGET_ARCH}" == "amdgcn"
|
%if "%{TARGET_ARCH}" == "amdgcn"
|
||||||
--enable-as-accelerator-for=%{GCCDIST} \
|
--enable-as-accelerator-for=%{GCCDIST} \
|
||||||
--enable-libgomp \
|
--enable-libgomp \
|
||||||
|
%if 0%{?product_libs_llvm_ver} >= 19
|
||||||
|
--with-multilib-list=gfx900,gfx906,gfx908,gfx90a,gfx90c,gfx1030,gfx1036,gfx1100,gfx1103,gfx9-generic,gfx10-3-generic,gfx11-generic \
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "avr"
|
%if "%{TARGET_ARCH}" == "avr"
|
||||||
--enable-lto \
|
--enable-lto \
|
||||||
@@ -2677,7 +2794,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-cpu=power9 \
|
--with-cpu=power9 \
|
||||||
--with-tune=power9 \
|
--with-tune=power10 \
|
||||||
%else
|
%else
|
||||||
%if %{suse_version} >= 1350
|
%if %{suse_version} >= 1350
|
||||||
--with-cpu=power8 \
|
--with-cpu=power8 \
|
||||||
@@ -2741,7 +2858,7 @@ amdgcn-amdhsa,\
|
|||||||
%endif
|
%endif
|
||||||
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
%if "%{TARGET_ARCH}" == "s390" || "%{TARGET_ARCH}" == "s390x"
|
||||||
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
%if %{suse_version} >= 1600 && !0%{?is_opensuse}
|
||||||
--with-tune=z14 --with-arch=z14 \
|
--with-tune=z15 --with-arch=z14 \
|
||||||
%else
|
%else
|
||||||
--with-tune=zEC12 --with-arch=z196 \
|
--with-tune=zEC12 --with-arch=z196 \
|
||||||
%endif
|
%endif
|
||||||
@@ -2783,7 +2900,7 @@ export QEMU_STACK_SIZE=64M
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
STAGE1_FLAGS="-g -O2"
|
STAGE1_FLAGS="-g -O2"
|
||||||
%if 0%{?do_profiling} && !0%{?building_testsuite:1}
|
%if 0%{?do_profiling} && !0%{?building_testsuite:1} && !0%{?want_reproducible_builds}
|
||||||
%ifarch x86_64 %ix86 ppc64le s390x aarch64
|
%ifarch x86_64 %ix86 ppc64le s390x aarch64
|
||||||
%if %{with bootstrap}
|
%if %{with bootstrap}
|
||||||
%define use_pgo_bootstrap 1
|
%define use_pgo_bootstrap 1
|
||||||
@@ -2807,6 +2924,8 @@ mkdir ../testresults
|
|||||||
../contrib/test_summary | tee ../testresults/test_summary.txt
|
../contrib/test_summary | tee ../testresults/test_summary.txt
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%define __provides_exclude_from ^%{libsubdir}/.*\.so.*$
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# Make sure libtool re-linking libasan at install time doesn't drop the
|
# Make sure libtool re-linking libasan at install time doesn't drop the
|
||||||
# libstdc++ reference to make asan of C++ modules in python work
|
# libstdc++ reference to make asan of C++ modules in python work
|
||||||
@@ -2833,7 +2952,8 @@ for lib in libobjc libgfortran libquadmath libcaf_single \
|
|||||||
libgo libasan libhwasan libatomic libitm libtsan liblsan libubsan libvtv \
|
libgo libasan libhwasan libatomic libitm libtsan liblsan libubsan libvtv \
|
||||||
libstdc++fs libgomp-plugin-nvptx libgomp-plugin-gcn \
|
libstdc++fs libgomp-plugin-nvptx libgomp-plugin-gcn \
|
||||||
libgdruntime libgphobos libstdc++exp \
|
libgdruntime libgphobos libstdc++exp \
|
||||||
libm2cor libm2iso libm2log libm2min libm2pim; do
|
libm2cor libm2iso libm2log libm2min libm2pim \
|
||||||
|
libgcobol; do
|
||||||
rm -f %{buildroot}/%{versmainlibdir}/$lib.la
|
rm -f %{buildroot}/%{versmainlibdir}/$lib.la
|
||||||
%if %{biarch}
|
%if %{biarch}
|
||||||
rm -f %{buildroot}/%{versmainlibdirbi}/$lib.la
|
rm -f %{buildroot}/%{versmainlibdirbi}/$lib.la
|
||||||
@@ -2895,7 +3015,8 @@ if ! test -z "$dir_ml"; then
|
|||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# move shared libs from versionspecific dir to main libdir
|
# move shared libs from versionspecific dir to main libdir, keep a copy
|
||||||
|
# for link-editing in the .so
|
||||||
for libname in \
|
for libname in \
|
||||||
%if %{build_fortran}
|
%if %{build_fortran}
|
||||||
libgfortran \
|
libgfortran \
|
||||||
@@ -2930,6 +3051,9 @@ for libname in \
|
|||||||
libm2pim \
|
libm2pim \
|
||||||
libm2min \
|
libm2min \
|
||||||
%endif
|
%endif
|
||||||
|
%if %{build_cobol}
|
||||||
|
libgcobol \
|
||||||
|
%endif
|
||||||
%ifarch %atomic_arch
|
%ifarch %atomic_arch
|
||||||
libatomic \
|
libatomic \
|
||||||
%endif
|
%endif
|
||||||
@@ -2959,8 +3083,16 @@ for libname in \
|
|||||||
mv $lib %{buildroot}/%{mainlibdir}/
|
mv $lib %{buildroot}/%{mainlibdir}/
|
||||||
done
|
done
|
||||||
if test -L %{buildroot}/%{versmainlibdir}/$libname.so; then
|
if test -L %{buildroot}/%{versmainlibdir}/$libname.so; then
|
||||||
ln -sf %{mainlibdir}/`readlink %{buildroot}/%{versmainlibdir}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \
|
cp %{buildroot}/%{mainlibdir}/`readlink %{buildroot}/%{versmainlibdir}/$libname.so` \
|
||||||
%{buildroot}/%{versmainlibdir}/$libname.so
|
%{buildroot}/%{versmainlibdir}/$libname.so.tem
|
||||||
|
rm %{buildroot}/%{versmainlibdir}/$libname.so
|
||||||
|
mv %{buildroot}/%{versmainlibdir}/$libname.so.tem %{buildroot}/%{versmainlibdir}/$libname.so
|
||||||
|
strip -g %{buildroot}/%{versmainlibdir}/$libname.so
|
||||||
|
else
|
||||||
|
if test -e %{buildroot}/%{versmainlibdir}/$libname.so; then
|
||||||
|
echo ERROR: unexpected linker script for $libname.so
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
%if %{biarch}
|
%if %{biarch}
|
||||||
if test -d %{buildroot}/%{versmainlibdirbi}; then
|
if test -d %{buildroot}/%{versmainlibdirbi}; then
|
||||||
@@ -2968,8 +3100,16 @@ for libname in \
|
|||||||
mv $lib %{buildroot}/%{mainlibdirbi}/
|
mv $lib %{buildroot}/%{mainlibdirbi}/
|
||||||
done
|
done
|
||||||
if test -L %{buildroot}/%{versmainlibdirbi}/$libname.so; then
|
if test -L %{buildroot}/%{versmainlibdirbi}/$libname.so; then
|
||||||
ln -sf %{mainlibdirbi}/`readlink %{buildroot}/%{versmainlibdirbi}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \
|
cp %{buildroot}/%{mainlibdirbi}/`readlink %{buildroot}/%{versmainlibdirbi}/$libname.so` \
|
||||||
%{buildroot}/%{versmainlibdirbi}/$libname.so
|
%{buildroot}/%{versmainlibdirbi}/$libname.so.tem
|
||||||
|
rm %{buildroot}/%{versmainlibdirbi}/$libname.so
|
||||||
|
mv %{buildroot}/%{versmainlibdirbi}/$libname.so.tem %{buildroot}/%{versmainlibdirbi}/$libname.so
|
||||||
|
strip -g %{buildroot}/%{versmainlibdirbi}/$libname.so
|
||||||
|
else
|
||||||
|
if test -e %{buildroot}/%{versmainlibdirbi}/$libname.so; then
|
||||||
|
echo ERROR: unexpected linker script for $libname.so
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
%endif
|
%endif
|
||||||
@@ -2989,40 +3129,50 @@ sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' %{buildroot}/%{_
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Move libgcc_s around
|
# Move libgcc_s around, make sure a version specific copy is available
|
||||||
|
# for link editing
|
||||||
|
chmod a+x %{buildroot}/%{_lib}/libgcc_s.so.%{libgcc_s}
|
||||||
if test -L %{buildroot}/%{_lib}/libgcc_s.so; then
|
if test -L %{buildroot}/%{_lib}/libgcc_s.so; then
|
||||||
rm -f %{buildroot}/%{_lib}/libgcc_s.so
|
rm -f %{buildroot}/%{_lib}/libgcc_s.so
|
||||||
ln -sf /%{_lib}/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdir}/libgcc_s.so
|
cp %{buildroot}//%{_lib}/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdir}/libgcc_s.so
|
||||||
|
strip -g %{buildroot}/%{versmainlibdir}/libgcc_s.so
|
||||||
else
|
else
|
||||||
mv %{buildroot}/%{_lib}/libgcc_s.so %{buildroot}/%{versmainlibdir}/
|
mv %{buildroot}/%{_lib}/libgcc_s.so %{buildroot}/%{versmainlibdir}/
|
||||||
|
cp %{buildroot}//%{_lib}/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdir}/libgcc_s.so.%{libgcc_s}
|
||||||
|
strip -g %{buildroot}/%{versmainlibdir}/libgcc_s.so.%{libgcc_s}
|
||||||
fi
|
fi
|
||||||
chmod a+x %{buildroot}/%{_lib}/libgcc_s.so.%{libgcc_s}
|
|
||||||
%if 0%{?usrmerged}
|
%if 0%{?usrmerged}
|
||||||
mv %{buildroot}/%{_lib}/libgcc_s.so.%{libgcc_s} %{buildroot}/%{_slibdir}/libgcc_s.so.%{libgcc_s}
|
mv %{buildroot}/%{_lib}/libgcc_s.so.%{libgcc_s} %{buildroot}/%{_slibdir}/libgcc_s.so.%{libgcc_s}
|
||||||
%endif
|
%endif
|
||||||
%if %{biarch}
|
%if %{biarch}
|
||||||
|
chmod a+x %{buildroot}/lib/libgcc_s.so.%{libgcc_s}
|
||||||
%if %{build_primary_64bit}
|
%if %{build_primary_64bit}
|
||||||
if test -L %{buildroot}/lib/libgcc_s.so; then
|
if test -L %{buildroot}/lib/libgcc_s.so; then
|
||||||
rm -f %{buildroot}/lib/libgcc_s.so
|
rm -f %{buildroot}/lib/libgcc_s.so
|
||||||
ln -sf /lib/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi32}/libgcc_s.so
|
cp %{buildroot}/lib/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi32}/libgcc_s.so
|
||||||
|
strip -g %{buildroot}/%{versmainlibdirbi32}/libgcc_s.so
|
||||||
else
|
else
|
||||||
mv %{buildroot}/lib/libgcc_s.so %{buildroot}/%{versmainlibdirbi32}/
|
mv %{buildroot}/lib/libgcc_s.so %{buildroot}/%{versmainlibdirbi32}/
|
||||||
|
cp %{buildroot}/lib/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi32}/libgcc_s.so.%{libgcc_s}
|
||||||
|
strip -g %{buildroot}/%{versmainlibdirbi32}/libgcc_s.so.%{libgcc_s}
|
||||||
fi
|
fi
|
||||||
ln -sf %{versmainlibdirbi32}/libgcc_s.so %{buildroot}/%{versmainlibdirbi32}/libgcc_s_32.so
|
ln -sf %{versmainlibdirbi32}/libgcc_s.so %{buildroot}/%{versmainlibdirbi32}/libgcc_s_32.so
|
||||||
chmod a+x %{buildroot}/lib/libgcc_s.so.%{libgcc_s}
|
|
||||||
%if 0%{?usrmerged}
|
%if 0%{?usrmerged}
|
||||||
mv %{buildroot}/lib/libgcc_s.so.%{libgcc_s} %{buildroot}/%{slibdir}/libgcc_s.so.%{libgcc_s}
|
mv %{buildroot}/lib/libgcc_s.so.%{libgcc_s} %{buildroot}/%{slibdir}/libgcc_s.so.%{libgcc_s}
|
||||||
%endif
|
%endif
|
||||||
%else
|
%else
|
||||||
# 32-bit biarch systems
|
# 32-bit biarch systems
|
||||||
|
chmod a+x %{buildroot}/lib64/libgcc_s.so.%{libgcc_s}
|
||||||
if test -L %{buildroot}/lib64/libgcc_s.so; then
|
if test -L %{buildroot}/lib64/libgcc_s.so; then
|
||||||
rm -f %{buildroot}/lib64/libgcc_s.so
|
rm -f %{buildroot}/lib64/libgcc_s.so
|
||||||
ln -sf /lib64/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi64}/libgcc_s.so
|
cp %{buildroot}/lib64/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi64}/libgcc_s.so
|
||||||
|
strip -g %{buildroot}/%{versmainlibdirbi64}/libgcc_s.so
|
||||||
else
|
else
|
||||||
mv %{buildroot}/lib64/libgcc_s.so %{buildroot}/%{versmainlibdirbi64}/
|
mv %{buildroot}/lib64/libgcc_s.so %{buildroot}/%{versmainlibdirbi64}/
|
||||||
|
cp %{buildroot}/lib64/libgcc_s.so.%{libgcc_s} %{buildroot}/%{versmainlibdirbi64}/libgcc_s.so.%{libgcc_s}
|
||||||
|
strip -g %{buildroot}/%{versmainlibdirbi64}/libgcc_s.so.%{libgcc_s}
|
||||||
fi
|
fi
|
||||||
ln -sf %{versmainlibdirbi64}/libgcc_s.so %{buildroot}/%{versmainlibdirbi64}/libgcc_s_64.so
|
ln -sf %{versmainlibdirbi64}/libgcc_s.so %{buildroot}/%{versmainlibdirbi64}/libgcc_s_64.so
|
||||||
chmod a+x %{buildroot}/lib64/libgcc_s.so.%{libgcc_s}
|
|
||||||
%if 0%{?usrmerged}
|
%if 0%{?usrmerged}
|
||||||
mv %{buildroot}/lib64/libgcc_s.so.%{libgcc_s} %{buildroot}/%{slibdir64}/libgcc_s.so.%{libgcc_s}
|
mv %{buildroot}/lib64/libgcc_s.so.%{libgcc_s} %{buildroot}/%{slibdir64}/libgcc_s.so.%{libgcc_s}
|
||||||
%endif
|
%endif
|
||||||
@@ -3076,7 +3226,7 @@ chmod 644 ../testresults/*
|
|||||||
%endif
|
%endif
|
||||||
# Remove files that we do not need to clean up filelist
|
# Remove files that we do not need to clean up filelist
|
||||||
|
|
||||||
# Preserve %{GCCDIST}-gcc%{binsuffix} binary for libgccjit as it is used as a driver
|
# Preserve %%{GCCDIST}-gcc%%{binsuffix} binary for libgccjit as it is used as a driver
|
||||||
mv %{buildroot}/%{_prefix}/bin/%{GCCDIST}-gcc%{binsuffix} %{buildroot}
|
mv %{buildroot}/%{_prefix}/bin/%{GCCDIST}-gcc%{binsuffix} %{buildroot}
|
||||||
rm -f %{buildroot}/%{_prefix}/bin/%{GCCDIST}-*
|
rm -f %{buildroot}/%{_prefix}/bin/%{GCCDIST}-*
|
||||||
mv %{buildroot}/%{GCCDIST}-gcc%{binsuffix} %{buildroot}/%{_prefix}/bin/
|
mv %{buildroot}/%{GCCDIST}-gcc%{binsuffix} %{buildroot}/%{_prefix}/bin/
|
||||||
@@ -3442,7 +3592,6 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc15-locale.lang
|
|||||||
%{libsubdir}/include/sm4intrin.h
|
%{libsubdir}/include/sm4intrin.h
|
||||||
%{libsubdir}/include/avx512bitalgvlintrin.h
|
%{libsubdir}/include/avx512bitalgvlintrin.h
|
||||||
%{libsubdir}/include/usermsrintrin.h
|
%{libsubdir}/include/usermsrintrin.h
|
||||||
%{libsubdir}/include/avx10_2roundingintrin.h
|
|
||||||
%{libsubdir}/include/avx10_2-512bf16intrin.h
|
%{libsubdir}/include/avx10_2-512bf16intrin.h
|
||||||
%{libsubdir}/include/avx10_2-512convertintrin.h
|
%{libsubdir}/include/avx10_2-512convertintrin.h
|
||||||
%{libsubdir}/include/avx10_2-512mediaintrin.h
|
%{libsubdir}/include/avx10_2-512mediaintrin.h
|
||||||
@@ -3473,7 +3622,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc15-locale.lang
|
|||||||
%versmainlib *crt*.o
|
%versmainlib *crt*.o
|
||||||
%versmainlib libgcc*.a
|
%versmainlib libgcc*.a
|
||||||
%versmainlib libgcov.a
|
%versmainlib libgcov.a
|
||||||
%versmainlib libgcc_s*.so
|
%versmainlib libgcc_s*.so*
|
||||||
%versmainlib libgomp.so
|
%versmainlib libgomp.so
|
||||||
%versmainlib libgomp.a
|
%versmainlib libgomp.a
|
||||||
%versmainlib libgomp.spec
|
%versmainlib libgomp.spec
|
||||||
@@ -3539,7 +3688,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc15-locale.lang
|
|||||||
%versbiarchlib *crt*.o
|
%versbiarchlib *crt*.o
|
||||||
%versbiarchlib libgcc*.a
|
%versbiarchlib libgcc*.a
|
||||||
%versbiarchlib libgcov.a
|
%versbiarchlib libgcov.a
|
||||||
%versbiarchlib libgcc_s*.so
|
%versbiarchlib libgcc_s*.so*
|
||||||
%versbiarchlib libgomp.so
|
%versbiarchlib libgomp.so
|
||||||
%versbiarchlib libgomp.a
|
%versbiarchlib libgomp.a
|
||||||
%versbiarchlib libgomp.spec
|
%versbiarchlib libgomp.spec
|
||||||
@@ -4187,6 +4336,34 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc15-locale.lang
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{build_cobol}
|
||||||
|
%files cobol
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%dir %{_datadir}/gcobol
|
||||||
|
%dir %{_datadir}/gcobol/udf
|
||||||
|
%{_datadir}/gcobol/udf/stored-char-length.cbl
|
||||||
|
%{_prefix}/bin/gcobol%{binsuffix}
|
||||||
|
%{_prefix}/bin/gcobc%{binsuffix}
|
||||||
|
%{libsubdir}/cobol1
|
||||||
|
%versmainlib libgcobol.a
|
||||||
|
%versmainlib libgcobol.so
|
||||||
|
%versmainlib libgcobol.spec
|
||||||
|
%doc %{_mandir}/man1/gcobol%{binsuffix}.1.gz
|
||||||
|
%doc %{_mandir}/man3/gcobol-io%{binsuffix}.3.gz
|
||||||
|
|
||||||
|
%if %{separate_biarch}
|
||||||
|
# 32bit not supported sofar
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files -n libgcobol%{libgcobol_sover}%{libgcobol_suffix}
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%mainlib libgcobol.so.%{libgcobol_sover}*
|
||||||
|
|
||||||
|
%if %{separate_biarch}
|
||||||
|
# 32bit not supported sofar
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?run_tests:1}
|
%if 0%{?run_tests:1}
|
||||||
%files -n gcc15-testresults
|
%files -n gcc15-testresults
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
45
newlib-gcn-libm-fix.patch
Normal file
45
newlib-gcn-libm-fix.patch
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
From 2ef1a37e7823b21eda524972c006e0e8c26f97b3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andrew Stubbs <ams@baylibre.com>
|
||||||
|
Date: Thu, 20 Mar 2025 09:32:31 +0000
|
||||||
|
Subject: [PATCH] Fix GCN SIMD libm bug
|
||||||
|
|
||||||
|
Since January, GCC has been miscompiling Newlib libm on AMD GCN due to
|
||||||
|
undefined behaviour in the RESIZE_VECTOR macro. It was "working" but expanding
|
||||||
|
the size of a vector would no longer zero the additional lanes, as it expected.
|
||||||
|
|
||||||
|
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119325
|
||||||
|
---
|
||||||
|
newlib/libm/machine/amdgcn/amdgcn_veclib.h | 17 +++++++++++++++--
|
||||||
|
1 file changed, 15 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/newlib/libm/machine/amdgcn/amdgcn_veclib.h b/newlib/libm/machine/amdgcn/amdgcn_veclib.h
|
||||||
|
index bd67740ac..9e9d3ebf0 100644
|
||||||
|
--- a/newlib/libm/machine/amdgcn/amdgcn_veclib.h
|
||||||
|
+++ b/newlib/libm/machine/amdgcn/amdgcn_veclib.h
|
||||||
|
@@ -85,8 +85,21 @@ typedef union {
|
||||||
|
|
||||||
|
#define RESIZE_VECTOR(to_t, from) \
|
||||||
|
({ \
|
||||||
|
- __auto_type __from = (from); \
|
||||||
|
- *((to_t *) &__from); \
|
||||||
|
+ to_t __to; \
|
||||||
|
+ if (VECTOR_WIDTH (to_t) < VECTOR_WIDTH (__typeof (from))) \
|
||||||
|
+ asm ("; no-op cast %0" : "=v"(__to) : "0"(from)); \
|
||||||
|
+ else \
|
||||||
|
+ { \
|
||||||
|
+ unsigned long __mask = -1L; \
|
||||||
|
+ int lanes = VECTOR_WIDTH (__typeof (from)); \
|
||||||
|
+ __mask <<= lanes; \
|
||||||
|
+ __builtin_choose_expr ( \
|
||||||
|
+ V_SF_SI_P (to_t), \
|
||||||
|
+ ({asm ("v_mov_b32 %0, 0" : "=v"(__to) : "0"(from), "e"(__mask));}), \
|
||||||
|
+ ({asm ("v_mov_b32 %H0, 0\n\t" \
|
||||||
|
+ "v_mov_b32 %L0, 0" : "=v"(__to) : "0"(from), "e"(__mask));})); \
|
||||||
|
+ } \
|
||||||
|
+ __to; \
|
||||||
|
})
|
||||||
|
|
||||||
|
/* Bit-wise cast vector FROM to type TO_T. */
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
Reference in New Issue
Block a user