Add support for riscv64

Disable tests for riscv64 (there might be failure, to be tested).
Lower debuginfo verbosify for riscv64.
Incl. a number of upstream changes for detecting riscv64 and detecting
atomic support on riscv64.

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
This commit is contained in:
David Abdurachmanov 2020-03-30 12:25:45 +03:00
parent fd73a563f7
commit 0a30062c3c
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
1 changed files with 13 additions and 4 deletions

View File

@ -40,7 +40,7 @@
Name: %{pkg_name}
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}.0.riscv64%{?dist}
Summary: The Low Level Virtual Machine
License: NCSA
@ -61,6 +61,12 @@ Source4: https://prereleases.llvm.org/%{version}/hans-gpg-key.asc
Patch0: 0001-CMake-Split-static-library-exports-into-their-own-ex.patch
Patch1: 0001-CMake-Split-test-binary-exports-into-their-own-expor.patch
Patch20: D68899-de1c2877a9ff12899ef50e179ade748fba8ab0c0.patch
Patch21: D69003-09856feb3cc141f4f9c8b9edec28602ac4f21575.patch
Patch22: D69444-d4a4a32cd94eccbaaa4608b0daac8b820e041214.patch
Patch23: f128f442a3d23674bee19ae18e29f92c9dfe40cd.patch
Patch24: D68964-cef85193b2cc1817ca43199a0ae9c6f25723997d.patch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: cmake
@ -170,7 +176,7 @@ pathfix.py -i %{__python3} -pn \
mkdir -p _build
cd _build
%ifarch s390 %{arm} %ix86
%ifarch s390 %{arm} %ix86 riscv64
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%endif
@ -186,7 +192,7 @@ cd _build
-DLLVM_PARALLEL_LINK_JOBS=1 \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_RPATH=";" \
%ifarch s390 %{arm} %ix86
%ifarch s390 %{arm} %ix86 riscv64
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
%endif
@ -367,7 +373,7 @@ rm -Rf %{build_install_prefix}/share/opt-viewer
%check
# TODO: Fix test failures on arm
ninja check-all -C _build || \
%ifarch %{arm}
%ifarch %{arm} riscv64
:
%else
false
@ -485,6 +491,9 @@ fi
%endif
%changelog
* Mon Mar 30 2020 David Abdurachmanov <david.abdurachmanov@sifive.com> - 10.0.0-1.0.riscv64
- Add support for riscv64
* Wed Mar 25 2020 sguelton@redhat.com - 10.0.0-1
- 10.0.0 final