1 | # |
---|
2 | # spec file for building gcc for freebsd |
---|
3 | # |
---|
4 | |
---|
5 | %define _prefix @PREFIX@ |
---|
6 | |
---|
7 | %define gcc_version @GCC_VERS@ |
---|
8 | %define gcc_rpmvers %{expand: %(echo @GCC_VERS@ | tr - _)} |
---|
9 | |
---|
10 | %define __os_install_post %{nil} |
---|
11 | |
---|
12 | Vendor: RTEMS.org |
---|
13 | Distribution: Linux |
---|
14 | Name: i386-freebsd5-gcc |
---|
15 | Summary: i386-freebsd5 gcc. |
---|
16 | Group: FreeBSD |
---|
17 | Release: @GCC_RPMREL@ |
---|
18 | License: gcc is GPL/LGPL |
---|
19 | Packager: Ralf Corsepius <ralf_corsepius@rtems.org> |
---|
20 | Version: %gcc_rpmvers |
---|
21 | |
---|
22 | Source0: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-%{gcc_version}/gcc-%{gcc_version}-20040412.tar.bz2 |
---|
23 | NoSource: 0 |
---|
24 | |
---|
25 | BuildRoot: @RPM_BUILD_ROOT@ |
---|
26 | |
---|
27 | # Urgh, but RH's find-* is too stupid to cope with foreign objects |
---|
28 | Autoreqprov: off |
---|
29 | |
---|
30 | BuildRequires: i386-freebsd5-binutils |
---|
31 | BuildRequires: i386-freebsd5-libs |
---|
32 | Requires: i386-freebsd5-binutils |
---|
33 | Requires: i386-freebsd5-libs |
---|
34 | Provides: i386-freebsd5-gcc |
---|
35 | |
---|
36 | %description |
---|
37 | Cross gcc for target solaris |
---|
38 | |
---|
39 | %prep |
---|
40 | # untar the sources inside i386-freebsd5-gcc |
---|
41 | %setup -c -n %{name}-%{version} -a 0 |
---|
42 | |
---|
43 | # touch gcc-%{gcc_version}/gcc/ada/treeprs.ads |
---|
44 | # touch gcc-%{gcc_version}/gcc/ada/[es]info.h |
---|
45 | # touch gcc-%{gcc_version}/gcc/ada/nmake.ad[bs] |
---|
46 | |
---|
47 | pushd gcc-%{gcc_version} |
---|
48 | contrib/gcc_update --touch |
---|
49 | popd |
---|
50 | |
---|
51 | test -d build || mkdir build |
---|
52 | |
---|
53 | %build |
---|
54 | export PATH="%{_bindir}:${PATH}" |
---|
55 | cd build |
---|
56 | |
---|
57 | ../gcc-%{gcc_version}/configure --target=i386-freebsd5 \ |
---|
58 | --with-gnu-as --with-gnu-ld --without-newlib --verbose \ |
---|
59 | --disable-nls --enable-languages=c,c++ \ |
---|
60 | --enable-version-specific-runtime-libs \ |
---|
61 | --with-sysroot=%{_prefix}/i386-freebsd5/sys-root \ |
---|
62 | --prefix=%{_prefix} |
---|
63 | |
---|
64 | make all |
---|
65 | |
---|
66 | # make -C gcc gnatlib |
---|
67 | # make -C gcc cross-gnattools |
---|
68 | # make -C gcc ada.all.cross |
---|
69 | |
---|
70 | # We don't want info files |
---|
71 | # make info |
---|
72 | %install |
---|
73 | rm -rf $RPM_BUILD_ROOT |
---|
74 | export PATH="%{_bindir}:${PATH}" |
---|
75 | cd build |
---|
76 | |
---|
77 | make prefix=$RPM_BUILD_ROOT%{_prefix} install |
---|
78 | # cd back to build/ |
---|
79 | cd .. |
---|
80 | |
---|
81 | # libiberty comes from freebsd5-libs or binutils |
---|
82 | rm -f $RPM_BUILD_ROOT%{_prefix}/i386-freebsd5/lib/libiberty.a |
---|
83 | rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libiberty.a |
---|
84 | |
---|
85 | # GCC ships broken *.la's |
---|
86 | find $RPM_BUILD_ROOT%{_prefix} -name '*.la' -exec rm -f {} \; |
---|
87 | |
---|
88 | %files |
---|
89 | %defattr(-,root,root) |
---|
90 | %{_prefix} |
---|
91 | # We don't want infos |
---|
92 | %exclude %{_prefix}/info |
---|