1 %define DASHED_SNAP %{nil}
2 %define SNAP %(echo %{DASHED_SNAP} | sed -e "s#-##g")
3 %define GCC_VERSION 3.3
4 Summary: Mingw32 Binary Utility Development Utilities - gcc
5 Summary(pl): Zestaw narzêdzi mingw32 - gcc
7 Version: %{GCC_VERSION}
11 Group: Development/Languages
12 ExclusiveArch: %{ix86}
13 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{GCC_VERSION}/gcc-%{GCC_VERSION}.tar.bz2
14 # Source0-md5: 39147717455d8dba4d43d1b058ea46e2
15 Patch0: %{name}-noioctl.patch
16 BuildRequires: autoconf
18 BuildRequires: crossmingw32-binutils
19 BuildRequires: crossmingw32-w32api
21 Requires: crossmingw32-binutils
22 Requires: crossmingw32-w32api
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define no_install_post_strip 1
27 %define target i386-mingw32
28 %define target_platform i386-pc-mingw32
29 %define arch %{_prefix}/%{target}
30 %define gccarch %{_prefix}/lib/gcc-lib/%{target}
31 %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
34 crossmingw32 is a complete cross-compiling development system for
35 building stand-alone Microsoft Windows applications under Linux using
36 the Mingw32 build libraries. This includes a binutils, gcc with g++
37 and objc, and libstdc++, all cross targeted to i386-mingw32, along
38 with supporting Win32 libraries in 'coff' format from free sources.
40 This package contains cross targeted gcc.
43 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
44 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
45 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
46 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
49 Ten pakiet zawiera gcc generuj±ce kod dla Win32.
52 Summary: Mingw32 Binary Utility Development Utilities - g++
53 Summary(pl): Zestaw narzêdzi mingw32 - g++
54 Group: Development/Languages
55 Requires: %{name} = %{epoch}:%{version}
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.
64 This package contains cross targeted g++ and (static) libstdc++.
66 %description c++ -l pl
67 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
68 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
69 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
70 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
73 Ten pakiet zawiera g++ generuj±ce kod pod Win32 oraz bibliotekê
76 # does this even work?
78 Summary: Mingw32 Binary Utility Development Utilities - objc
79 Summary(pl): Zestaw narzêdzi mingw32 - objc
80 Group: Development/Languages
81 Requires: %{name} = %{epoch}:%{version}
84 crossmingw32 is a complete cross-compiling development system for
85 building stand-alone Microsoft Windows applications under Linux using
86 the Mingw32 build libraries. This includes a binutils, gcc with g++
87 and objc, and libstdc++, all cross targeted to i386-mingw32, along
88 with supporting Win32 libraries in 'coff' format from free sources.
90 This package contains cross targeted objc.
92 %description objc -l pl
93 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
94 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
95 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
96 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
99 Ten pakiet zawiera kompilator objc generuj±cy kod pod Win32.
101 # does this even work?
103 Summary: Mingw32 Binary Utility Development Utilities - g77
104 Summary(pl): Zestaw narzêdzi mingw32 - g77
105 Group: Development/Languages
106 Requires: %{name} = %{epoch}:%{version}
109 crossmingw32 is a complete cross-compiling development system for
110 building stand-alone Microsoft Windows applications under Linux using
111 the Mingw32 build libraries. This includes a binutils, gcc with g++
112 and objc, and libstdc++, all cross targeted to i386-mingw32, along
113 with supporting Win32 libraries in 'coff' format from free sources.
115 This package contains cross targeted g77.
117 %description g77 -l pl
118 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
119 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
120 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
121 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
124 Ten pakiet zawiera g77 generuj±cy kod pod Win32.
126 # does this even work?
128 Summary: Mingw32 Binary Utility Development Utilities - java
129 Summary(pl): Zestaw narzêdzi mingw32 - java
130 Group: Development/Languages
131 Requires: %{name} = %{epoch}:%{version}
134 crossmingw32 is a complete cross-compiling development system for
135 building stand-alone Microsoft Windows applications under Linux using
136 the Mingw32 build libraries. This includes a binutils, gcc with g++
137 and objc, and libstdc++, all cross targeted to i386-mingw32, along
138 with supporting Win32 libraries in 'coff' format from free sources.
140 This package contains cross targeted java.
142 %description java -l pl
143 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
144 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
145 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
146 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
149 Ten pakiet zawiera kompilator Javy generuj±cy kod pod Win32.
152 %setup -q -n gcc-%{version}
156 rm -rf obj-%{target_platform} && install -d obj-%{target_platform} && cd obj-%{target_platform}
158 CFLAGS="%{rpmcflags}" \
159 CXXFLAGS="%{rpmcflags}" \
160 LDFLAGS="%{rpmldflags}" \
163 --prefix=%{_prefix} \
164 --infodir=%{_infodir} \
165 --mandir=%{_mandir} \
166 --bindir=%{arch}/bin \
167 --enable-languages="c,c++,f77,java,objc" \
170 --with-gxx-include-dir=%{arch}/include/g++ \
174 #touch ../gcc/c-gperf.h
177 LDFLAGS_FOR_TARGET="%{rpmldflags}" \
178 TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE"
180 # build libobjc.dll for Objective C
181 # to trzeba wywo³ywaæ z katalogu obj-%{target_platform}/%{target}/libobjc
182 # ale trzeba podaæ jeszcze GCC_FOR_TARGET - a mi siê nie chce.
183 # BTW, ten dll jest do czego¶ potrzebny???
186 # LDFLAGS="%{rpmldflags}" \
187 # TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
188 # DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll
190 # spec files for msvcrt*.dll configurations
192 for n in msvcrt msvcrt20 msvcrt40; do
193 sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
197 rm -rf $RPM_BUILD_ROOT
199 install -d $RPM_BUILD_ROOT%{_bindir}
200 install -d $RPM_BUILD_ROOT%{_datadir}
201 cd obj-%{target_platform}
204 DESTDIR=$RPM_BUILD_ROOT
207 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
210 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
212 # already in arch/lib, shouldn't be here
213 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
216 # strip linux binaries
217 strip -R .comment -R .note \
218 `echo $RPM_BUILD_ROOT{%{_bindir}/*,%{arch}/bin/*} | grep -v gccbug` \
219 $RPM_BUILD_ROOT%{gcclib}/{cc1*,f771,jc1,jvgenmain}
221 # strip mingw32 libraries
223 $RPM_BUILD_ROOT%{gcclib}/libgcc.a \
224 $RPM_BUILD_ROOT%{arch}/lib/lib*.a
228 ln -f $RPM_BUILD_ROOT%{_bindir}/%{target}-{g++,c++}
229 ln -f $RPM_BUILD_ROOT%{arch}/bin/{g++,c++}
231 # the same... make hardlink
232 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
235 rm -rf $RPM_BUILD_ROOT
238 %defattr(644,root,root,755)
239 %attr(755,root,root) %{_bindir}/%{target}-gcc*
240 %attr(755,root,root) %{_bindir}/%{target}-cpp
241 %attr(755,root,root) %{_bindir}/%{target}-gcov
242 %attr(755,root,root) %{arch}/bin/gcc
243 %{arch}/lib/libiberty.a
247 %attr(755,root,root) %{gcclib}/cc1
252 %{_mandir}/man1/%{target}-gcc.1*
255 %defattr(644,root,root,755)
256 %attr(755,root,root) %{_bindir}/%{target}-[cg]++
257 %attr(755,root,root) %{arch}/bin/[cg]++
258 %attr(755,root,root) %{gcclib}/cc1plus
259 %{arch}/lib/libstdc++.a
260 %{arch}/lib/libstdc++.la
261 %{arch}/lib/libsupc++.a
262 %{arch}/lib/libsupc++.la
264 %{_mandir}/man1/%{target}-g++.1*
267 %defattr(644,root,root,755)
268 %attr(755,root,root) %{gcclib}/cc1obj
269 %{arch}/lib/libobjc.a
270 %{arch}/lib/libobjc.la
273 %defattr(644,root,root,755)
274 %attr(755,root,root) %{_bindir}/%{target}-g77
275 %attr(755,root,root) %{gcclib}/f771
276 %{arch}/lib/libfrtbegin.a
278 %{arch}/lib/libg2c.la
279 %{_mandir}/man1/%{target}-g77.1*
282 %defattr(644,root,root,755)
283 %attr(755,root,root) %{_bindir}/%{target}-gcj
284 %attr(755,root,root) %{_bindir}/%{target}-gcjh
285 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
286 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
287 %attr(755,root,root) %{arch}/bin/grepjar
288 %attr(755,root,root) %{arch}/bin/jar
289 %attr(755,root,root) %{gcclib}/jc1
290 %attr(755,root,root) %{gcclib}/jvgenmain
291 %{_mandir}/man1/%{target}-gcj.1*