-
Notifications
You must be signed in to change notification settings - Fork 0
/
i386-jos-elf-gcc.rb
39 lines (34 loc) · 1.37 KB
/
i386-jos-elf-gcc.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class I386JosElfGcc < Formula
desc "GNU compiler collection for cross-compiling to i386-jos"
homepage "https://pdos.csail.mit.edu/6.828/2018/tools.html"
url "http://ftpmirror.gnu.org/gcc/gcc-4.6.4/gcc-core-4.6.4.tar.bz2"
sha256 "48b566f1288f099dff8fba868499a320f83586245ec69b8c82a9042566a5bf62"
depends_on "gmp"
depends_on "libmpc"
depends_on "mpfr"
depends_on "i386-jos-elf-binutils"
def install
mkdir "build" do
system "../configure", "--prefix=#{prefix}",
"--target=i386-jos-elf",
"--disable-werror",
"--disable-libssp",
"--disable-libmudflap",
"--with-newlib",
"--without-headers",
"--enable-languages=c",
"MAKEINFO=missing",
"--with-as=#{Formula["i386-jos-elf-binutils"].opt_prefix}/bin/i386-jos-elf-as",
"--with-ld=#{Formula["i386-jos-elf-binutils"].opt_prefix}/bin/i386-jos-elf-ld",
"--disable-nls"
system "make", "all-gcc"
system "make", "install-gcc"
system "make", "all-target-libgcc"
system "make", "install-target-libgcc"
end
info.rmtree
end
test do
system "#{bin}/i386-jos-elf-gcc -v"
end
end