3 # - restore languages other than c, c++
7 %bcond_with bootstrap # bootstrap build (using binary w32api/mingw)
9 Summary: Cross Mingw32 GNU binary utility development utilities - gcc
10 Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - Mingw32 gcc
11 Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - Mingw32 gcc
12 Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla Mingw32 - gcc
13 Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - Mingw32 gcc
14 Summary(tr.UTF-8): GNU geliştirme araçları - Mingw32 gcc
15 Name: crossmingw32-gcc
20 Group: Development/Languages
21 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
22 # Source0-md5: 48231a8e33ed6e058a341c53b819de1a
24 Source1: http://dl.sourceforge.net/mingw/w32api-%{apiver}.tar.gz
25 # Source1-md5: 7067a6b3ac9d94bb753f9f6f37e2033c
27 Source2: http://dl.sourceforge.net/mingw/mingw-runtime-%{runver}.tar.gz
28 # Source2-md5: 22179021f41d5eee76447b78fb94a3fb
29 # svn diff -x --ignore-eol-style svn://gcc.gnu.org/svn/gcc/tags/gcc_4_5_1_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch > gcc-branch.diff
30 Patch100: gcc-branch.diff
31 Patch0: %{name}-buildsystem1.patch
32 Patch1: %{name}-buildsystem2.patch
33 Patch2: %{name}-lfs.patch
34 BuildRequires: autoconf
35 BuildRequires: automake
37 BuildRequires: crossmingw32-binutils >= 2.15.91.0.2-2
39 BuildRequires: libmpc-devel
40 %if %{without bootstrap}
41 BuildRequires: crossmingw32-runtime >= 3.5
42 BuildRequires: crossmingw32-w32api >= 3.1
44 BuildRequires: mpfr-devel
45 BuildRequires: texinfo >= 4.2
46 Requires: crossmingw32-binutils >= 2.15.91.0.2-2
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 %define target i386-mingw32
51 %define arch %{_prefix}/%{target}
52 %define gccarch %{_libdir}/gcc/%{target}
53 %define gcclib %{gccarch}/%{version}
55 %define _noautostrip .*/lib.*\\.a
57 %define _enable_debug_packages 0
60 crossmingw32 is a complete cross-compiling development system for
61 building stand-alone Microsoft Windows applications under Linux using
62 the Mingw32 build libraries. This includes a binutils, gcc with g++
63 and objc, and libstdc++, all cross targeted to i386-mingw32, along
64 with supporting Win32 libraries in 'coff' format from free sources.
66 This package contains cross targeted gcc.
68 %description -l de.UTF-8
69 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
70 anderem Rechner Code für Win32 zu generieren.
72 %description -l pl.UTF-8
73 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
74 pozwalającym budować aplikacje MS Windows pod Linuksem używając
75 bibliotek Mingw32. System składa się z binutils, gcc z g++ i objc,
76 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
77 z bibliotek w formacie COFF.
79 Ten pakiet zawiera gcc generujące skrośnie kod dla Win32.
82 Summary: Mingw32 binary utility development utilities - g++
83 Summary(pl.UTF-8): Zestaw narzędzi mingw32 - g++
84 Group: Development/Languages
85 Requires: %{name} = %{epoch}:%{version}-%{release}
88 crossmingw32 is a complete cross-compiling development system for
89 building stand-alone Microsoft Windows applications under Linux using
90 the Mingw32 build libraries. This includes a binutils, gcc with g++
91 and objc, and libstdc++, all cross targeted to i386-mingw32, along
92 with supporting Win32 libraries in 'coff' format from free sources.
94 This package contains cross targeted g++ and (static) libstdc++.
96 %description c++ -l pl.UTF-8
97 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
98 pozwalającym budować aplikacje MS Windows pod Linuksem używając
99 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
100 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
101 z bibliotek w formacie COFF.
103 Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę
106 # no obj-c, fortran, java for the moment
108 # does this even work?
110 Summary: Mingw32 binary utility development utilities - objc
111 Summary(pl.UTF-8): Zestaw narzędzi mingw32 - objc
112 Group: Development/Languages
113 Requires: %{name} = %{epoch}:%{version}-%{release}
116 crossmingw32 is a complete cross-compiling development system for
117 building stand-alone Microsoft Windows applications under Linux using
118 the Mingw32 build libraries. This includes a binutils, gcc with g++
119 and objc, and libstdc++, all cross targeted to i386-mingw32, along
120 with supporting Win32 libraries in 'coff' format from free sources.
122 This package contains cross targeted objc compiler.
124 %description objc -l pl.UTF-8
125 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
126 pozwalającym budować aplikacje MS Windows pod Linuksem używając
127 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
128 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
129 z bibliotek w formacie COFF.
131 Ten pakiet zawiera kompilator objc generujący kod pod Win32.
133 # does this even work?
135 Summary: Mingw32 binary utility development utilities - Fortran
136 Summary(pl.UTF-8): Zestaw narzędzi mingw32 - Fortran
137 Group: Development/Languages
138 Requires: %{name} = %{epoch}:%{version}-%{release}
139 Obsoletes: crossmingw32-gcc-g77
142 crossmingw32 is a complete cross-compiling development system for
143 building stand-alone Microsoft Windows applications under Linux using
144 the Mingw32 build libraries. This includes a binutils, gcc with g++
145 and objc, and libstdc++, all cross targeted to i386-mingw32, along
146 with supporting Win32 libraries in 'coff' format from free sources.
148 This package contains cross targeted Fortran compiler.
150 %description fortran -l pl.UTF-8
151 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
152 pozwalającym budować aplikacje MS Windows pod Linuksem używając
153 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
154 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
155 z bibliotek w formacie COFF.
157 Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32.
159 # does this even work?
161 Summary: Mingw32 binary utility development utilities - Java
162 Summary(pl.UTF-8): Zestaw narzędzi mingw32 - Java
163 Group: Development/Languages
164 Requires: %{name} = %{epoch}:%{version}-%{release}
167 crossmingw32 is a complete cross-compiling development system for
168 building stand-alone Microsoft Windows applications under Linux using
169 the Mingw32 build libraries. This includes a binutils, gcc with g++
170 and objc, and libstdc++, all cross targeted to i386-mingw32, along
171 with supporting Win32 libraries in 'coff' format from free sources.
173 This package contains cross targeted Java compiler.
175 %description java -l pl.UTF-8
177 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
178 pozwalającym budować aplikacje MS Windows pod Linuksem używając
179 bibliotek mingw32. System składa się z binutils, gcc z g++ i objc,
180 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
181 z bibliotek w formacie COFF.
183 Ten pakiet zawiera kompilator Javy generujący kod pod Win32.
187 %setup -q -n gcc-%{version}
192 %if %{with bootstrap}
194 tar xzf %{SOURCE1} -C winsup
195 tar xzf %{SOURCE2} -C winsup
198 # override snapshot version.
199 echo %{version} > gcc/BASE-VER
200 echo "release" > gcc/DEV-PHASE
203 %if %{with bootstrap}
204 for tool in as ar dlltool ld nm ranlib strip ; do
205 ln -sf %{arch}/bin/$tool winsup/bin/$tool
209 rm -rf builddir && install -d builddir && cd builddir
212 CFLAGS="%{rpmcflags}" \
213 CXXFLAGS="%{rpmcxxflags}" \
217 --infodir=%{_infodir} \
218 --mandir=%{_mandir} \
219 --with-headers=%{arch}/include \
220 --with-libs=%{arch}/lib \
221 --with-build-time-tools=%{arch}/bin \
225 --with-mangler-in-ld \
226 --with-long-double-128 \
228 --enable-languages="c,c++" \
231 --enable-fully-dynamic-string \
232 --enable-libstdcxx-allocator=new \
233 --enable-version-specific-runtime-libs \
237 --disable-sjlj-exceptions \
238 --disable-win32-registry \
244 %{__make} -C builddir all-host
246 %{__make} -C builddir
249 rm -rf $RPM_BUILD_ROOT
250 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}}
252 %{__make} -C builddir install \
253 DESTDIR=$RPM_BUILD_ROOT
256 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{arch}/lib/lib*.a
260 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
261 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-g++ $RPM_BUILD_ROOT%{_bindir}/%{target}-g++
262 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-cpp $RPM_BUILD_ROOT%{_bindir}/%{target}-cpp
263 ln -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-gcov $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov
265 install -d $RPM_BUILD_ROOT%{_libdir}
266 install -d $RPM_BUILD_ROOT%{_libdir}/gcc
268 cp -r $RPM_BUILD_ROOT%{arch}/libexec/gcc/%{target} $RPM_BUILD_ROOT%{_libdir}/gcc
269 cp -r $RPM_BUILD_ROOT%{arch}/lib/gcc/%{target} $RPM_BUILD_ROOT%{_libdir}/gcc
270 rm -rf $RPM_BUILD_ROOT%{_libdir}/gcc/%{target}/%{version}/install-tools
271 rm -rf $RPM_BUILD_ROOT%{arch}/libexec
272 rm -rf $RPM_BUILD_ROOT%{arch}/lib/gcc
274 mv -f $RPM_BUILD_ROOT%{_libdir}/gcc/%{target}/%{version}/cc1 $RPM_BUILD_ROOT%{arch}/bin/cc1
275 mv -f $RPM_BUILD_ROOT%{_libdir}/gcc/%{target}/%{version}/cc1plus $RPM_BUILD_ROOT%{arch}/bin/cc1plus
276 mv -f $RPM_BUILD_ROOT%{_libdir}/gcc/%{target}/%{version}/collect2 $RPM_BUILD_ROOT%{arch}/bin/collect2
278 install builddir/i386-mingw32/libgcc/shlib/libgcc_s_dw2-1.dll $RPM_BUILD_ROOT%{arch}/bin
280 rm -rf $RPM_BUILD_ROOT
283 %defattr(644,root,root,755)
284 %attr(755,root,root) %{_bindir}/%{target}-gcc
285 %attr(755,root,root) %{_bindir}/%{target}-cpp
286 %attr(755,root,root) %{_bindir}/%{target}-gcov
287 %attr(755,root,root) %{arch}/bin/%{target}-gcc*
288 %attr(755,root,root) %{arch}/bin/%{target}-cpp
289 %attr(755,root,root) %{arch}/bin/%{target}-gcov
290 %attr(755,root,root) %{arch}/bin/cc1
291 %attr(755,root,root) %{arch}/bin/collect2
294 %{_libdir}/gcc/%{target}
295 %{arch}/%{_lib}/libiberty.a
297 %{_mandir}/man1/%{target}-cpp.1*
298 %{_mandir}/man1/%{target}-gcc.1*
299 %{_mandir}/man1/%{target}-gcov.1*
302 %defattr(644,root,root,755)
303 %attr(755,root,root) %{_bindir}/%{target}-g++
304 %attr(755,root,root) %{arch}/bin/%{target}-c++
305 %attr(755,root,root) %{arch}/bin/%{target}-g++
306 %attr(755,root,root) %{arch}/bin/cc1plus
308 %{_mandir}/man1/%{target}-g++.1*
310 # no obj-c, fortran, java for the moment
313 %defattr(644,root,root,755)
314 %attr(755,root,root) %{gcclib}/cc1obj
315 %{arch}/lib/libobjc.a
316 %{arch}/lib/libobjc.la
319 %defattr(644,root,root,755)
320 %attr(755,root,root) %{_bindir}/%{target}-gfortran
321 %attr(755,root,root) %{arch}/bin/gfortran
322 %attr(755,root,root) %{gcclib}/f951
323 %{arch}/lib/libgfortran.a
324 %{arch}/lib/libgfortran.la
325 %{arch}/lib/libgfortranbegin.a
326 %{arch}/lib/libgfortranbegin.la
327 %{_mandir}/man1/%{target}-gfortran.1*
330 %defattr(644,root,root,755)
331 %attr(755,root,root) %{_bindir}/%{target}-gcj
332 %attr(755,root,root) %{_bindir}/%{target}-gcjh
333 %attr(755,root,root) %{_bindir}/%{target}-gjnih
334 %attr(755,root,root) %{_bindir}/%{target}-grepjar
335 %attr(755,root,root) %{_bindir}/%{target}-fastjar
336 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
337 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
338 #%attr(755,root,root) %{arch}/bin/grepjar
339 #%attr(755,root,root) %{arch}/bin/jar
340 %attr(755,root,root) %{gcclib}/jc1
341 %attr(755,root,root) %{gcclib}/jvgenmain
342 %{_mandir}/man1/%{target}-gcj.1*
343 %{_mandir}/man1/%{target}-gcjh.1*
344 %{_mandir}/man1/%{target}-gjnih.1*
345 %{_mandir}/man1/%{target}-grepjar.1*
346 %{_mandir}/man1/%{target}-fastjar.1*
347 %{_mandir}/man1/%{target}-jcf-dump.1*
348 %{_mandir}/man1/%{target}-jv-scan.1*