Add support for RISC-V (riscv64)
Signed-off-by: David Abdurachmanov <david.abdurachmanov@gmail.com>
This commit is contained in:
parent
432475d32b
commit
50161d2f3c
22
llvm.spec
22
llvm.spec
@ -28,6 +28,9 @@
|
||||
%ifarch %{arm}
|
||||
%global llvm_targets ARM;BPF
|
||||
%endif
|
||||
%ifarch riscv64
|
||||
%global llvm_targets RISCV;AMDGPU;BPF
|
||||
%endif
|
||||
|
||||
%if 0%{?compat_build}
|
||||
%global pkg_name llvm%{maj_ver}.%{min_ver}
|
||||
@ -49,7 +52,7 @@
|
||||
|
||||
Name: %{pkg_name}
|
||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
|
||||
Release: 0.1.rc%{rc_ver}%{?dist}
|
||||
Release: 0.1.rc%{rc_ver}.0.riscv64%{?dist}
|
||||
Summary: The Low Level Virtual Machine
|
||||
|
||||
License: NCSA
|
||||
@ -76,7 +79,9 @@ BuildRequires: binutils-devel
|
||||
%endif
|
||||
BuildRequires: libstdc++-static
|
||||
# Enable extra functionality when run the LLVM JIT under valgrind.
|
||||
%ifarch %{valgrind_arches}
|
||||
BuildRequires: valgrind-devel
|
||||
%endif
|
||||
# LLVM's LineEditor library will use libedit if it is available.
|
||||
BuildRequires: libedit-devel
|
||||
|
||||
@ -125,20 +130,28 @@ Static libraries for the LLVM compiler infrastructure.
|
||||
%prep
|
||||
%autosetup -n llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src -p1
|
||||
|
||||
# Update config.guess to detect RISC-V (riscv64)
|
||||
cp -f /usr/lib/rpm/redhat/config.guess ./cmake/config.guess
|
||||
|
||||
%build
|
||||
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
|
||||
|
||||
# Workaround for GCC issue
|
||||
%ifarch riscv64
|
||||
export LDFLAGS="${LDFLAGS} -latomic %{__global_ldflags}"
|
||||
%endif
|
||||
|
||||
# force off shared libs as cmake macros turns it on.
|
||||
%cmake .. -G Ninja \
|
||||
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
%ifarch s390 %{arm} %ix86
|
||||
%ifarch s390 %{arm} %ix86 riscv64
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||
%endif
|
||||
@ -333,6 +346,9 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Sun Aug 12 2018 David Abdurachmanov <david.abdurachmanov@gmail.com> - 7.0.0-0.1.rc1.0.riscv64
|
||||
- Add support for RISC-V (riscv64)
|
||||
|
||||
* Fri Aug 10 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-0.1.rc1
|
||||
- 7.0.0-rc1 Release
|
||||
- Reduce number of enabled targets on all arches.
|
||||
|
Loading…
Reference in New Issue
Block a user