]> git.pld-linux.org Git - packages/crossarm-gcc.git/blob - crossarm-gcc.spec
- thumb(16)-mode files added.
[packages/crossarm-gcc.git] / crossarm-gcc.spec
1 #
2 # MUST SEE:
3 #               - GCC ARM Improvement Project - http://www.inf.u-szeged.hu/gcc-arm/
4 #               - Developing StrongARM shellocde - http://phrack.org/show.php?p=58&a=10
5 #
6 # Conditional build:
7 %bcond_with     eabi            # build with Embedded ABI support
8 #
9 Summary:        Cross ARM GNU binary utility development utilities - gcc
10 Summary(es):    Utilitarios para desarrollo de binarios de la GNU - ARM gcc
11 Summary(fr):    Utilitaires de développement binaire de GNU - ARM gcc
12 Summary(pl):    Skro¶ne narzêdzia programistyczne GNU dla ARM - gcc
13 Summary(pt_BR): Utilitários para desenvolvimento de binários da GNU - ARM gcc
14 Summary(tr):    GNU geliþtirme araçlarý - ARM gcc
15 Name:           crossarm-gcc
16 Version:        4.0.0
17 %define         _snap   20050130
18 Release:        0.%{_snap}.1%{?with_eabi:eabi}
19 Epoch:          1
20 License:        GPL
21 Group:          Development/Languages
22 #Source0:       ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
23 Source0:        ftp://gcc.gnu.org/pub/gcc/snapshots/4.0-%{_snap}/gcc-4.0-%{_snap}.tar.bz2
24 # Source0-md5:  5040ba840d0367c378f73c739418b3e2
25 %define         _llh_ver        2.6.10.0
26 Source1:        http://ep09.pld-linux.org/~mmazur/linux-libc-headers/linux-libc-headers-%{_llh_ver}.tar.bz2
27 # Source1-md5:  a43c53f1bb0b586bc9bd2e8abb19e2bc
28 %define         _glibc_ver      2.3.4
29 Source2:        ftp://sources.redhat.com/pub/glibc/releases/glibc-%{_glibc_ver}.tar.bz2
30 # Source2-md5:  174ac5ed4f2851fcc866a3bac1e4a6a5
31 %define         _uclibc_ver     0.9.27
32 Source3:        http://uclibc.org/downloads/uClibc-%{_uclibc_ver}.tar.bz2
33 # Source3-md5:  6250bd6524283bd8e7bc976d43a46ec0
34 Source4:        crossarm-embedded-uclibc.config
35 URL:            http://gcc.gnu.org/
36 BuildRequires:  autoconf
37 BuildRequires:  automake
38 BuildRequires:  bison
39 BuildRequires:  crossarm-binutils%{?with_eabi:(eabi)}
40 BuildRequires:  flex
41 BuildRequires:  /bin/bash
42 Requires:       crossarm-binutils%{?with_eabi:(eabi)}
43 Requires:       gcc-dirs
44 ExcludeArch:    arm
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %define         target          arm-linux%{?with_eabi:-eabi}
48 %define         arch            %{_prefix}/%{target}
49 %define         gccarch         %{_libdir}/gcc/%{target}
50 %define         gcclib          %{gccarch}/%{version}
51
52 %define         _noautostrip    .*/libgc.*\\.a
53
54 %description
55 This package contains a cross-gcc which allows the creation of
56 binaries to be run on ARM linux (architecture arm-linux) on
57 other machines.
58
59 %description -l de
60 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
61 anderem Rechner Code für arm-Linux zu generieren.
62
63 %description -l pl
64 Ten pakiet zawiera skro¶ny gcc pozwalaj±cy na robienie na innych
65 maszynach binariów do uruchamiania na ARM (architektura
66 arm-linux).
67
68 %package c++
69 Summary:        C++ support for crossppc-arm
70 Summary(pl):    Obs³uga C++ dla crossppc-arm
71 Group:          Development/Languages
72 Requires:       %{name} = %{epoch}:%{version}-%{release}
73
74 %description c++
75 This package adds C++ support to the GNU Compiler Collection for ARM.
76
77 %description c++ -l pl
78 Ten pakiet dodaje obs³ugê C++ do kompilatora gcc dla ARM.
79
80 %prep
81 %setup -q -n gcc-4.0-%{_snap} -a1 -a2 -a3
82
83 %build
84 FAKE_ROOT=$PWD/fake-root
85 rm -rf $FAKE_ROOT
86
87 %if %{with eabi}
88 install -d $FAKE_ROOT%{_prefix}
89 cp -r uClibc-%{_uclibc_ver}/* $FAKE_ROOT%{_prefix}
90 cd $FAKE_ROOT%{_prefix}
91 install %{SOURCE4} .config
92 %{__make} headers
93 %else
94 install -d $FAKE_ROOT%{_includedir}
95 cp -r linux-libc-headers-%{_llh_ver}/include/{asm-arm,linux} $FAKE_ROOT%{_includedir}
96 ln -s asm-arm $FAKE_ROOT%{_includedir}/asm
97
98 cd glibc-%{_glibc_ver}
99 cp -f /usr/share/automake/config.* scripts
100 rm -rf builddir && install -d builddir && cd builddir
101 ../configure \
102         --prefix=$FAKE_ROOT/usr \
103         --build=%{_target_platform} \
104         --host=%{target} \
105         --disable-nls \
106         --with-headers=$FAKE_ROOT/usr/include \
107         --disable-sanity-checks \
108         --enable-hacker-mode
109
110 %{__make} sysdeps/gnu/errlist.c
111 %{__make} install-headers
112
113 install bits/stdio_lim.h $FAKE_ROOT/usr/include/bits
114 touch $FAKE_ROOT/usr/include/gnu/stubs.h
115 %endif
116 cd -
117
118 cp -f /usr/share/automake/config.* .
119 rm -rf obj-%{target}
120 install -d obj-%{target}
121 cd obj-%{target}
122
123 CFLAGS="%{rpmcflags}" \
124 CXXFLAGS="%{rpmcflags}" \
125 TEXCONFIG=false \
126 ../configure \
127         --prefix=%{_prefix} \
128         --with-sysroot=$FAKE_ROOT \
129         --infodir=%{_infodir} \
130         --mandir=%{_mandir} \
131         --bindir=%{_bindir} \
132         --libdir=%{_libdir} \
133         --libexecdir=%{_libdir} \
134         --disable-shared \
135         --disable-threads \
136         --enable-languages="c,c++" \
137         --enable-c99 \
138         --enable-long-long \
139         --with-gnu-as \
140         --with-gnu-ld \
141         --with-system-zlib \
142         --with-multilib \
143         --with-sysroot=$FAKE_ROOT \
144         --without-x \
145         --target=%{target} \
146         --host=%{_target_platform} \
147         --build=%{_target_platform}
148
149 %{__make} all-gcc
150
151 %install
152 rm -rf $RPM_BUILD_ROOT
153
154 %{__make} -C obj-%{target} install-gcc \
155         DESTDIR=$RPM_BUILD_ROOT
156
157 install obj-%{target}/gcc/specs $RPM_BUILD_ROOT%{gcclib}
158
159 # don't want this here
160 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
161
162 # include/ contains install-tools/include/* and headers that were fixed up
163 # by fixincludes, we don't want former
164 gccdir=$(echo $RPM_BUILD_ROOT%{_libdir}/gcc/*/*/)
165 mkdir   $gccdir/tmp
166 # we have to save these however
167 #{?with_java:mv -f $gccdir/include/{gcj,libffi/ffitarget.h} $gccdir/tmp}
168 mv -f   $gccdir/include/syslimits.h $gccdir/tmp
169 rm -rf  $gccdir/include
170 mv -f   $gccdir/tmp $gccdir/include
171 cp -f   $gccdir/install-tools/include/*.h $gccdir/include
172 # but we don't want anything more from install-tools
173 rm -rf  $gccdir/install-tools
174
175 %if 0%{!?debug:1}
176 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}/libgcc.a
177 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}/libgcov.a
178 %endif
179
180 %clean
181 rm -rf $RPM_BUILD_ROOT
182
183 %files
184 %defattr(644,root,root,755)
185 %attr(755,root,root) %{_bindir}/%{target}-cpp
186 %attr(755,root,root) %{_bindir}/%{target}-gcc
187 %dir %{gccarch}
188 %dir %{gcclib}
189 %dir %{gcclib}/thumb
190 %attr(755,root,root) %{gcclib}/cc1
191 %attr(755,root,root) %{gcclib}/collect2
192 %{gcclib}/crt*.o
193 %{gcclib}/libgcc.a
194 %{gcclib}/thumb/crt*.o
195 %{gcclib}/thumb/libgcc.a
196 %{gcclib}/specs*
197 %dir %{gcclib}/include
198 %{gcclib}/include/*.h
199 %{_mandir}/man1/%{target}-cpp.1*
200 %{_mandir}/man1/%{target}-gcc.1*
201
202 %files c++
203 %defattr(644,root,root,755)
204 %attr(755,root,root) %{_bindir}/%{target}-g++
205 %attr(755,root,root) %{gcclib}/cc1plus
206 %{_mandir}/man1/%{target}-g++.1*
This page took 0.045385 seconds and 4 git commands to generate.