1 | # |
---|
2 | # spec file for building gcc for solaris |
---|
3 | # |
---|
4 | |
---|
5 | %define gcc_version @GCC_VERS@ |
---|
6 | %define gcc_rpmvers @GCC_RPMVERS@ |
---|
7 | |
---|
8 | Vendor: OAR Corporation |
---|
9 | Distribution: Linux |
---|
10 | Name: sparc-solaris-gcc |
---|
11 | Summary: sparc-solaris gcc. |
---|
12 | Requires: sparc-solaris-binutils |
---|
13 | Requires: sparc-solaris-libs |
---|
14 | Group: solaris |
---|
15 | Release: @GCC_RPMREL@ |
---|
16 | License: gcc is GPL/LGPL |
---|
17 | Prefix: /opt/solaris |
---|
18 | Autoreqprov: on |
---|
19 | Packager: joel@OARcorp.com |
---|
20 | Version: %gcc_rpmvers |
---|
21 | |
---|
22 | Source0: ftp://sourceware.cygnus.com/pub/solaris/latest/gcc/gcc-%{gcc_version}.tar.gz |
---|
23 | NoSource: 0 |
---|
24 | |
---|
25 | BuildRoot: @RPM_BUILD_ROOT@ |
---|
26 | |
---|
27 | %description |
---|
28 | Cross gcc for target solaris |
---|
29 | |
---|
30 | %prep |
---|
31 | # untar the sources inside sparc-solaris-gcc |
---|
32 | %setup -c -n %{name} -a 0 |
---|
33 | touch gcc-%{gcc_version}/gcc/ada/treeprs.ads |
---|
34 | touch gcc-%{gcc_version}/gcc/ada/[es]info.h |
---|
35 | touch gcc-%{gcc_version}/gcc/ada/nmake.ad[bs] |
---|
36 | |
---|
37 | |
---|
38 | test -d build || mkdir build |
---|
39 | |
---|
40 | %build |
---|
41 | cd build |
---|
42 | |
---|
43 | ../gcc-%{gcc_version}/configure --target=sparc-solaris \ |
---|
44 | --with-gnu-as --with-gnu-ld --without-newlib --verbose \ |
---|
45 | --disable-shared --disable-nls --enable-languages=c,ada \ |
---|
46 | --prefix=%{prefix} |
---|
47 | |
---|
48 | make all |
---|
49 | |
---|
50 | make -C gcc cross-gnattools |
---|
51 | make -C gcc ada.all.cross |
---|
52 | |
---|
53 | # We don't want info files |
---|
54 | # make info |
---|
55 | %install |
---|
56 | cd build |
---|
57 | # Bug in gcc-2.95.1: It doesn't build this installation directory |
---|
58 | # If it doesn't find it, gcc doesn't install sparc-solaris/bin/gcc |
---|
59 | ../gcc-%{gcc_version}/mkinstalldirs \ |
---|
60 | $RPM_BUILD_ROOT%{prefix}/sparc-solaris/bin |
---|
61 | |
---|
62 | make prefix=$RPM_BUILD_ROOT%{prefix} install |
---|
63 | # cd back to build/ |
---|
64 | cd .. |
---|
65 | |
---|
66 | # We don't want info files |
---|
67 | rm -rf $RPM_BUILD_ROOT%{prefix}/info |
---|
68 | |
---|
69 | # libiberty comes from solaris-libs or binutils |
---|
70 | rm -f $RPM_BUILD_ROOT%{prefix}/sparc-solaris/lib/libiberty.a |
---|
71 | rm -f $RPM_BUILD_ROOT%{prefix}/lib/libiberty.a |
---|
72 | |
---|
73 | pwd |
---|
74 | find $RPM_BUILD_ROOT%{prefix} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g" >files.list |
---|
75 | |
---|
76 | %clean |
---|
77 | # let rpm --clean remove BuildRoot iff using the default BuildRoot |
---|
78 | test "$RPM_BUILD_ROOT" = "@RPM_BUILD_ROOT@" && \ |
---|
79 | rm -rf $RPM_BUILD_ROOT |
---|
80 | |
---|
81 | %files -f files.list |
---|