Add support for riscv64

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2022-08-04 15:38:55 +03:00
parent a6e7b2b18f
commit 8417476e74
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
1 changed files with 15 additions and 6 deletions

View File

@ -1,3 +1,7 @@
%ifarch riscv64
%global debug_package %{nil}
%endif
# rpmbuild parameters:
# --with testsuite: Run the testsuite (biarch if possible). Default is without.
# --with buildisa: Use %%{?_isa} for BuildRequires
@ -51,7 +55,7 @@ Version: 12.1
# The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 5%{?dist}
Release: 5.0.riscv64%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL
# Do not provide URL for snapshots as the file lasts there only for 2 days.
@ -103,7 +107,7 @@ Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages
Obsoletes: gdb64 < 5.3.91
%endif
%ifarch %{arm}
%ifarch %{arm} riscv64
%global have_inproctrace 0
%else
%global have_inproctrace 1
@ -383,7 +387,7 @@ BuildRequires: gcc-gnat
BuildRequires: libgnat%{bits_local} libgnat%{bits_other}
%endif
%else
%ifarch %{ix86} x86_64 ia64 ppc %{power64} alpha s390x %{arm} aarch64
%ifarch %{ix86} x86_64 ia64 ppc %{power64} alpha s390x %{arm} aarch64 riscv64
%if 0%{!?rhel:1}
BuildRequires: gcc-gnat
BuildRequires: libgnat%{bits_local} libgnat%{bits_other}
@ -558,7 +562,7 @@ COMMON_GDB_CONFIGURE_FLAGS="\
,-Wno-format-overflow\
%endif
--enable-build-with-cxx \
%ifnarch %{ix86} alpha ppc s390 s390x x86_64 ppc64 ppc64le sparc sparcv9 sparc64 %{arm} aarch64
%ifnarch %{ix86} alpha ppc s390 s390x x86_64 ppc64 ppc64le sparc sparcv9 sparc64 %{arm} aarch64 riscv64
--disable-werror \
%else
--enable-werror \
@ -642,7 +646,7 @@ export PKG_CONFIG_PATH=%{_libdir}/pkgconfig
%ifarch sparc sparcv9
sparc-%{_vendor}-%{_target_os}%{?_gnu}
%else
--enable-targets=s390-linux-gnu,powerpc-linux-gnu,arm-linux-gnu,aarch64-linux-gnu \
--enable-targets=s390-linux-gnu,powerpc-linux-gnu,arm-linux-gnu,aarch64-linux-gnu,riscv64-linux-gnu \
%{_target_platform}
%endif
@ -747,7 +751,7 @@ $(: ppc64 host build crashes on ppc variant of libexpat.so ) \
%ifarch sparc sparcv9
sparc-%{_vendor}-%{_target_os}%{?_gnu}
%else
--enable-targets=s390-linux-gnu,powerpc-linux-gnu,arm-linux-gnu,aarch64-linux-gnu \
--enable-targets=s390-linux-gnu,powerpc-linux-gnu,arm-linux-gnu,aarch64-linux-gnu,riscv64-linux-gnu \
%{_target_platform}
%endif
@ -1189,6 +1193,11 @@ fi
%endif
%changelog
* Thu Aug 04 2022 David Abdurachmanov <davidlt@rivosinc.com> - 12.1-5.0.riscv64
- Add riscv64-linux-gnu to enabled targets
- Disable inprocess agent for riscv64
- Disable debug packages for riscv64
* Thu Jul 28 2022 Amit Shah <amitshah@fedoraproject.org> - 12.1-5
- Use the dist_name macro to identify the distribution