x86_64-linux-gnu-binutils 2.38 (new formula)
This formula allows for cross-compiling to GNU/Linux on macOS. Closes #105638. Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>master
parent
a91c90d06f
commit
76e20f3c5a
|
@ -0,0 +1,49 @@
|
|||
class X8664LinuxGnuBinutils < Formula
|
||||
desc "GNU Binutils for x86_64-linux-gnu cross development"
|
||||
homepage "https://www.gnu.org/software/binutils/binutils.html"
|
||||
url "https://ftp.gnu.org/gnu/binutils/binutils-2.38.tar.xz"
|
||||
mirror "https://ftpmirror.gnu.org/binutils/binutils-2.38.tar.xz"
|
||||
sha256 "e316477a914f567eccc34d5d29785b8b0f5a10208d36bbacedcc39048ecfe024"
|
||||
license "GPL-3.0-or-later"
|
||||
|
||||
livecheck do
|
||||
formula "binutils"
|
||||
end
|
||||
|
||||
uses_from_macos "texinfo"
|
||||
|
||||
def install
|
||||
ENV.cxx11
|
||||
|
||||
# Avoid build failure: https://sourceware.org/bugzilla/show_bug.cgi?id=23424
|
||||
ENV.append "CXXFLAGS", "-Wno-c++11-narrowing"
|
||||
|
||||
target = "x86_64-linux-gnu"
|
||||
system "./configure", "--disable-debug",
|
||||
"--disable-dependency-tracking",
|
||||
"--enable-deterministic-archives",
|
||||
"--prefix=#{prefix}",
|
||||
"--libdir=#{lib/target}",
|
||||
"--infodir=#{info/target}",
|
||||
"--disable-werror",
|
||||
"--target=#{target}",
|
||||
"--enable-gold=yes",
|
||||
"--enable-ld=yes",
|
||||
"--enable-interwork",
|
||||
"--with-system-zlib",
|
||||
"--disable-nls"
|
||||
system "make"
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
test do
|
||||
assert_match "f()", shell_output("#{bin}/x86_64-linux-gnu-c++filt _Z1fv")
|
||||
return if OS.linux?
|
||||
|
||||
(testpath/"hello.c").write <<~EOS
|
||||
void hello() {}
|
||||
EOS
|
||||
system ENV.cc, "--target=x86_64-pc-linux-gnu", "-c", "hello.c"
|
||||
assert_match "hello", shell_output("#{bin}/x86_64-linux-gnu-nm hello.o")
|
||||
end
|
||||
end
|
|
@ -1,5 +1,12 @@
|
|||
[
|
||||
["aarch64-elf-gcc", "i686-elf-gcc", "x86_64-elf-gcc"],
|
||||
[
|
||||
"aarch64-elf-binutils",
|
||||
"arm-linux-gnueabihf-binutils",
|
||||
"i686-elf-binutils",
|
||||
"x86_64-elf-binutils",
|
||||
"x86_64-linux-gnu-binutils"
|
||||
],
|
||||
["apache-arrow", "apache-arrow-glib"],
|
||||
["apache-pulsar", "libpulsar"],
|
||||
["avro-c", "avro-cpp", "avro-tools"],
|
||||
|
|
Loading…
Reference in New Issue