]>
Commit | Line | Data |
---|---|---|
b5cedbcf ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with bootstrap # bootstrap build (using binary w32api/mingw) | |
4 | # | |
5 | Summary: Cross Mingw32 GNU binary utility development utilities - gcc | |
baa4c5f5 ER |
6 | Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - Mingw32 gcc |
7 | Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - Mingw32 gcc | |
8 | Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla Mingw32 - gcc | |
9 | Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - Mingw32 gcc | |
10 | Summary(tr.UTF-8): GNU geliştirme araçları - Mingw32 gcc | |
b5cedbcf | 11 | Name: crossmingw32ce-gcc |
baa4c5f5 | 12 | Version: 4.1.0 |
b5cedbcf ER |
13 | Release: 0.1 |
14 | License: GPL | |
15 | Group: Development/Languages | |
baa4c5f5 ER |
16 | #Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2 |
17 | # https://cegcc.svn.sourceforge.net/svnroot/cegcc/trunk/cegcc/src/gcc | |
18 | # Obtained from SVN: tags/gcc_4_1_0_release revision 111560 | |
19 | Source0: gcc-20070227.909.tar.bz2 | |
20 | # Source0-md5: ece53d2ea4d055f48d4f819922332d21 | |
b5cedbcf ER |
21 | %define apiver 3.7 |
22 | Source1: http://dl.sourceforge.net/mingw/w32api-%{apiver}.tar.gz | |
23 | # Source1-md5: 0b3a6d08136581c93b3a3207588acea9 | |
24 | %define runver 3.10 | |
25 | Source2: http://dl.sourceforge.net/mingw/mingw-runtime-%{runver}.tar.gz | |
26 | # Source2-md5: 7fa2638d23136fd84d5d627bef3b408a | |
27 | Patch0: gcc-nodebug.patch | |
baa4c5f5 | 28 | #Patch1: crossmingw32-gcc-noioctl.patch |
b5cedbcf ER |
29 | BuildRequires: autoconf |
30 | BuildRequires: automake | |
31 | BuildRequires: bison | |
32 | BuildRequires: crossmingw32ce-binutils >= 2.15.91.0.2-2 | |
33 | BuildRequires: flex | |
baa4c5f5 ER |
34 | BuildRequires: rpmbuild(macros) >= 1.315 |
35 | %if %{without bootstrap} | |
b5cedbcf ER |
36 | BuildRequires: crossmingw32ce-runtime >= 3.5 |
37 | BuildRequires: crossmingw32ce-w32api >= 3.1 | |
38 | %endif | |
39 | BuildRequires: mpfr-devel | |
40 | Requires: crossmingw32-binutils >= 2.15.91.0.2-2 | |
41 | Requires: gcc-dirs | |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
43 | ||
baa4c5f5 ER |
44 | %define target arm-wince-mingw32ce |
45 | %define target_platform arm-wince-mingw32ce | |
b5cedbcf ER |
46 | %define arch %{_prefix}/%{target} |
47 | %define gccarch %{_libdir}/gcc/%{target} | |
48 | %define gcclib %{gccarch}/%{version} | |
49 | ||
baa4c5f5 ER |
50 | %define _noautostrip .*/lib.*\\.a |
51 | ||
52 | # -march=i686 is invalid | |
53 | # so as i can't decide whether to use -march=armv4 or -march=armv5, i'll just strip | |
54 | %define filterout_c -march=.* | |
55 | %define filterout_cxx -march=.* | |
b5cedbcf ER |
56 | |
57 | %description | |
58 | crossmingw32 is a complete cross-compiling development system for | |
59 | building stand-alone Microsoft Windows applications under Linux using | |
60 | the Mingw32 build libraries. This includes a binutils, gcc with g++ | |
61 | and objc, and libstdc++, all cross targeted to i386-mingw32, along | |
62 | with supporting Win32 libraries in 'coff' format from free sources. | |
63 | ||
64 | This package contains cross targeted gcc. | |
65 | ||
baa4c5f5 ER |
66 | %description -l de.UTF-8 |
67 | Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem | |
68 | anderem Rechner Code für Win32 zu generieren. | |
b5cedbcf | 69 | |
baa4c5f5 ER |
70 | %description -l pl.UTF-8 |
71 | crossmingw32 jest kompletnym systemem do kompilacji skrośnej, | |
72 | pozwalającym budować aplikacje MS Windows pod Linuksem używając | |
73 | bibliotek Mingw32. System składa się z binutils, gcc z g++ i objc, | |
74 | libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz | |
b5cedbcf ER |
75 | z bibliotek w formacie COFF. |
76 | ||
baa4c5f5 | 77 | Ten pakiet zawiera gcc generujące skrośnie kod dla Win32. |
b5cedbcf ER |
78 | |
79 | %package c++ | |
80 | Summary: Mingw32 binary utility development utilities - g++ | |
baa4c5f5 | 81 | Summary(pl.UTF-8): Zestaw narzędzi mingw32 - g++ |
b5cedbcf ER |
82 | Group: Development/Languages |
83 | Requires: %{name} = %{version}-%{release} | |
84 | ||
85 | %description c++ | |
86 | crossmingw32 is a complete cross-compiling development system for | |
87 | building stand-alone Microsoft Windows applications under Linux using | |
88 | the Mingw32 build libraries. This includes a binutils, gcc with g++ | |
89 | and objc, and libstdc++, all cross targeted to i386-mingw32, along | |
90 | with supporting Win32 libraries in 'coff' format from free sources. | |
91 | ||
92 | This package contains cross targeted g++ and (static) libstdc++. | |
93 | ||
baa4c5f5 ER |
94 | %description c++ -l pl.UTF-8 |
95 | crossmingw32 jest kompletnym systemem do kompilacji skrośnej, | |
96 | pozwalającym budować aplikacje MS Windows pod Linuksem używając | |
97 | bibliotek mingw32. System składa się z binutils, gcc z g++ i objc, | |
98 | libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz | |
b5cedbcf ER |
99 | z bibliotek w formacie COFF. |
100 | ||
baa4c5f5 | 101 | Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę |
b5cedbcf ER |
102 | libstdc++. |
103 | ||
104 | # does this even work? | |
105 | %package objc | |
106 | Summary: Mingw32 binary utility development utilities - objc | |
baa4c5f5 | 107 | Summary(pl.UTF-8): Zestaw narzędzi mingw32 - objc |
b5cedbcf ER |
108 | Group: Development/Languages |
109 | Requires: %{name} = %{version}-%{release} | |
110 | ||
111 | %description objc | |
112 | crossmingw32 is a complete cross-compiling development system for | |
113 | building stand-alone Microsoft Windows applications under Linux using | |
114 | the Mingw32 build libraries. This includes a binutils, gcc with g++ | |
115 | and objc, and libstdc++, all cross targeted to i386-mingw32, along | |
116 | with supporting Win32 libraries in 'coff' format from free sources. | |
117 | ||
118 | This package contains cross targeted objc compiler. | |
119 | ||
baa4c5f5 ER |
120 | %description objc -l pl.UTF-8 |
121 | crossmingw32 jest kompletnym systemem do kompilacji skrośnej, | |
122 | pozwalającym budować aplikacje MS Windows pod Linuksem używając | |
123 | bibliotek mingw32. System składa się z binutils, gcc z g++ i objc, | |
124 | libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz | |
b5cedbcf ER |
125 | z bibliotek w formacie COFF. |
126 | ||
baa4c5f5 | 127 | Ten pakiet zawiera kompilator objc generujący kod pod Win32. |
b5cedbcf ER |
128 | |
129 | # does this even work? | |
130 | %package fortran | |
131 | Summary: Mingw32 binary utility development utilities - Fortran | |
baa4c5f5 | 132 | Summary(pl.UTF-8): Zestaw narzędzi mingw32 - Fortran |
b5cedbcf ER |
133 | Group: Development/Languages |
134 | Requires: %{name} = %{version}-%{release} | |
135 | ||
136 | %description fortran | |
137 | crossmingw32 is a complete cross-compiling development system for | |
138 | building stand-alone Microsoft Windows applications under Linux using | |
139 | the Mingw32 build libraries. This includes a binutils, gcc with g++ | |
140 | and objc, and libstdc++, all cross targeted to i386-mingw32, along | |
141 | with supporting Win32 libraries in 'coff' format from free sources. | |
142 | ||
143 | This package contains cross targeted Fortran compiler. | |
144 | ||
baa4c5f5 ER |
145 | %description fortran -l pl.UTF-8 |
146 | crossmingw32 jest kompletnym systemem do kompilacji skrośnej, | |
147 | pozwalającym budować aplikacje MS Windows pod Linuksem używając | |
148 | bibliotek mingw32. System składa się z binutils, gcc z g++ i objc, | |
149 | libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz | |
b5cedbcf ER |
150 | z bibliotek w formacie COFF. |
151 | ||
baa4c5f5 | 152 | Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32. |
b5cedbcf ER |
153 | |
154 | # does this even work? | |
155 | %package java | |
156 | Summary: Mingw32 binary utility development utilities - Java | |
baa4c5f5 | 157 | Summary(pl.UTF-8): Zestaw narzędzi mingw32 - Java |
b5cedbcf ER |
158 | Group: Development/Languages |
159 | Requires: %{name} = %{version}-%{release} | |
160 | ||
161 | %description java | |
162 | crossmingw32 is a complete cross-compiling development system for | |
163 | building stand-alone Microsoft Windows applications under Linux using | |
164 | the Mingw32 build libraries. This includes a binutils, gcc with g++ | |
165 | and objc, and libstdc++, all cross targeted to i386-mingw32, along | |
166 | with supporting Win32 libraries in 'coff' format from free sources. | |
167 | ||
168 | This package contains cross targeted Java compiler. | |
169 | ||
baa4c5f5 | 170 | %description java -l pl.UTF-8 |
b5cedbcf | 171 | |
baa4c5f5 ER |
172 | crossmingw32 jest kompletnym systemem do kompilacji skrośnej, |
173 | pozwalającym budować aplikacje MS Windows pod Linuksem używając | |
174 | bibliotek mingw32. System składa się z binutils, gcc z g++ i objc, | |
175 | libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz | |
b5cedbcf ER |
176 | z bibliotek w formacie COFF. |
177 | ||
baa4c5f5 | 178 | Ten pakiet zawiera kompilator Javy generujący kod pod Win32. |
b5cedbcf ER |
179 | |
180 | %prep | |
baa4c5f5 | 181 | %setup -q -n gcc |
b5cedbcf ER |
182 | %if %{with bootstrap} |
183 | mkdir winsup | |
184 | tar xzf %{SOURCE1} -C winsup | |
185 | tar xzf %{SOURCE2} -C winsup | |
186 | %endif | |
187 | #{!?debug:%patch0 -p1} | |
baa4c5f5 | 188 | #%patch1 -p1 |
b5cedbcf ER |
189 | |
190 | %build | |
191 | %if %{with bootstrap} | |
192 | for tool in as ar dlltool ld nm ranlib strip ; do | |
193 | ln -sf %{arch}/bin/$tool winsup/bin/$tool | |
194 | done | |
195 | build_tooldir=`pwd`/winsup | |
196 | %else | |
197 | build_tooldir=%{arch} | |
198 | %endif | |
199 | ||
200 | cp /usr/share/automake/config.sub . | |
201 | cp /usr/share/automake/config.sub boehm-gc | |
202 | ||
203 | rm -rf obj-%{target_platform} | |
204 | install -d obj-%{target_platform} | |
205 | cd obj-%{target_platform} | |
206 | ||
207 | # note: alpha's -mieee and sparc's -mtune=* are not valid for target's g++ | |
208 | CFLAGS="%{rpmcflags}" \ | |
209 | %ifarch alpha | |
210 | CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mieee\>//'`" \ | |
211 | %else | |
212 | %ifarch sparc sparc64 sparcv9 | |
213 | CXXFLAGS="`echo '%{rpmcflags}' | sed -e 's/ \?-mtune[=0-9a-z]*//'`" \ | |
214 | %else | |
215 | CXXFLAGS="%{rpmcflags}" \ | |
216 | %endif | |
217 | %endif | |
218 | LDFLAGS="%{rpmldflags}" \ | |
219 | TEXCONFIG=false \ | |
220 | ../configure \ | |
221 | --prefix=%{_prefix} \ | |
222 | --infodir=%{_infodir} \ | |
223 | --mandir=%{_mandir} \ | |
224 | --bindir=%{arch}/bin \ | |
225 | --libdir=%{_libdir} \ | |
226 | --libexecdir=%{_libexecdir} \ | |
227 | --includedir=%{arch}/include \ | |
228 | --disable-shared \ | |
229 | --enable-threads \ | |
baa4c5f5 | 230 | --enable-languages="c,c++" \ |
b5cedbcf ER |
231 | --enable-c99 \ |
232 | --enable-long-long \ | |
233 | --disable-nls \ | |
234 | --with-gnu-as \ | |
235 | --with-gnu-ld \ | |
236 | --with-mangler-in-ld \ | |
237 | --with-gxx-include-dir=%{arch}/include/g++ \ | |
238 | --build=%{_target_platform} \ | |
239 | --host=%{_target_platform} \ | |
240 | --target=%{target} | |
241 | ||
242 | %{__make} all | |
243 | ||
244 | # spec files for msvcrt*.dll configurations | |
245 | cd gcc | |
246 | for n in msvcrt msvcrt20 msvcrt40; do | |
247 | sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n | |
248 | done | |
249 | ||
250 | %install | |
251 | rm -rf $RPM_BUILD_ROOT | |
252 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}} | |
253 | ||
254 | cd obj-%{target_platform} | |
255 | ||
256 | %{__make} install \ | |
257 | DESTDIR=$RPM_BUILD_ROOT | |
258 | ||
259 | cd gcc | |
260 | install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib} | |
261 | cd ../.. | |
262 | ||
263 | mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir} | |
264 | ||
265 | # already in arch/lib, shouldn't be here | |
266 | rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a | |
267 | ||
268 | # include/ contains install-tools/include/* and headers that were fixed up | |
269 | # by fixincludes, we don't want former | |
270 | gccdir=$RPM_BUILD_ROOT%{gcclib} | |
271 | mkdir $gccdir/tmp | |
272 | # we have to save these however | |
273 | mv -f $gccdir/include/syslimits.h $gccdir/tmp | |
274 | rm -rf $gccdir/include | |
275 | mv -f $gccdir/tmp $gccdir/include | |
276 | cp -f $gccdir/install-tools/include/*.h $gccdir/include | |
277 | # but we don't want anything more from install-tools | |
278 | rm -rf $gccdir/install-tools | |
279 | ||
280 | %if 0%{!?debug:1} | |
281 | %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a | |
282 | %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a | |
283 | %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{arch}/lib/lib*.a | |
284 | %endif | |
285 | ||
286 | # restore hardlinks | |
287 | ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++} | |
288 | ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++} | |
289 | ||
290 | # the same... make hardlink | |
291 | ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc | |
292 | ||
293 | %clean | |
294 | rm -rf $RPM_BUILD_ROOT | |
295 | ||
296 | %files | |
297 | %defattr(644,root,root,755) | |
298 | %attr(755,root,root) %{_bindir}/%{target}-gcc* | |
299 | %attr(755,root,root) %{_bindir}/%{target}-cpp | |
300 | %attr(755,root,root) %{_bindir}/%{target}-gcov | |
301 | %attr(755,root,root) %{arch}/bin/gcc | |
302 | %{arch}/lib/libiberty.a | |
303 | ||
304 | %dir %{gccarch} | |
305 | %dir %{gcclib} | |
306 | %attr(755,root,root) %{gcclib}/cc1 | |
307 | %attr(755,root,root) %{gcclib}/collect2 | |
308 | %{gcclib}/libgcc.a | |
309 | %{gcclib}/libgcov.a | |
310 | %{gcclib}/specs* | |
311 | %{gcclib}/include | |
312 | ||
313 | %{_mandir}/man1/%{target}-cpp.1* | |
314 | %{_mandir}/man1/%{target}-gcc.1* | |
315 | %{_mandir}/man1/%{target}-gcov.1* | |
316 | ||
317 | %{arch}/lib/libssp.a | |
318 | %{arch}/lib/libssp.la | |
319 | %{arch}/lib/libssp_nonshared.a | |
320 | %{arch}/lib/libssp_nonshared.la | |
321 | ||
322 | %files c++ | |
323 | %defattr(644,root,root,755) | |
324 | %attr(755,root,root) %{_bindir}/%{target}-[cg]++ | |
325 | %attr(755,root,root) %{arch}/bin/[cg]++ | |
326 | %attr(755,root,root) %{gcclib}/cc1plus | |
327 | %{arch}/lib/libstdc++.a | |
328 | %{arch}/lib/libstdc++.la | |
329 | %{arch}/lib/libsupc++.a | |
330 | %{arch}/lib/libsupc++.la | |
331 | %{arch}/include/g++ | |
332 | %{_mandir}/man1/%{target}-g++.1* | |
333 | ||
334 | %files objc | |
335 | %defattr(644,root,root,755) | |
336 | %attr(755,root,root) %{gcclib}/cc1obj | |
337 | %{arch}/lib/libobjc.a | |
338 | %{arch}/lib/libobjc.la | |
339 | ||
340 | %files fortran | |
341 | %defattr(644,root,root,755) | |
342 | %attr(755,root,root) %{_bindir}/%{target}-gfortran | |
343 | %attr(755,root,root) %{arch}/bin/gfortran | |
344 | %attr(755,root,root) %{gcclib}/f951 | |
345 | %{arch}/lib/libgfortran.a | |
346 | %{arch}/lib/libgfortran.la | |
347 | %{arch}/lib/libgfortranbegin.a | |
348 | %{arch}/lib/libgfortranbegin.la | |
349 | %{_mandir}/man1/%{target}-gfortran.1* | |
350 | ||
351 | %files java | |
352 | %defattr(644,root,root,755) | |
353 | %attr(755,root,root) %{_bindir}/%{target}-gcj | |
354 | %attr(755,root,root) %{_bindir}/%{target}-gcjh | |
355 | %attr(755,root,root) %{_bindir}/%{target}-gjnih | |
356 | %attr(755,root,root) %{_bindir}/%{target}-grepjar | |
357 | %attr(755,root,root) %{_bindir}/%{target}-fastjar | |
358 | %attr(755,root,root) %{_bindir}/%{target}-jcf-dump | |
359 | %attr(755,root,root) %{_bindir}/%{target}-jv-scan | |
360 | #%attr(755,root,root) %{arch}/bin/grepjar | |
361 | #%attr(755,root,root) %{arch}/bin/jar | |
362 | %attr(755,root,root) %{gcclib}/jc1 | |
363 | %attr(755,root,root) %{gcclib}/jvgenmain | |
364 | %{_mandir}/man1/%{target}-gcj.1* | |
365 | %{_mandir}/man1/%{target}-gcjh.1* | |
366 | %{_mandir}/man1/%{target}-gjnih.1* | |
367 | %{_mandir}/man1/%{target}-grepjar.1* | |
368 | %{_mandir}/man1/%{target}-fastjar.1* | |
369 | %{_mandir}/man1/%{target}-jcf-dump.1* | |
370 | %{_mandir}/man1/%{target}-jv-scan.1* |