@@ -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,10 +52,15 @@ 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"
57- system "git" , "submodule" , "update" , "--init" , "--recursive" , "gcc"
63+ system "git" , "submodule" , "update" , "--init" , "--recursive" , "gcc"
5864
5965 args = [
6066 "--prefix=#{ prefix } " ,
0 commit comments