65 lines
2.2 KiB
Ruby
65 lines
2.2 KiB
Ruby
class X8664ElfGdb < Formula
|
|
desc "GNU debugger for x86_64-elf cross development"
|
|
homepage "https://www.gnu.org/software/gdb/"
|
|
url "https://ftp.gnu.org/gnu/gdb/gdb-12.1.tar.xz"
|
|
mirror "https://ftpmirror.gnu.org/gdb/gdb-12.1.tar.xz"
|
|
sha256 "0e1793bf8f2b54d53f46dea84ccfd446f48f81b297b28c4f7fc017b818d69fed"
|
|
license "GPL-3.0-or-later"
|
|
head "https://sourceware.org/git/binutils-gdb.git", branch: "master"
|
|
|
|
livecheck do
|
|
formula "gdb"
|
|
end
|
|
|
|
bottle do
|
|
sha256 arm64_monterey: "054449618f9e658d1502a3ffb3dcdf3d8f55e1d19ffde152e52b2ed5887faf84"
|
|
sha256 arm64_big_sur: "5eebf4b0ccf95ac324212f34509b6f63bbde83b48664abef093058090322b132"
|
|
sha256 monterey: "afaa638b4875f3e7a09e4ca7c0dae4d09ab606e7fdc2c17703075226441dbced"
|
|
sha256 big_sur: "bc816667d3bb402ec66316afa4b4b7ebd5972353a06d9ac34b38f82a514a5a52"
|
|
sha256 catalina: "44ee92bc25f8ea4fc9179dbf9fb0c94fb1c3f9db6a17003c2d961cda2053228e"
|
|
sha256 x86_64_linux: "99c96d3a5aba8289446082e8dd9e7b931b79d5eea945ba2b2516cd398c966b03"
|
|
end
|
|
|
|
depends_on "x86_64-elf-gcc" => :test
|
|
depends_on "gmp"
|
|
depends_on "python@3.10"
|
|
depends_on "xz" # required for lzma support
|
|
|
|
uses_from_macos "texinfo" => :build
|
|
uses_from_macos "zlib"
|
|
|
|
def install
|
|
target = "x86_64-elf"
|
|
args = %W[
|
|
--target=#{target}
|
|
--prefix=#{prefix}
|
|
--datarootdir=#{share}/#{target}
|
|
--includedir=#{include}/#{target}
|
|
--infodir=#{info}/#{target}
|
|
--mandir=#{man}
|
|
--disable-debug
|
|
--disable-dependency-tracking
|
|
--with-lzma
|
|
--with-python=#{Formula["python@3.10"].opt_bin}/python3
|
|
--with-system-zlib
|
|
--disable-binutils
|
|
]
|
|
|
|
mkdir "build" do
|
|
system "../configure", *args
|
|
ENV.deparallelize # Error: common/version.c-stamp.tmp: No such file or directory
|
|
system "make"
|
|
|
|
# Don't install bfd or opcodes, as they are provided by binutils
|
|
system "make", "install-gdb"
|
|
end
|
|
end
|
|
|
|
test do
|
|
(testpath/"test.c").write "void _start(void) {}"
|
|
system "#{Formula["x86_64-elf-gcc"].bin}/x86_64-elf-gcc", "-g", "-nostdlib", "test.c"
|
|
assert_match "Symbol \"_start\" is a function at address 0x",
|
|
shell_output("#{bin}/x86_64-elf-gdb -batch -ex 'info address _start' a.out")
|
|
end
|
|
end
|