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