Skip to content

Instantly share code, notes, and snippets.

@draftcode
Created February 6, 2012 10:35
Show Gist options
  • Select an option

  • Save draftcode/1751385 to your computer and use it in GitHub Desktop.

Select an option

Save draftcode/1751385 to your computer and use it in GitHub Desktop.
require 'formula'
class BinutilsXv6 < Formula
url 'http://ftpmirror.gnu.org/binutils/binutils-2.21.1a.tar.bz2'
mirror 'http://ftp.gnu.org/gnu/binutils/binutils-2.21.1a.tar.bz2'
homepage 'http://www.gnu.org/software/binutils/binutils.html'
md5 'bde820eac53fa3a8d8696667418557ad'
def install
system "./configure", "--target=i386-jos-elf",
"--disable-debug",
"--disable-dependency-tracking",
"--disable-nls",
"--prefix=#{prefix}",
"--infodir=#{info}",
"--mandir=#{man}",
"--disable-werror",
"--enable-interwork",
"--enable-multilib"
system "make"
system "make", "install"
end
end
require 'formula'
class GccXv6 < Formula
url 'http://ftpmirror.gnu.org/gcc/gcc-4.5.1/gcc-core-4.5.1.tar.bz2'
mirror 'http://ftp.gnu.org/gnu/gcc-4.5.1/gcc-core-4.5.1.tar.bz2'
homepage 'http://www.gnu.org/software/gcc/'
md5 'dc8959e31b01a65ce10d269614815054'
depends_on 'gmp'
depends_on 'mpfr'
depends_on 'mpc'
def install
gmp = Formula.factory 'gmp'
mpfr = Formula.factory 'mpfr'
mpc = Formula.factory 'mpc'
target = "i386-jos-elf"
gas_path = "#{HOMEBREW_PREFIX}/bin/#{target}-as"
mkdir "build"
cd "build"
system "../configure", "--target=#{target}",
"--disable-debug",
"--disable-nls",
"--disable-dependency-tracking",
"--prefix=#{prefix}",
"--infodir=#{info}",
"--mandir=#{man}",
"--without-headers",
"--with-newlib",
"--disable-threads",
"--disable-shared",
"--disable-libmudflap",
"--disable-libssp",
"--with-gmp=#{gmp.prefix}",
"--with-mpfr=#{mpfr.prefix}",
"--with-mpc=#{mpc.prefix}",
"--with-as=#{gas_path}"
system "make", "all-gcc"
system "make", "all-target-libgcc"
system "make", "install-gcc"
system "make", "install-target-libgcc"
end
end
require 'formula'
class GdbXv6 < Formula
url 'http://ftpmirror.gnu.org/gdb/gdb-6.8a.tar.gz'
mirror 'http://ftp.gnu.org/gnu/gdb/gdb-6.8a.tar.gz'
homepage 'http://www.gnu.org/software/gdb/'
md5 '6bccd284284261e46ad5acfb5cf3a499'
def install
system "./configure", "--target=i386-jos-elf",
"--disable-debug",
"--disable-dependency-tracking",
"--program-prefix=i386-jos-elf-",
"--prefix=#{prefix}",
"--infodir=#{info}",
"--mandir=#{man}",
"--disable-werror"
system "make"
system "make", "install"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment