From fae1a1226e51806b2f295d82a2c81150938fe6a3 Mon Sep 17 00:00:00 2001 From: laokz Date: Mon, 15 Sep 2025 07:10:41 +0000 Subject: [PATCH] building with gcc-toolset-14-binutils on riscv64 Signed-off-by: laokz Tested-by: jchzhou --- gcc-14.spec | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/gcc-14.spec b/gcc-14.spec index 98654dc..a1fcf54 100644 --- a/gcc-14.spec +++ b/gcc-14.spec @@ -90,7 +90,7 @@ Summary: Various compilers (C, C++, Objective-C, ...) Name: %{?_scl_prefix}gcc%{gcc_ver} Version: 14.3.1 -Release: 6 +Release: 7 # libgcc, libgfortran, libgomp, libstdc++ and crtstuff have # GCC Runtime Exception. License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD @@ -100,7 +100,16 @@ URL: http://gcc.gnu.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +# for supporting riscv64 RVA23 profile +%ifarch riscv64 +%if 0%{?scl:1} +BuildRequires: gcc-toolset-14-binutils +%else +BuildRequires: binutils >= 2.31 +%endif +%else BuildRequires: binutils >= 2.31 +%endif BuildRequires: glibc-headers BuildRequires: libtool, zlib-devel, texinfo, gettext, flex, bison, sharutils BuildRequires: gmp-devel >= 4.1.2, mpfr-devel >= 3.1.0, libmpc-devel >= 0.8.1, isl-devel >= 0.15.0 @@ -696,6 +705,9 @@ CC="$CC" CXX="$CXX" \ --enable-languages=c,c++,fortran${enablelobjc}${enablelada}${enablelgo}${enableld},lto \ $CONFIGURE_OPTS +%{?scl:export PATH=%{_bindir}${PATH:+:${PATH}}} +%{?scl:export LD_LIBRARY_PATH=%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}} + %ifarch sparc sparcv9 sparc64 make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" LDFLAGS_FOR_TARGET=-Wl,-z,relro,-z,now %else @@ -2306,6 +2318,9 @@ end %doc rpm.doc/changelogs/libcc1/ChangeLog* %changelog +* Wed Sep 10 2025 jchzhou - 14.3.1-7 +- build with gcc-toolset-14-binutils on RISC-V for supporting RVA23 profile + * Wed Sep 03 2025 dangyuan - 14.3.1-6 - Add support for more RVA32 extensions and several other important extensions -- Gitee