Skip to content

Commit

Permalink
workaround for enabling rvv
Browse files Browse the repository at this point in the history
  • Loading branch information
howjmay committed Oct 7, 2023
1 parent 94eac5c commit 3eb8ee2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion riscv-gnu-toolchain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class RiscvGnuToolchain < Formula

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

depends_on "gawk" => :build
depends_on "gnu-sed" => :build
Expand All @@ -51,10 +52,15 @@ def install
# disable crazy flag additions
ENV.delete "CPATH"

if build.with?("enable-rvv")
puts "Enable RISCV Vector Extension"
system "cd", "gcc", " | ", "git", "checkout", "releases/gcc-13"
end

# need to pull in needed submodules (now that they are disabled above)
system "git", "submodule", "update", "--init", "--recursive", "newlib"
system "git", "submodule", "update", "--init", "--recursive", "binutils"
system "git", "submodule", "update", "--init", "--recursive", "gcc"
system "git", "submodule", "update", "--init", "--recursive", "gcc"

args = [
"--prefix=#{prefix}",
Expand Down
4 changes: 3 additions & 1 deletion riscv-tools.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ class RiscvTools < Formula
version "0.2"
sha256 "cb919eb7cf11071c6d11c721a9e77893a2dbe9158466e444eb3dd8476a89b7b4"

option "with-enable-rvv", "Workaround to enable RISCV Vector Extension"

# install rest of tools
depends_on "riscv-gnu-toolchain"
depends_on "riscv-gnu-toolchain" => [:build, "--with-enable-rvv"]
depends_on "riscv-isa-sim"
depends_on "riscv-pk"

Expand Down

0 comments on commit 3eb8ee2

Please sign in to comment.