Skip to content

Commit

Permalink
i386-elf-binutils: add 64-bit support, rename into x86_64-elf-binutils
Browse files Browse the repository at this point in the history
  • Loading branch information
MRNIU authored and fxcoudert committed Dec 27, 2019
1 parent 7d36ba3 commit 325ebb8
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 27 deletions.
27 changes: 0 additions & 27 deletions Formula/i386-elf-binutils.rb

This file was deleted.

32 changes: 32 additions & 0 deletions Formula/x86_64-elf-binutils.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
class X8664ElfBinutils < Formula
desc "FSF Binutils for x86_64-elf cross development"
homepage "https://www.gnu.org/software/binutils/"
url "https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.gz"
mirror "https://ftpmirror.gnu.org/binutils/binutils-2.33.1.tar.gz"
sha256 "98aba5f673280451a09df3a8d8eddb3aa0c505ac183f1e2f9d00c67aa04c6f7d"

def install
system "./configure", "--target=x86_64-elf",
"--enable-targets=all",
"--enable-multilib",
"--enable-64-bit-bfd",
"--disable-werror",
"--prefix=#{prefix}"
system "make"
system "make", "install"
end

test do
(testpath/"test-s.s").write <<~EOS
.section .data
.section .text
.globl _start
_start:
movl $1, %eax
movl $4, %ebx
int $0x80
EOS
system "#{bin}/x86_64-elf-as", "--64", "-o", "test-s.o", "test-s.s"
assert_match "file format elf64-x86-64", shell_output("#{Formula["x86_64-elf-binutils"].bin}/x86_64-elf-objdump -a test-s.o")
end
end
1 change: 1 addition & 0 deletions formula_renames.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
"hh": "hstr",
"htop-osx": "htop",
"httpd24": "httpd",
"i386-elf-binutils": "x86_64-elf-binutils",
"influxdb08": "[email protected]",
"isl011": "[email protected]",
"isl012": "[email protected]",
Expand Down

0 comments on commit 325ebb8

Please sign in to comment.