1 | #!/opt/local/bin/zsh |
---|
2 | |
---|
3 | setopt Err_Exit |
---|
4 | setopt X_Trace; |
---|
5 | |
---|
6 | if test "${USER}" = "root"; then |
---|
7 | typeset prefix='/opt/local' |
---|
8 | typeset bootprefix='/opt/gnat-2010-x86_64-apple-darwin9.6.0-bin' |
---|
9 | |
---|
10 | typeset -x -g AR_FOR_TARGET="/usr/bin/ar"; |
---|
11 | typeset -x -g AS_FOR_TARGET="/usr/bin/as"; |
---|
12 | typeset -x -g CC="${bootprefix}/bin/gcc"; |
---|
13 | typeset -x -g CFLAGS="-O2"; |
---|
14 | typeset -x -g CPP="${bootprefix}/bin/cpp"; |
---|
15 | #typeset -x -g CPPFLAGS="-I${bootprefix}/include -I${prefix}/include"; |
---|
16 | #typeset -x -g CXX="${bootprefix}/bin/g++"; |
---|
17 | #typeset -x -g CXXCPP="${bootprefix}/bin/cpp"; |
---|
18 | #typeset -x -g CXXFLAGS="-O2"; |
---|
19 | typeset -x -g F90FLAGS="-O2 -m64"; |
---|
20 | typeset -x -g FCFLAGS="-O2 -m64"; |
---|
21 | typeset -x -g FFLAGS="-O2 -m64"; |
---|
22 | typeset -x -g GNATBIND="${bootprefix}/bin/gnatbind"; |
---|
23 | typeset -x -g GNATMAKE="${bootprefix}/bin/gnatmake"; |
---|
24 | typeset -x -g INSTALL="/usr/bin/install -c"; |
---|
25 | typeset -x -g LDFLAGS="-L${prefix}/lib"; |
---|
26 | typeset -x -g LD_FOR_TARGET="/usr/bin/ld"; |
---|
27 | typeset -x -g MACOSX_DEPLOYMENT_TARGET="10.6"; |
---|
28 | typeset -x -g NM_FOR_TARGET="/usr/bin/nm"; |
---|
29 | typeset -x -g OBJC="${bootprefix}/bin/gcc"; |
---|
30 | typeset -x -g OBJCFLAGS="-O2"; |
---|
31 | typeset -x -g OBJDUMP_FOR_TARGET="/usr/bin/objdump"; |
---|
32 | typeset -x -g PATH="${bootprefix}/bin:${prefix}/bin:${prefix}/sbin:/bin:/sbin:/usr/bin:/usr/sbin" |
---|
33 | typeset -x -g RANLIB_FOR_TARGET="/usr/bin/ranlib"; |
---|
34 | typeset -x -g STRIP_FOR_TARGET="/usr/bin/strip"; |
---|
35 | |
---|
36 | pushd "work/build"; |
---|
37 | rm **/config.cache || true; |
---|
38 | gnice ../gcc-4.5.2/configure \ |
---|
39 | --prefix=${prefix} \ |
---|
40 | --build=x86_64-apple-darwin10 \ |
---|
41 | --enable-languages=c,c++,ada,objc,obj-c++,java,fortran \ |
---|
42 | --libdir=${prefix}/lib/gnat-gcc \ |
---|
43 | --includedir=${prefix}/include/gnat-gcc \ |
---|
44 | --infodir=${prefix}/share/info \ |
---|
45 | --mandir=${prefix}/share/man \ |
---|
46 | --datarootdir=${prefix}/share/gcc-4.5 \ |
---|
47 | --with-local-prefix=${prefix} \ |
---|
48 | --with-system-zlib \ |
---|
49 | --disable-nls \ |
---|
50 | --program-suffix=-gnat-4.5 \ |
---|
51 | --with-gxx-include-dir=${prefix}/include/gnat-gcc/c++/ \ |
---|
52 | --with-gmp=${prefix} \ |
---|
53 | --with-mpfr=${prefix} \ |
---|
54 | --with-mpc==${prefix} \ |
---|
55 | --enable-stage1-checking ; |
---|
56 | gnice make |
---|
57 | popd; |
---|
58 | else |
---|
59 | setopt Multi_OS; |
---|
60 | |
---|
61 | sudo ${0:a} 1>&1 2>&2 &>~/Library/Logs/${0:r:t}.out; |
---|
62 | fi; |
---|
63 | |
---|
64 | |
---|
65 | # vim: set nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab : |
---|
66 | # vim: set textwidth=0 filetype=zsh foldmethod=marker nospell : |
---|