-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathavr-gcc.rb
42 lines (35 loc) · 1000 Bytes
/
avr-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
require 'formula'
class AvrGcc < Formula
homepage 'http://gcc.gnu.org'
url "http://ftpmirror.gnu.org/gcc/gcc-4.8.3/gcc-4.8.3.tar.bz2"
mirror "ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.8.3/gcc-4.8.3.tar.bz2"
sha1 'da0a2b9ec074f2bf624a34f3507f812ebb6e4dce'
depends_on 'avr-binutils'
depends_on 'gmp'
depends_on 'libmpc'
depends_on 'mpfr'
depends_on "isl"
depends_on "cloog"
option 'without-cxx', 'Don\'t build the g++ compiler'
def install
languages = %w[c]
languages << "c++" if build.with?("cxx")
args = %W[
--prefix=#{prefix}
--target=avr
--disable-libssp
--disable-nls
--with-dwarf2
--disable-install-libiberty
--with-system-zlib
--enable-languages=#{languages.join(",")}
--with-as=#{Formula["avr-binutils"].bin}/avr-as
--with-ld=#{Formula["avr-binutils"].bin}/avr-ld
]
mkdir "build" do
system '../configure', *args
system 'make'
system 'make install'
end
end
end