-
Notifications
You must be signed in to change notification settings - Fork 49
/
riscv-isa-sim.rb
43 lines (38 loc) · 1.33 KB
/
riscv-isa-sim.rb
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
class RiscvIsaSim < Formula
desc "RISC-V ISA simulator (spike)"
homepage "http://riscv.org"
url "https://github.com/riscv/riscv-isa-sim.git"
version "main"
bottle do
root_url "http://riscv.org.s3.amazonaws.com/bottles"
rebuild 18
sha256 cellar: :any, sonoma: "32d5d92db762460ec2182ba8471c63b1d57aba464ce3e9c59ea4d6dd831670f1"
sha256 cellar: :any, arm64_sonoma: "91058c888d5c12e05443550139edab82e1329100bf18adf26c7508cff80b79ac"
end
depends_on "dtc"
depends_on "boost" => :optional
opoo "Building with clang could fail due to upstream bug: https://github.com/riscv-software-src/riscv-isa-sim/issues/820" if build.with? "boost"
def install
mkdir "build"
cd "build" do
args = [
"--prefix=#{prefix}", "--with-target=../../riscv-pk/main/riscv64-unknown-elf"
]
if build.with? "boost"
# This seems to be needed at least on macos/arm64
args << "--with-boost=#{Formula["boost"].prefix}"
else
args << "--without-boost"
args << "--without-boost-asio"
args << "--without-boost-regex"
end
# configure uses --with-target to set TARGET_ARCH but homebrew formulas only provide "with"/"without" options
system "../configure", *args
system "make"
system "make", "install"
end
end
test do
system "false"
end
end