forked from riscv-software-src/homebrew-riscv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathriscv-pk.rb
35 lines (30 loc) · 1.03 KB
/
riscv-pk.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
class RiscvPk < Formula
desc "RISC-V Proxy Kernel"
homepage "http://riscv.org"
url "https://github.com/riscv/riscv-pk.git"
version "main"
bottle do
root_url "http://riscv.org.s3.amazonaws.com/bottles"
rebuild 15
sha256 cellar: :any_skip_relocation, sonoma: "45ab4dd82407aee685ffbd049ad0df0cfced02e4e3c207b4d8d2e91e4ad91351"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "bca6e44547bbc7febc10f0004a007a7c0eb99e239ae99790b83c7d82a0adfbad"
end
depends_on "gnu-sed" => :build
depends_on "riscv-gnu-toolchain" => :build
depends_on "riscv-isa-sim" => :build
def install
# using riscv-gcc from std env
ENV["CC"] = "riscv64-unknown-elf-gcc"
mkdir "build"
cd "build" do
system "../configure", "--prefix=#{prefix}", "--host=riscv64-unknown-elf", \
"--with-arch=rv64imafdc_zifencei"
# Requires gnu-sed's behavior to build, and don't want to change -Wno-unused
inreplace "Makefile", " sed", " gsed"
system "make", "install"
end
end
test do
system "false"
end
end