1 %define DASHED_SNAP %{nil}
2 %define SNAP %(echo %{DASHED_SNAP} | sed -e "s#-##g")
3 %define GCC_VERSION 3.2.1
4 %define STDC_VERSION 4.0.0
5 %define OBJC_VERSION 1.0.0
6 %define GCJ_VERSION 3.2
7 Summary: Mingw32 Binary Utility Development Utilities - gcc
8 Summary(pl): Zestaw narzêdzi mingw32 - gcc
10 Version: %{GCC_VERSION}
14 Group: Development/Languages
15 ExclusiveArch: %{ix86}
16 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{GCC_VERSION}/gcc-%{GCC_VERSION}.tar.bz2
17 Patch0: gcc-slibdir.patch
18 BuildRequires: crossmingw32-platform
19 BuildRequires: crossmingw32-binutils
22 BuildRequires: autoconf
23 Requires: crossmingw32-binutils
24 Requires: crossmingw32-platform
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 %define no_install_post_strip 1
28 %define target i386-mingw32
29 %define target_platform i386-pc-mingw32
31 %define arch %{_prefix}/%{target}
32 %define gccarch %{_prefix}/lib/gcc-lib/%{target}
33 %define gcclib %{_prefix}/lib/gcc-lib/%{target}/%{version}
36 crossmingw32 is a complete cross-compiling development system for
37 building stand-alone Microsoft Windows applications under Linux using
38 the Mingw32 build libraries. This includes a binutils, gcc with g++
39 and objc, and libstdc++, all cross targeted to i386-mingw32, along
40 with supporting Win32 libraries in 'coff' format from free sources.
42 This package contains cross targeted gcc.
45 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
46 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
47 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
48 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
51 Ten pakiet zawiera gcc generuj±ce kod dla Win32.
54 Summary: Mingw32 Binary Utility Development Utilities - g++
55 Summary(pl): Zestaw narzêdzi mingw32 - g++
56 Group: Development/Languages
57 Requires: %{name} = %{version}
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 g++ and (static) libstdc++.
68 %description c++ -l pl
69 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
70 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
71 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
72 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
75 Ten pakiet zawiera g++ generuj±ce kod pod Win32 oraz bibliotekê
78 # does this even work?
80 Summary: Mingw32 Binary Utility Development Utilities - objc
81 Summary(pl): Zestaw narzêdzi mingw32 - objc
82 Group: Development/Languages
83 Requires: %{name} = %{version}
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.
92 This package contains cross targeted objc.
94 %description objc -l pl
95 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
96 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
97 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
98 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
101 Ten pakiet zawiera kompilator objc generuj±cy kod pod Win32.
103 # does this even work?
105 Summary: Mingw32 Binary Utility Development Utilities - g77
106 Summary(pl): Zestaw narzêdzi mingw32 - g77
107 Group: Development/Languages
108 Requires: %{name} = %{version}
111 crossmingw32 is a complete cross-compiling development system for
112 building stand-alone Microsoft Windows applications under Linux using
113 the Mingw32 build libraries. This includes a binutils, gcc with g++
114 and objc, and libstdc++, all cross targeted to i386-mingw32, along
115 with supporting Win32 libraries in 'coff' format from free sources.
117 This package contains cross targeted g77.
119 %description g77 -l pl
120 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
121 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
122 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
123 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
126 Ten pakiet zawiera g77 generuj±cy kod pod Win32.
128 # does this even work?
130 Summary: Mingw32 Binary Utility Development Utilities - java
131 Summary(pl): Zestaw narzêdzi mingw32 - java
132 Group: Development/Languages
133 Requires: %{name} = %{version}
136 crossmingw32 is a complete cross-compiling development system for
137 building stand-alone Microsoft Windows applications under Linux using
138 the Mingw32 build libraries. This includes a binutils, gcc with g++
139 and objc, and libstdc++, all cross targeted to i386-mingw32, along
140 with supporting Win32 libraries in 'coff' format from free sources.
142 This package contains cross targeted java.
144 %description java -l pl
145 crossmingw32 jest kompletnym systemem do kroskompilacji, pozwalaj±cym
146 budowaæ aplikacje MS Windows pod Linuksem u¿ywaj±c bibliotek mingw32.
147 System sk³ada siê z binutils, gcc z g++ i objc, libstdc++ - wszystkie
148 generuj±ce kod dla platformy i386-mingw32, oraz z bibliotek w formacie
151 Ten pakiet zawiera kompilator Javy generuj±cy kod pod Win32.
154 %setup -q -n gcc-%{version}
158 rm -rf obj-%{target_platform} && install -d obj-%{target_platform} && cd obj-%{target_platform}
160 CFLAGS="%{rpmcflags}" \
161 CXXFLAGS="%{rpmcflags}" \
162 LDFLAGS="%{rpmldflags}" \
165 --prefix=%{_prefix} \
166 --infodir=%{_infodir} \
167 --mandir=%{_mandir} \
168 --bindir=%{arch}/bin \
169 --enable-languages="c,c++,f77,gcov,java,objc" \
172 --with-gxx-include-dir=%{arch}/include/g++ \
175 # to nie dzia³a bo kto¶ ukrad³ gthr-win32.h i nie wiem co tam wpisaæ
178 #touch ../gcc/c-gperf.h
181 LDFLAGS_FOR_TARGET="%{rpmldflags}" \
182 TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE"
184 # build libobjc.dll for Objective C
185 # to trzeba wywo³ywaæ z katalogu obj-%{target_platform}/%{target}/libobjc
186 # ale trzeba podaæ jeszcze GCC_FOR_TARGET - a mi siê nie chce.
187 # BTW, ten dll jest do czego¶ potrzebny???
190 # LDFLAGS="%{rpmldflags}" \
191 # TARGET_LIBGCC2_CFLAGS="-UCROSS_COMPILE" \
192 # DLLTOOL="%{target}-dlltool --as=%{target}-as" libobjc.dll
194 # spec files for msvcrt*.dll configurations
196 for n in msvcrt msvcrt20 msvcrt40; do
197 sed "s/crtdll/$n/g" <specs | sed "s/crt1/crt2/g" >specs.$n
201 rm -rf $RPM_BUILD_ROOT
203 install -d $RPM_BUILD_ROOT%{_bindir}
204 install -d $RPM_BUILD_ROOT%{_datadir}
205 (cd obj-%{target_platform}
208 prefix=$RPM_BUILD_ROOT%{_prefix} \
209 bindir=$RPM_BUILD_ROOT%{arch}/bin \
210 mandir=$RPM_BUILD_ROOT%{_mandir} \
211 infodir=$RPM_BUILD_ROOT%{_infodir} \
212 gxx_include_dir=$RPM_BUILD_ROOT%{arch}/include/g++
215 install specs.msvcrt specs.msvcrt20 specs.msvcrt40 $RPM_BUILD_ROOT%{gcclib}
218 mv -f $RPM_BUILD_ROOT%{arch}/bin/%{target}-* $RPM_BUILD_ROOT%{_bindir}
220 # c++filt is provided by binutils
221 rm -f $RPM_BUILD_ROOT%{_bindir}/i386-mingw32-c++filt
223 # what is this there for???
224 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
226 # the same... make hardlink
227 ln -f $RPM_BUILD_ROOT%{arch}/bin/gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
229 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}/libgcc.a
232 rm -rf $RPM_BUILD_ROOT
235 %defattr(644,root,root,755)
236 %attr(755,root,root) %{_bindir}/%{target}-gcc*
237 %attr(755,root,root) %{_bindir}/%{target}-cpp
238 %attr(755,root,root) %{_bindir}/%{target}-gcov
241 %attr(755,root,root) %{arch}/bin/gcc
245 %attr(755,root,root) %{gcclib}/cc1
246 %attr(755,root,root) %{gcclib}/cpp0
247 %attr(755,root,root) %{gcclib}/tradcpp0
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 %{_mandir}/man1/%{target}-g++.1*
262 %defattr(644,root,root,755)
263 %attr(755,root,root) %{gcclib}/cc1obj
266 %defattr(644,root,root,755)
267 %attr(755,root,root) %{_bindir}/%{target}-g77
268 %attr(755,root,root) %{gcclib}/f771
269 %{_mandir}/man1/%{target}-g77.1*
272 %defattr(644,root,root,755)
273 %attr(755,root,root) %{_bindir}/%{target}-gcj
274 %attr(755,root,root) %{_bindir}/%{target}-gcjh
275 %attr(755,root,root) %{_bindir}/%{target}-jcf-dump
276 %attr(755,root,root) %{_bindir}/%{target}-jv-scan
277 %attr(755,root,root) %{arch}/bin/grepjar
278 %attr(755,root,root) %{arch}/bin/jar
279 %attr(755,root,root) %{gcclib}/jc1
280 %attr(755,root,root) %{gcclib}/jvgenmain