-
Notifications
You must be signed in to change notification settings - Fork 2
/
arm-2008q3-gcc.rb
106 lines (86 loc) · 2.68 KB
/
arm-2008q3-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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
require 'formula'
class Arm2008q3Gcc < Formula
homepage 'http://gcc.gnu.org'
url 'http://ftpmirror.gnu.org/gcc/gcc-4.3.2/gcc-4.3.2.tar.bz2'
mirror 'http://ftp.gnu.org/gnu/gcc/gcc-4.3.2/gcc-4.3.2.tar.bz2'
sha1 '787b566ad4f386a9896e2d5703e6ff5e7ccaca58'
depends_on 'gmp'
depends_on 'libmpc'
depends_on 'mpfr'
depends_on 'arm-2008q3-binutils'
def install
binutils = Formula.factory 'arm-2008q3-binutils'
ENV['PATH'] += ":#{binutils.prefix/"bin"}"
target = 'arm-none-eabi'
gccbuildpath = buildpath
newlib = Formula.factory 'arm-2008q3-newlib'
newlib.brew do
ohai "Moving newlib into GCC build tree"
system "mv","newlib",gccbuildpath/"newlib"
end
args = [
'--with-pkgversion=Sourcery G++ Lite 2008q3-66',
'--with-bugurl=https://support.codesourcery.com/GNUToolchain/',
"--target=#{target}",
"--prefix=#{prefix}",
"--infodir=#{info}",
"--mandir=#{man}",
"--enable-obsolete",
'--disable-nls',
'--disable-werror',
'--disable-debug',
"--disable-shared",
"--enable-languages=c",
'--disable-decimal-float',
'--with-headers',
"--enable-interwork",
"--enable-multilib",
"--with-newlib",
"--disable-newlib-supplied-syscalls",
"--enable-newlib-io-long-long",
"--enable-version-specific-runtime-libs",
"--enable-poison-system-directories",
"--enable-target-optspace",
"--without-included-gettext",
"--disable-install-libiberty",
"--disable-libunwind-exceptions",
"--disable-libffi",
'--disable-libmudflap',
'--disable-libgomp',
"--disable-__cxa_atexit",
"--disable-libgfortran",
"--disable-libssb",
"--disable-libstdcxx-pch",
# Without this line, GCC won't be able to find the assembler.
"--with-as=#{binutils.prefix}/bin/#{target}-as",
"CFLAGS=-std=gnu89",
]
mkdir 'build' do
system '../configure', *args
system 'make all'
system 'make installdirs'
system 'make install-target'
system 'make install-host'
FileUtils.rm_rf prefix/"lib/x86_64"
end
end
def patches
[
'https://gist.github.com/darconeous/2023cf3675bfa7abad8f/raw/gcc-2008q3-66.patch.bz2',
DATA
]
end
end
__END__
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 3518dbc..eaafadb 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3934,7 +3934,7 @@ maintainer-clean:
# Install the driver last so that the window when things are
# broken is small.
install: install-common $(INSTALL_HEADERS) \
- install-cpp install-man install-info install-html install-pdf \
+ install-cpp install-man install-info \
install-@POSUB@ install-driver
# Handle cpp installation.