Add support for riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
parent
1412a43acc
commit
bbf69479e8
20
llvm16.spec
20
llvm16.spec
@ -15,7 +15,11 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%bcond_without compat_build
|
%bcond_without compat_build
|
||||||
|
%ifnarch riscv64
|
||||||
%bcond_without check
|
%bcond_without check
|
||||||
|
%else
|
||||||
|
%bcond_with check
|
||||||
|
%endif
|
||||||
|
|
||||||
#global rc_ver 4
|
#global rc_ver 4
|
||||||
%global maj_ver 16
|
%global maj_ver 16
|
||||||
@ -24,7 +28,12 @@
|
|||||||
%global llvm_srcdir llvm-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
|
%global llvm_srcdir llvm-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
|
||||||
%global cmake_srcdir cmake-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
|
%global cmake_srcdir cmake-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
|
||||||
%global third_party_srcdir third-party-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
|
%global third_party_srcdir third-party-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src
|
||||||
|
%ifnarch riscv64
|
||||||
%global _lto_cflags -flto=thin
|
%global _lto_cflags -flto=thin
|
||||||
|
%else
|
||||||
|
# riscv64: gold is not supported on riscv64
|
||||||
|
%global _lto_cflags %{nil}
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with compat_build}
|
%if %{with compat_build}
|
||||||
%global pkg_name llvm%{maj_ver}
|
%global pkg_name llvm%{maj_ver}
|
||||||
@ -75,7 +84,7 @@
|
|||||||
|
|
||||||
Name: %{pkg_name}
|
Name: %{pkg_name}
|
||||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
|
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
|
||||||
Release: 5%{?dist}
|
Release: 5.0.riscv64%{?dist}
|
||||||
Summary: The Low Level Virtual Machine
|
Summary: The Low Level Virtual Machine
|
||||||
|
|
||||||
License: Apache-2.0 WITH LLVM-exception OR NCSA
|
License: Apache-2.0 WITH LLVM-exception OR NCSA
|
||||||
@ -243,7 +252,7 @@ mv %{third_party_srcdir} third-party
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
%ifarch s390 s390x %{arm} %ix86
|
%ifarch s390 s390x %{arm} %ix86 riscv64
|
||||||
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
|
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
|
||||||
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
||||||
%endif
|
%endif
|
||||||
@ -257,7 +266,7 @@ export ASMFLAGS=$CFLAGS
|
|||||||
-DLLVM_PARALLEL_LINK_JOBS=1 \
|
-DLLVM_PARALLEL_LINK_JOBS=1 \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
||||||
%ifarch s390 %{arm} %ix86
|
%ifarch s390 %{arm} %ix86 riscv64
|
||||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||||
%endif
|
%endif
|
||||||
@ -572,6 +581,11 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Oct 30 2023 David Abdurachmanov <davidlt@rivosinc.com> - 16.0.6-5.0.riscv64
|
||||||
|
- Disable tests on riscv64 for now
|
||||||
|
- Lower memory consumption on riscv64
|
||||||
|
- Disable LTO (ld.gold not supported on riscv64)
|
||||||
|
|
||||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 16.0.6-5
|
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 16.0.6-5
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user