blob: 7eb0080ebf739b63a83ed2cdb1feea13fb910e8f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
#
# RISC-V's spike (01252686902fa30665fbecfc1476d169ad1333d1) 1.x.x Version 1.
#
# This configuration file configure's, make's and install's RISC-V's spike simulator.
#
%if %{release} == %{nil}
%define release 1
%endif
Name: spike-%{spike_version}-%{_host}-%{release}
Summary: spike-github
Version: %{spike_version}
Release: %{release}
URL: https://github.com/riscv/riscv-isa-sim/
#
# Source
#
%source set spike --rsb-file=spike-%{spike_version}.tar.gz https://github.com/riscv/riscv-isa-sim/archive/%{spike_version}.tar.gz
%source set fesvr --rsb-file=fesvr-%{fesvr_version}.tar.gz https://github.com/riscv/riscv-fesvr/archive/%{fesvr_version}.tar.gz
#
# Prepare the source code.
#
%prep
build_top=$(pwd)
source_dir_fesvr="riscv-fesvr-%{fesvr_version}"
source_dir_spike="riscv-isa-sim-%{spike_version}"
%source setup fesvr -q -n riscv-fesvr-%{fesvr_version}
%source setup spike -q -n riscv-isa-sim-%{spike_version}
%patch setup fesvr -p1
%patch setup spike -p1
cd ${build_top}
%build
build_top=$(pwd)
%{build_directory}
%{host_build_flags}
cd ${source_dir_fesvr}
./configure \
--prefix=%{_prefix}
%{__make} %{?_smp_mflags} all$
%{__make} install
cd ../${source_dir_spike}
./configure \
--prefix=%{_prefix} \
--with-fesvr=%{_prefix}
%{__make} %{?_smp_mflags} all$
cd ${build_top}
%install
build_top=$(pwd)
rm -rf $SB_BUILD_ROOT
cd riscv-isa-sim-01252686902fa30665fbecfc1476d169ad1333d1
%{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} install
cd ${build_top}
|