-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathi386-jos-elf-gcc.rb
44 lines (37 loc) · 1.16 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
40
41
42
43
44
class I386JosElfGcc < Formula
desc "GNU compiler collection for i386-elf development"
homepage "https://gcc.gnu.org"
url "https://ftpmirror.gnu.org/gcc/gcc-6.2.0/gcc-6.2.0.tar.bz2"
mirror "https://ftp.gnu.org/gnu/gcc/gcc-6.2.0/gcc-6.2.0.tar.bz2"
sha256 "9944589fc722d3e66308c0ce5257788ebd7872982a718aa2516123940671b7c5"
depends_on "gmp"
depends_on "libmpc"
depends_on "mpfr"
depends_on "i386-jos-elf-binutils"
def install
languages = %w[c go]
binutils = Formulary.factory "i386-jos-elf-binutils"
args = [
"--prefix=#{prefix}",
"--enable-languages=#{languages.join(",")}",
"--disable-werror",
"--disable-nls",
"--disable-libssp",
"--disable-libmudflap",
"--disable-multilib",
"--with-as=#{binutils.bin}/i386-jos-elf-as",
"--with-ld=#{binutils.bin}/i386-jos-elf-ld",
"--with-newlib",
"--without-headers",
"--target=i386-jos-elf"
]
mkdir "build" do
system "../configure", *args
system "make", "all-gcc"
system "make", "install-gcc"
system "make", "all-target-libgcc"
system "make", "install-target-libgcc"
end
info.rmtree
end
end