]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blob - crossmingw32-gcc.spec
- moved crt*.o to main package
[packages/crossmingw32-gcc.git] / crossmingw32-gcc.spec
1 #
2 # TODO:
3 # - openmp
4 #
5 # Conditional build:
6 %bcond_with     bootstrap       # bootstrap build (using binary w32api/mingwrt)
7 #
8 Summary:        Cross MinGW32 GNU binary utility development utilities - gcc
9 Summary(es.UTF-8):      Utilitarios para desarrollo de binarios de la GNU - MinGW32 gcc
10 Summary(fr.UTF-8):      Utilitaires de développement binaire de GNU - MinGW32 gcc
11 Summary(pl.UTF-8):      Skrośne narzędzia programistyczne GNU dla MinGW32 - gcc
12 Summary(pt_BR.UTF-8):   Utilitários para desenvolvimento de binários da GNU - MinGW32 gcc
13 Summary(tr.UTF-8):      GNU geliştirme araçları - MinGW32 gcc
14 Name:           crossmingw32-gcc
15 Version:        4.5.2
16 Release:        2
17 Epoch:          1
18 License:        GPL v3+
19 Group:          Development/Languages
20 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
21 # Source0-md5:  d6559145853fbaaa0fd7556ed93bce9a
22 %define         apiver  3.15
23 Source1:        http://downloads.sourceforge.net/mingw/w32api-%{apiver}-1-mingw32-dev.tar.lzma
24 # Source1-md5:  efcbcadd0299a6413d95b9ce919ede9f
25 %define         runver  3.18
26 Source2:        http://downloads.sourceforge.net/mingw/mingwrt-%{runver}-mingw32-dev.tar.gz
27 # Source2-md5:  e49803d8c14b1ffa6e24e5b5fee31a3d
28 # svn diff -x --ignore-eol-style svn://gcc.gnu.org/svn/gcc/tags/gcc_4_5_2_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch > gcc-branch.diff
29 Patch100:       gcc-branch.diff
30 Patch0:         %{name}-buildsystem1.patch
31 Patch1:         %{name}-buildsystem2.patch
32 Patch2:         %{name}-lfs.patch
33 BuildRequires:  autoconf
34 BuildRequires:  automake
35 BuildRequires:  bison
36 BuildRequires:  crossmingw32-binutils >= 2.15.91.0.2-2
37 BuildRequires:  flex
38 BuildRequires:  libmpc-devel
39 %if %{without bootstrap}
40 BuildRequires:  crossmingw32-runtime >= 3.5
41 BuildRequires:  crossmingw32-w32api >= 3.1
42 %endif
43 BuildRequires:  mpfr-devel
44 BuildRequires:  perl-tools-pod
45 BuildRequires:  texinfo >= 4.2
46 %if %{with booststrap}
47 BuildRequires:  tar >= 1:1.22
48 BuildRequires:  xz
49 %endif
50 Requires:       crossmingw32-binutils >= 2.15.91.0.2-2
51 Requires:       gcc-dirs
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %define         target          i386-mingw32
55 %define         sysprefix       /usr
56 %define         arch            %{sysprefix}/%{target}
57 %define         gccarchdir      %{_libdir}/gcc/%{target}
58 %define         gcclibdir       %{gccarchdir}/%{version}
59 %define         _dlldir         /usr/share/wine/windows/system
60
61 %define         _noautostrip    .*/lib.*\\.a
62
63 %define         _enable_debug_packages 0
64
65 %description
66 crossmingw32 is a complete cross-compiling development system for
67 building stand-alone Microsoft Windows applications under Linux using
68 the MinGW32 build libraries. This includes a binutils, gcc with g++
69 and objc, and libstdc++, all cross targeted to i386-mingw32, along
70 with supporting Win32 libraries in 'coff' format from free sources.
71
72 This package contains cross targeted gcc.
73
74 %description -l de.UTF-8
75 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
76 anderem Rechner Code für Win32 zu generieren.
77
78 %description -l pl.UTF-8
79 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
80 pozwalającym budować aplikacje MS Windows pod Linuksem używając
81 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
82 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
83 z bibliotek w formacie COFF.
84
85 Ten pakiet zawiera gcc generujące skrośnie kod dla Win32.
86
87 %package -n crossmingw32-libgcc-dll
88 Summary:        libgcc DLL library for Windows
89 Summary(pl.UTF-8):      Biblioteka DLL libgcc dla Windows
90 Group:          Applications/Emulators
91 Requires:       wine
92
93 %description -n crossmingw32-libgcc-dll
94 libgcc DLL library for Windows.
95
96 %description -n crossmingw32-libgcc-dll -l pl.UTF-8
97 Biblioteka DLL libgcc dla Windows.
98
99 %package c++
100 Summary:        MinGW32 binary utility development utilities - g++
101 Summary(pl.UTF-8):      Zestaw narzędzi MinGW32 - g++
102 Group:          Development/Languages
103 Requires:       %{name} = %{epoch}:%{version}-%{release}
104
105 %description c++
106 crossmingw32 is a complete cross-compiling development system for
107 building stand-alone Microsoft Windows applications under Linux using
108 the MinGW32 build libraries. This includes a binutils, gcc with g++
109 and objc, and libstdc++, all cross targeted to i386-mingw32, along
110 with supporting Win32 libraries in 'coff' format from free sources.
111
112 This package contains cross targeted g++ and (static) libstdc++.
113
114 %description c++ -l pl.UTF-8
115 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
116 pozwalającym budować aplikacje MS Windows pod Linuksem używając
117 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
118 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
119 z bibliotek w formacie COFF.
120
121 Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę
122 libstdc++.
123
124 %package -n crossmingw32-libstdc++-static
125 Summary:        Static standard C++ library - cross MinGW32 version
126 Summary(pl.UTF-8):      Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32
127 Group:          Development/Libraries
128 Requires:       %{name}-c++ = %{epoch}:%{version}-%{release}
129
130 %description -n crossmingw32-libstdc++-static
131 Static standard C++ library - cross MinGW32 version.
132
133 %description -n crossmingw32-libstdc++-static -l pl.UTF-8
134 Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32.
135
136 %package -n crossmingw32-libstdc++-dll
137 Summary:        libstdc++ DLL library for Windows
138 Summary(pl.UTF-8):      Biblioteka DLL libstdc++ dla Windows
139 Group:          Applications/Emulators
140 Requires:       crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
141 Requires:       wine
142
143 %description -n crossmingw32-libstdc++-dll
144 libstdc++ DLL library for Windows.
145
146 %description -n crossmingw32-libstdc++-dll -l pl.UTF-8
147 Biblioteka DLL libstdc++ dla Windows.
148
149 %package objc
150 Summary:        MinGW32 binary utility development utilities - objc
151 Summary(pl.UTF-8):      Zestaw narzędzi MinGW32 - objc
152 Group:          Development/Languages
153 Requires:       %{name} = %{epoch}:%{version}-%{release}
154
155 %description objc
156 crossmingw32 is a complete cross-compiling development system for
157 building stand-alone Microsoft Windows applications under Linux using
158 the MinGW32 build libraries. This includes a binutils, gcc with g++
159 and objc, and libstdc++, all cross targeted to i386-mingw32, along
160 with supporting Win32 libraries in 'coff' format from free sources.
161
162 This package contains cross targeted objc compiler.
163
164 %description objc -l pl.UTF-8
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
169 z bibliotek w formacie COFF.
170
171 Ten pakiet zawiera kompilator objc generujący kod pod Win32.
172
173 %package -n crossmingw32-libobjc-static
174 Summary:        Static Objective C library - cross MinGW32 version
175 Summary(pl.UTF-8):      Statyczna biblioteka Objective C - wersja skrośna MinGW32
176 Group:          Development/Libraries
177 Requires:       %{name}-objc = %{epoch}:%{version}-%{release}
178
179 %description -n crossmingw32-libobjc-static
180 Static Objective C library - cross MinGW32 version.
181
182 %description -n crossmingw32-libobjc-static -l pl.UTF-8
183 Statyczna biblioteka Objective C - wersja skrośna MinGW32.
184
185 %package -n crossmingw32-libobjc-dll
186 Summary:        libobjc DLL library for Windows
187 Summary(pl.UTF-8):      Biblioteka DLL libobjc dla Windows
188 Group:          Applications/Emulators
189 Requires:       crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
190 Requires:       wine
191
192 %description -n crossmingw32-libobjc-dll
193 libobjc DLL library for Windows.
194
195 %description -n crossmingw32-libobjc-dll -l pl.UTF-8
196 Biblioteka DLL libobjc dla Windows.
197
198 %package fortran
199 Summary:        MinGW32 binary utility development utilities - Fortran
200 Summary(pl.UTF-8):      Zestaw narzędzi MinGW32 - Fortran
201 Group:          Development/Languages
202 Requires:       %{name} = %{epoch}:%{version}-%{release}
203 Obsoletes:      crossmingw32-gcc-g77
204
205 %description fortran
206 crossmingw32 is a complete cross-compiling development system for
207 building stand-alone Microsoft Windows applications under Linux using
208 the MinGW32 build libraries. This includes a binutils, gcc with g++
209 and objc, and libstdc++, all cross targeted to i386-mingw32, along
210 with supporting Win32 libraries in 'coff' format from free sources.
211
212 This package contains cross targeted Fortran compiler.
213
214 %description fortran -l pl.UTF-8
215 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
216 pozwalającym budować aplikacje MS Windows pod Linuksem używając
217 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
218 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
219 z bibliotek w formacie COFF.
220
221 Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32.
222
223 %package -n crossmingw32-libgfortran-static
224 Summary:        Static Fortran library - cross MinGW32 version
225 Summary(pl.UTF-8):      Statyczna biblioteka Fortrana - wersja skrośna MinGW32
226 Group:          Development/Libraries
227 Requires:       %{name}-fortran = %{epoch}:%{version}-%{release}
228
229 %description -n crossmingw32-libgfortran-static
230 Static Fortran library - cross MinGW32 version.
231
232 %description -n crossmingw32-libgfortran-static -l pl.UTF-8
233 Statyczna biblioteka Fortrana - wersja skrośna MinGW32.
234
235 %package -n crossmingw32-libgfortran-dll
236 Summary:        libgfortran DLL library for Windows
237 Summary(pl.UTF-8):      Biblioteka DLL libgfortran dla Windows
238 Group:          Applications/Emulators
239 Requires:       wine
240
241 %description -n crossmingw32-libgfortran-dll
242 libgfortran DLL library for Windows.
243
244 %description -n crossmingw32-libgfortran-dll -l pl.UTF-8
245 Biblioteka DLL libgfortran dla Windows.
246
247 %package java
248 Summary:        MinGW32 binary utility development utilities - Java
249 Summary(pl.UTF-8):      Zestaw narzędzi MinGW32 - Java
250 Group:          Development/Languages
251 Requires:       %{name} = %{epoch}:%{version}-%{release}
252
253 %description java
254 crossmingw32 is a complete cross-compiling development system for
255 building stand-alone Microsoft Windows applications under Linux using
256 the MinGW32 build libraries. This includes a binutils, gcc with g++
257 and objc, and libstdc++, all cross targeted to i386-mingw32, along
258 with supporting Win32 libraries in 'coff' format from free sources.
259
260 This package contains cross targeted Java compiler.
261
262 %description java -l pl.UTF-8
263 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
264 pozwalającym budować aplikacje MS Windows pod Linuksem używając
265 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
266 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
267 z bibliotek w formacie COFF.
268
269 Ten pakiet zawiera kompilator Javy generujący kod pod Win32.
270
271 %prep
272 %setup -q -n gcc-%{version}
273 %patch100 -p0
274 %patch0 -p1
275 %patch2 -p1
276
277 %if %{with bootstrap}
278 # note: "winsup" dirs below are special, handled by gcc's configure
279 install -d winsup/{mingw,w32api}
280 tar xf %{SOURCE1} -C winsup/w32api
281 tar xf %{SOURCE2} -C winsup/mingw
282 %endif
283
284 # override snapshot version.
285 echo %{version} > gcc/BASE-VER
286 echo "release" > gcc/DEV-PHASE
287
288 %build
289 rm -rf builddir && install -d builddir && cd builddir
290 %if %{with bootstrap}
291 install -d %{target}/winsup
292 ln -sf ../../../winsup/mingw/lib %{target}/winsup/mingw
293 ln -sf ../../../winsup/w32api %{target}/winsup/w32api
294 WINSUPDIR=$(cd ..; pwd)/winsup
295 %endif
296
297 CC="%{__cc}" \
298 CFLAGS="%{rpmcflags}" \
299 CXXFLAGS="%{rpmcxxflags}" \
300 TEXCONFIG=false \
301 ../configure \
302         --prefix=%{sysprefix} \
303         --bindir=%{arch}/bin \
304         --libdir=%{_libdir} \
305         --includedir=%{arch}/include \
306         --libexecdir=%{_libdir} \
307         --infodir=%{_infodir} \
308         --mandir=%{_mandir} \
309         %{!?with_bootstrap:--with-headers=%{arch}/include} \
310         --with-libs=%{!?with_bootstrap:%{arch}/lib}%{?with_bootstrap:${WINSUPDIR}/mingw/lib} \
311         --with-build-time-tools=%{arch}/bin \
312         --with-dwarf2 \
313         --with-gnu-as \
314         --with-gnu-ld \
315         --with-mangler-in-ld \
316         --with-long-double-128 \
317         --enable-threads \
318         --enable-languages="c,c++,fortran,java,objc" \
319         --enable-c99 \
320         --enable-long-long \
321         --enable-fully-dynamic-string \
322         --enable-libstdcxx-allocator=new \
323         --enable-version-specific-runtime-libs \
324         --enable-shared \
325         --disable-nls \
326         --disable-symvers \
327         --disable-sjlj-exceptions \
328         --disable-win32-registry \
329         --disable-multilib \
330         --disable-libssp \
331         --target=%{target}
332
333 cd ..
334 %{__make} -C builddir all-host
335 patch -p1 <%{PATCH1}
336 %{__make} -C builddir
337
338 %install
339 rm -rf $RPM_BUILD_ROOT
340 install -d $RPM_BUILD_ROOT%{_bindir}
341
342 %{__make} -C builddir install \
343         DESTDIR=$RPM_BUILD_ROOT
344
345 # host (ELF) library
346 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libiberty.a
347
348 mv $RPM_BUILD_ROOT%{gcclibdir}/include-fixed/{limits,syslimits}.h $RPM_BUILD_ROOT%{gcclibdir}/include
349 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/include-fixed
350 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/install-tools
351
352 # these must be symlinks: gcclibdir is calculated relatively to real binary path
353 ln -sf %{arch}/bin/%{target}-gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
354 ln -sf %{arch}/bin/%{target}-g++ $RPM_BUILD_ROOT%{_bindir}/%{target}-g++
355 ln -sf %{arch}/bin/%{target}-cpp $RPM_BUILD_ROOT%{_bindir}/%{target}-cpp
356 ln -sf %{arch}/bin/%{target}-gcov $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov
357 ln -sf %{arch}/bin/%{target}-gcj $RPM_BUILD_ROOT%{_bindir}/%{target}-gcj
358 ln -sf %{arch}/bin/%{target}-jcf-dump $RPM_BUILD_ROOT%{_bindir}/%{target}-jcf-dump
359 ln -sf %{arch}/bin/%{target}-gfortran $RPM_BUILD_ROOT%{_bindir}/%{target}-gfortran
360
361 # DLLs
362 install -d $RPM_BUILD_ROOT%{_dlldir}
363 mv -f $RPM_BUILD_ROOT%{arch}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir}
364 if [ ! -f $RPM_BUILD_ROOT%{_dlldir}/libgcc_s_dw2-1.dll ]; then
365         echo "libgcc DLL not installed?"
366         install builddir/i386-mingw32/libgcc/shlib/libgcc_s_dw2-1.dll $RPM_BUILD_ROOT%{_dlldir}
367 fi
368
369 %if 0%{!?debug:1}
370 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
371 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{gcclibdir}/lib*.a \
372         $RPM_BUILD_ROOT%{arch}/lib/lib*.a
373 %endif
374
375 # already in native gcc
376 %{__rm} -r $RPM_BUILD_ROOT%{_infodir}
377 # common FSF man pages
378 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man7/{fsf-funding,gfdl,gpl}.7
379 # programs not packaged
380 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/%{target}-{aot-compile,gc-analyze,gcj-dbtool,gij,grmic,jv-convert,rebuild-gcj-db}.1
381
382 %clean
383 rm -rf $RPM_BUILD_ROOT
384
385 %files
386 %defattr(644,root,root,755)
387 %attr(755,root,root) %{_bindir}/%{target}-gcc
388 %attr(755,root,root) %{_bindir}/%{target}-cpp
389 %attr(755,root,root) %{_bindir}/%{target}-gcov
390 %attr(755,root,root) %{arch}/bin/%{target}-gcc
391 %attr(755,root,root) %{arch}/bin/%{target}-gcc-%{version}
392 %attr(755,root,root) %{arch}/bin/%{target}-gccbug
393 %attr(755,root,root) %{arch}/bin/%{target}-cpp
394 %attr(755,root,root) %{arch}/bin/%{target}-gcov
395 %attr(755,root,root) %{arch}/bin/gcc
396 %{arch}/lib/libiberty.a
397 %dir %{gccarchdir}
398 %dir %{gcclibdir}
399 %attr(755,root,root) %{gcclibdir}/cc1
400 %attr(755,root,root) %{gcclibdir}/collect2
401 %attr(755,root,root) %{gcclibdir}/lto-wrapper
402 %{gcclibdir}/libgcc.a
403 %{gcclibdir}/libgcc_eh.a
404 %{gcclibdir}/libgcc_s.a
405 %{gcclibdir}/libgcov.a
406 %{gcclibdir}/crtbegin.o
407 %{gcclibdir}/crtend.o
408 %{gcclibdir}/crtfastmath.o
409 %dir %{gcclibdir}/include
410 %{gcclibdir}/include/*.h
411 %{_mandir}/man1/%{target}-cpp.1*
412 %{_mandir}/man1/%{target}-gcc.1*
413 %{_mandir}/man1/%{target}-gcov.1*
414
415 %files -n crossmingw32-libgcc-dll
416 %defattr(644,root,root,755)
417 %{_dlldir}/libgcc_s_dw2-1.dll
418
419 %files c++
420 %defattr(644,root,root,755)
421 %attr(755,root,root) %{_bindir}/%{target}-g++
422 %attr(755,root,root) %{arch}/bin/%{target}-c++
423 %attr(755,root,root) %{arch}/bin/%{target}-g++
424 %attr(755,root,root) %{arch}/bin/c++
425 %attr(755,root,root) %{arch}/bin/g++
426 %attr(755,root,root) %{gcclibdir}/cc1plus
427 %{gcclibdir}/libstdc++.dll.a
428 %{gcclibdir}/libstdc++.la
429 %{gcclibdir}/libsupc++.la
430 %{gcclibdir}/libsupc++.a
431 %{gcclibdir}/include/c++
432 %{_mandir}/man1/%{target}-g++.1*
433
434 %files -n crossmingw32-libstdc++-static
435 %defattr(644,root,root,755)
436 %{gcclibdir}/libstdc++.a
437
438 %files -n crossmingw32-libstdc++-dll
439 %defattr(644,root,root,755)
440 %{_dlldir}/libstdc++-6.dll
441
442 %files objc
443 %defattr(644,root,root,755)
444 %attr(755,root,root) %{gcclibdir}/cc1obj
445 %{gcclibdir}/libobjc.dll.a
446 %{gcclibdir}/libobjc.la
447 %{gcclibdir}/include/objc
448
449 %files -n crossmingw32-libobjc-static
450 %defattr(644,root,root,755)
451 %{gcclibdir}/libobjc.a
452
453 %files -n crossmingw32-libobjc-dll
454 %defattr(644,root,root,755)
455 %{_dlldir}/libobjc-2.dll
456
457 %files fortran
458 %defattr(644,root,root,755)
459 %attr(755,root,root) %{_bindir}/%{target}-gfortran
460 %attr(755,root,root) %{arch}/bin/%{target}-gfortran
461 %attr(755,root,root) %{arch}/bin/gfortran
462 %attr(755,root,root) %{gcclibdir}/f951
463 %{gcclibdir}/finclude
464 %{gcclibdir}/libgfortran.dll.a
465 %{gcclibdir}/libgfortran.la
466 %{gcclibdir}/libgfortranbegin.a
467 %{gcclibdir}/libgfortranbegin.la
468 %{_mandir}/man1/%{target}-gfortran.1*
469
470 %files -n crossmingw32-libgfortran-static
471 %defattr(644,root,root,755)
472 %{gcclibdir}/libgfortran.a
473
474 %files -n crossmingw32-libgfortran-dll
475 %defattr(644,root,root,755)
476 %{_dlldir}/libgfortran-3.dll
477
478 %files java
479 %defattr(644,root,root,755)
480 %attr(755,root,root) %{_bindir}/%{target}-gcj
481 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
482 %attr(755,root,root) %{arch}/bin/%{target}-gcj
483 %attr(755,root,root) %{arch}/bin/%{target}-jcf-dump
484 %attr(755,root,root) %{gcclibdir}/jc1
485 %attr(755,root,root) %{gcclibdir}/jvgenmain
486 %{_mandir}/man1/%{target}-gcj.1*
487 %{_mandir}/man1/%{target}-jcf-dump.1*
This page took 0.075372 seconds and 3 git commands to generate.