Skip to content

Commit

Permalink
update riscv-gnu-toolchain
Browse files Browse the repository at this point in the history
- gdb is problematic to build on macOS so disabling for now
- gdb can be built with a new bison carefully using key-only
- taking a more conservative approach to /share/ polution
  • Loading branch information
sbeamer committed Dec 7, 2023
1 parent 071b545 commit 1f1d243
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions riscv-gnu-toolchain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def install
args = [
"--prefix=#{prefix}",
"--with-cmodel=medany",
"--disable-gdb"
]
args << "--enable-multilib" unless build.with?("NOmultilib")

Expand All @@ -70,19 +71,16 @@ def install
system "./configure", *args
system "make"

# don't install Python bindings if system already has them
if File.exist?("#{HOMEBREW_PREFIX}/share/gcc-11.1.0")
opoo "Not overwriting share/gcc-11.1.0"
rm_rf "#{share}/gcc-11.1.0"
end

# don't install gdb bindings if system already has them
if File.exist?("#{HOMEBREW_PREFIX}/share/gdb")
opoo "Not overwriting share/gdb"
rm_rf "#{share}/gdb"
rm "#{share}/info/annotate.info"
rm "#{share}/info/gdb.info"
rm "#{share}/info/stabs.info"
end

# don't install info if system already has them
if File.exist?("#{HOMEBREW_PREFIX}/share/info")
opoo "Not overwriting share/info"
rm_rf "#{share}/info"
end

# don't install gdb includes if system already has them
Expand Down

0 comments on commit 1f1d243

Please sign in to comment.