Skip to content

Commit 28fd367

Browse files
committed
workaround for enabling rvv
1 parent 94eac5c commit 28fd367

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

riscv-gnu-toolchain.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class RiscvGnuToolchain < Formula
3636

3737
# enabling multilib by default, must choose to build without
3838
option "with-NOmultilib", "Build WITHOUT multilib support"
39+
option "with-enable-rvv", "Workaround to enable RISCV Vector Extension"
3940

4041
depends_on "gawk" => :build
4142
depends_on "gnu-sed" => :build
@@ -51,6 +52,11 @@ def install
5152
# disable crazy flag additions
5253
ENV.delete "CPATH"
5354

55+
if build.with?("enable-rvv")
56+
puts "Enable RISCV Vector Extension"
57+
system "cd", "gcc", " | ", "git", "checkout", "releases/gcc-13"
58+
end
59+
5460
# need to pull in needed submodules (now that they are disabled above)
5561
system "git", "submodule", "update", "--init", "--recursive", "newlib"
5662
system "git", "submodule", "update", "--init", "--recursive", "binutils"

riscv-tools.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ class RiscvTools < Formula
55
version "0.2"
66
sha256 "cb919eb7cf11071c6d11c721a9e77893a2dbe9158466e444eb3dd8476a89b7b4"
77

8+
option "with-enable-rvv", "Workaround to enable RISCV Vector Extension"
9+
810
# install rest of tools
9-
depends_on "riscv-gnu-toolchain"
11+
depends_on "riscv-gnu-toolchain" => [:build, "--with-enable-rvv"]
1012
depends_on "riscv-isa-sim"
1113
depends_on "riscv-pk"
1214

0 commit comments

Comments
 (0)