-
Notifications
You must be signed in to change notification settings - Fork 50
/
riscv-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 16
sha256 cellar: :any_skip_relocation, sonoma: "8b113d5d62273085c243fa6c3dd016ee4e2bf7cb5200b7f893e6f8668d72ccf3"
sha256 cellar: :any_skip_relocation, arm64_sonoma: "54449a5b098c42e5b147474b7db7b7d66609f9fbb9f2c15db3b5d5200128c749"
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