]>
Commit | Line | Data |
---|---|---|
a3bdc2a1 | 1 | # |
83afd976 | 2 | # TODO: |
83afd976 ŁK |
3 | # - openmp |
4 | # | |
a3bdc2a1 | 5 | # Conditional build: |
8c4c66e6 | 6 | %bcond_with bootstrap # bootstrap build (using binary w32api/mingwrt) |
a3bdc2a1 | 7 | # |
8c4c66e6 JB |
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 | |
b336056d | 14 | Name: crossmingw32-gcc |
d2019fe2 | 15 | Version: 4.6.3 |
b07ce80e | 16 | Release: 1 |
d3f237e2 | 17 | Epoch: 1 |
acb9fe67 | 18 | License: GPL v3+ |
d3f237e2 | 19 | Group: Development/Languages |
dee9b92f | 20 | Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2 |
d2019fe2 | 21 | # Source0-md5: 773092fe5194353b02bb0110052a972e |
b07ce80e JB |
22 | %define apiver 3.17 |
23 | Source1: http://downloads.sourceforge.net/mingw/w32api-%{apiver}-2-mingw32-dev.tar.lzma | |
24 | # Source1-md5: c3a86ffa6b8c21de868df54e4e38f05e | |
d33f98c7 | 25 | %define runver 3.20 |
73ff33c1 | 26 | Source2: http://downloads.sourceforge.net/mingw/mingwrt-%{runver}-mingw32-dev.tar.gz |
d33f98c7 | 27 | # Source2-md5: 2d2f5c8165ff9c29661a5be96336a4f7 |
b07ce80e | 28 | # svn diff -x --ignore-eol-style svn://gcc.gnu.org/svn/gcc/tags/gcc_4_6_1_release svn://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch > gcc-branch.diff |
83afd976 ŁK |
29 | Patch100: gcc-branch.diff |
30 | Patch0: %{name}-buildsystem1.patch | |
31 | Patch1: %{name}-buildsystem2.patch | |
32 | Patch2: %{name}-lfs.patch | |
d12aabe0 | 33 | BuildRequires: autoconf |
59d75dd2 | 34 | BuildRequires: automake |
d12aabe0 | 35 | BuildRequires: bison |
43a95438 | 36 | BuildRequires: crossmingw32-binutils >= 2.15.91.0.2-2 |
b336056d | 37 | BuildRequires: flex |
83afd976 | 38 | BuildRequires: libmpc-devel |
5b936a1d | 39 | %if %{without bootstrap} |
43a95438 JK |
40 | BuildRequires: crossmingw32-runtime >= 3.5 |
41 | BuildRequires: crossmingw32-w32api >= 3.1 | |
b399bc1a | 42 | %endif |
f24c8266 | 43 | BuildRequires: mpfr-devel |
207a380a | 44 | BuildRequires: perl-tools-pod |
d81c803d | 45 | BuildRequires: texinfo >= 4.2 |
73ff33c1 JB |
46 | %if %{with booststrap} |
47 | BuildRequires: tar >= 1:1.22 | |
48 | BuildRequires: xz | |
49 | %endif | |
43a95438 | 50 | Requires: crossmingw32-binutils >= 2.15.91.0.2-2 |
6ab368b0 | 51 | Requires: gcc-dirs |
b336056d JB |
52 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
53 | ||
d3f237e2 | 54 | %define target i386-mingw32 |
8f1d5c0c JB |
55 | %define sysprefix /usr |
56 | %define arch %{sysprefix}/%{target} | |
73ff33c1 JB |
57 | %define gccarchdir %{_libdir}/gcc/%{target} |
58 | %define gcclibdir %{gccarchdir}/%{version} | |
59 | %define _dlldir /usr/share/wine/windows/system | |
dee9b92f | 60 | |
5b936a1d | 61 | %define _noautostrip .*/lib.*\\.a |
b336056d | 62 | |
66f480ce JP |
63 | %define _enable_debug_packages 0 |
64 | ||
b336056d JB |
65 | %description |
66 | crossmingw32 is a complete cross-compiling development system for | |
67 | building stand-alone Microsoft Windows applications under Linux using | |
8c4c66e6 | 68 | the MinGW32 build libraries. This includes a binutils, gcc with g++ |
b336056d JB |
69 | and objc, and libstdc++, all cross targeted to i386-mingw32, along |
70 | with supporting Win32 libraries in 'coff' format from free sources. | |
71 | ||
d3f237e2 | 72 | This package contains cross targeted gcc. |
b336056d | 73 | |
4a6c89d0 | 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. | |
9dd4c848 | 77 | |
4a6c89d0 | 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 | |
8c4c66e6 | 81 | bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc, |
4a6c89d0 | 82 | libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz |
2e5b9011 | 83 | z bibliotek w formacie COFF. |
d790a8ba | 84 | |
4a6c89d0 | 85 | Ten pakiet zawiera gcc generujące skrośnie kod dla Win32. |
d790a8ba | 86 | |
73ff33c1 JB |
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 | ||
d3f237e2 | 99 | %package c++ |
8c4c66e6 JB |
100 | Summary: MinGW32 binary utility development utilities - g++ |
101 | Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - g++ | |
d3f237e2 | 102 | Group: Development/Languages |
cae974d4 | 103 | Requires: %{name} = %{epoch}:%{version}-%{release} |
b336056d | 104 | |
d3f237e2 JB |
105 | %description c++ |
106 | crossmingw32 is a complete cross-compiling development system for | |
107 | building stand-alone Microsoft Windows applications under Linux using | |
8c4c66e6 | 108 | the MinGW32 build libraries. This includes a binutils, gcc with g++ |
d3f237e2 JB |
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 | ||
4a6c89d0 | 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 | |
8c4c66e6 | 117 | bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc, |
4a6c89d0 | 118 | libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz |
2e5b9011 | 119 | z bibliotek w formacie COFF. |
d790a8ba | 120 | |
4a6c89d0 | 121 | Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę |
d790a8ba JB |
122 | libstdc++. |
123 | ||
73ff33c1 JB |
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 | ||
d3f237e2 | 149 | %package objc |
8c4c66e6 JB |
150 | Summary: MinGW32 binary utility development utilities - objc |
151 | Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - objc | |
d3f237e2 | 152 | Group: Development/Languages |
cae974d4 | 153 | Requires: %{name} = %{epoch}:%{version}-%{release} |
d3f237e2 JB |
154 | |
155 | %description objc | |
156 | crossmingw32 is a complete cross-compiling development system for | |
157 | building stand-alone Microsoft Windows applications under Linux using | |
8c4c66e6 | 158 | the MinGW32 build libraries. This includes a binutils, gcc with g++ |
d3f237e2 JB |
159 | and objc, and libstdc++, all cross targeted to i386-mingw32, along |
160 | with supporting Win32 libraries in 'coff' format from free sources. | |
161 | ||
37948e2b | 162 | This package contains cross targeted objc compiler. |
d3f237e2 | 163 | |
4a6c89d0 | 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 | |
8c4c66e6 | 167 | bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc, |
4a6c89d0 | 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 objc generujący kod pod Win32. |
d790a8ba | 172 | |
8f1d5c0c JB |
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 | ||
52a544a1 | 198 | %package fortran |
8c4c66e6 JB |
199 | Summary: MinGW32 binary utility development utilities - Fortran |
200 | Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - Fortran | |
d3f237e2 | 201 | Group: Development/Languages |
cae974d4 | 202 | Requires: %{name} = %{epoch}:%{version}-%{release} |
b07ce80e | 203 | Requires: crossmingw32-libquadmath-devel = %{epoch}:%{version}-%{release} |
37948e2b | 204 | Obsoletes: crossmingw32-gcc-g77 |
d3f237e2 | 205 | |
52a544a1 | 206 | %description fortran |
d3f237e2 JB |
207 | crossmingw32 is a complete cross-compiling development system for |
208 | building stand-alone Microsoft Windows applications under Linux using | |
8c4c66e6 | 209 | the MinGW32 build libraries. This includes a binutils, gcc with g++ |
d3f237e2 JB |
210 | and objc, and libstdc++, all cross targeted to i386-mingw32, along |
211 | with supporting Win32 libraries in 'coff' format from free sources. | |
212 | ||
37948e2b | 213 | This package contains cross targeted Fortran compiler. |
d3f237e2 | 214 | |
4a6c89d0 | 215 | %description fortran -l pl.UTF-8 |
216 | crossmingw32 jest kompletnym systemem do kompilacji skrośnej, | |
217 | pozwalającym budować aplikacje MS Windows pod Linuksem używając | |
8c4c66e6 | 218 | bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc, |
4a6c89d0 | 219 | libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz |
2e5b9011 | 220 | z bibliotek w formacie COFF. |
d790a8ba | 221 | |
4a6c89d0 | 222 | Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32. |
d790a8ba | 223 | |
0d9cd0a8 JB |
224 | %package -n crossmingw32-libgfortran-static |
225 | Summary: Static Fortran library - cross MinGW32 version | |
226 | Summary(pl.UTF-8): Statyczna biblioteka Fortrana - wersja skrośna MinGW32 | |
227 | Group: Development/Libraries | |
228 | Requires: %{name}-fortran = %{epoch}:%{version}-%{release} | |
229 | ||
230 | %description -n crossmingw32-libgfortran-static | |
231 | Static Fortran library - cross MinGW32 version. | |
232 | ||
233 | %description -n crossmingw32-libgfortran-static -l pl.UTF-8 | |
234 | Statyczna biblioteka Fortrana - wersja skrośna MinGW32. | |
235 | ||
236 | %package -n crossmingw32-libgfortran-dll | |
237 | Summary: libgfortran DLL library for Windows | |
238 | Summary(pl.UTF-8): Biblioteka DLL libgfortran dla Windows | |
239 | Group: Applications/Emulators | |
b07ce80e | 240 | Requires: crossmingw32-libquadmath-dll |
0d9cd0a8 JB |
241 | |
242 | %description -n crossmingw32-libgfortran-dll | |
243 | libgfortran DLL library for Windows. | |
244 | ||
245 | %description -n crossmingw32-libgfortran-dll -l pl.UTF-8 | |
246 | Biblioteka DLL libgfortran dla Windows. | |
247 | ||
b07ce80e JB |
248 | %package -n crossmingw32-libquadmath |
249 | Summary: GCC __float128 support library - cross MinGW32 version | |
250 | Summary(pl.UTF-8): Biblioteka do obsługi typu __float128 - wersja skrośna MinGW32 | |
251 | License: GPL v2+ with linking exception | |
252 | Group: Development/Libraries | |
253 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
254 | ||
255 | %description -n crossmingw32-libquadmath | |
256 | This package contains cross MinGW32 version of GCC support library | |
257 | which is needed for __float128 math support and for Fortran REAL*16 | |
258 | support. | |
259 | ||
260 | %description -n crossmingw32-libquadmath -l pl.UTF-8 | |
261 | Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GCC do obsługi | |
262 | operacji matematycznych na zmiennych typu __float128 oraz typu REAL*16 | |
263 | w Fortranie. | |
264 | ||
265 | %package -n crossmingw32-libquadmath-static | |
266 | Summary: Static GCC __float128 support library - cross MinGW32 version | |
267 | Summary(pl.UTF-8): Biblioteka statyczna GCC do obsługi typu __float128 - wersja skrośna MinGW32 | |
268 | License: GPL v2+ with linking exception | |
269 | Group: Development/Libraries | |
270 | Requires: crossmingw32-libquadmath = %{epoch}:%{version}-%{release} | |
271 | ||
272 | %description -n crossmingw32-libquadmath-static | |
273 | Static GCC __float128 support library - cross MinGW32 version. | |
274 | ||
275 | %description -n crossmingw32-libquadmath-static -l pl.UTF-8 | |
276 | Biblioteka statyczna GCC do obsługi typu __float128 - wersja skrośna | |
277 | MinGW32. | |
278 | ||
279 | %package -n crossmingw32-libquadmath-dll | |
280 | Summary: DLL GCC __float128 support library for Windows | |
281 | Summary(pl.UTF-8): Biblioteka DLL GCC do obsługi typu __float128 dla Windows | |
282 | License: GPL v2+ with linking exception | |
283 | Group: Applications/Emulators | |
284 | Requires: wine | |
285 | ||
286 | %description -n crossmingw32-libquadmath-dll | |
287 | DLL GCC __float128 support library for Windows. | |
288 | ||
289 | %description -n crossmingw32-libquadmath-dll -l pl.UTF-8 | |
290 | Biblioteka DLL GCC do obsługi typu __float128 dla Windows. | |
291 | ||
d3f237e2 | 292 | %package java |
8c4c66e6 JB |
293 | Summary: MinGW32 binary utility development utilities - Java |
294 | Summary(pl.UTF-8): Zestaw narzędzi MinGW32 - Java | |
d3f237e2 | 295 | Group: Development/Languages |
cae974d4 | 296 | Requires: %{name} = %{epoch}:%{version}-%{release} |
d3f237e2 JB |
297 | |
298 | %description java | |
299 | crossmingw32 is a complete cross-compiling development system for | |
300 | building stand-alone Microsoft Windows applications under Linux using | |
8c4c66e6 | 301 | the MinGW32 build libraries. This includes a binutils, gcc with g++ |
d3f237e2 JB |
302 | and objc, and libstdc++, all cross targeted to i386-mingw32, along |
303 | with supporting Win32 libraries in 'coff' format from free sources. | |
304 | ||
37948e2b | 305 | This package contains cross targeted Java compiler. |
d3f237e2 | 306 | |
4a6c89d0 | 307 | %description java -l pl.UTF-8 |
4a6c89d0 | 308 | crossmingw32 jest kompletnym systemem do kompilacji skrośnej, |
309 | pozwalającym budować aplikacje MS Windows pod Linuksem używając | |
8c4c66e6 | 310 | bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc, |
4a6c89d0 | 311 | libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz |
2e5b9011 | 312 | z bibliotek w formacie COFF. |
d790a8ba | 313 | |
4a6c89d0 | 314 | Ten pakiet zawiera kompilator Javy generujący kod pod Win32. |
d790a8ba | 315 | |
d3f237e2 | 316 | %prep |
dee9b92f | 317 | %setup -q -n gcc-%{version} |
83afd976 ŁK |
318 | %patch100 -p0 |
319 | %patch0 -p1 | |
320 | %patch2 -p1 | |
321 | ||
b399bc1a | 322 | %if %{with bootstrap} |
73ff33c1 JB |
323 | # note: "winsup" dirs below are special, handled by gcc's configure |
324 | install -d winsup/{mingw,w32api} | |
325 | tar xf %{SOURCE1} -C winsup/w32api | |
326 | tar xf %{SOURCE2} -C winsup/mingw | |
b399bc1a | 327 | %endif |
83afd976 ŁK |
328 | |
329 | # override snapshot version. | |
330 | echo %{version} > gcc/BASE-VER | |
331 | echo "release" > gcc/DEV-PHASE | |
b336056d JB |
332 | |
333 | %build | |
73ff33c1 | 334 | rm -rf builddir && install -d builddir && cd builddir |
b399bc1a | 335 | %if %{with bootstrap} |
73ff33c1 | 336 | install -d %{target}/winsup |
73ff33c1 JB |
337 | ln -sf ../../../winsup/mingw/lib %{target}/winsup/mingw |
338 | ln -sf ../../../winsup/w32api %{target}/winsup/w32api | |
339 | WINSUPDIR=$(cd ..; pwd)/winsup | |
b399bc1a AF |
340 | %endif |
341 | ||
83afd976 | 342 | CC="%{__cc}" \ |
b4c37c30 | 343 | CFLAGS="%{rpmcflags}" \ |
83afd976 | 344 | CXXFLAGS="%{rpmcxxflags}" \ |
b4c37c30 | 345 | TEXCONFIG=false \ |
b336056d | 346 | ../configure \ |
8f1d5c0c JB |
347 | --prefix=%{sysprefix} \ |
348 | --bindir=%{arch}/bin \ | |
73ff33c1 | 349 | --libdir=%{_libdir} \ |
8f1d5c0c | 350 | --includedir=%{arch}/include \ |
73ff33c1 | 351 | --libexecdir=%{_libdir} \ |
b336056d JB |
352 | --infodir=%{_infodir} \ |
353 | --mandir=%{_mandir} \ | |
73ff33c1 JB |
354 | %{!?with_bootstrap:--with-headers=%{arch}/include} \ |
355 | --with-libs=%{!?with_bootstrap:%{arch}/lib}%{?with_bootstrap:${WINSUPDIR}/mingw/lib} \ | |
83afd976 ŁK |
356 | --with-build-time-tools=%{arch}/bin \ |
357 | --with-dwarf2 \ | |
358 | --with-gnu-as \ | |
359 | --with-gnu-ld \ | |
360 | --with-mangler-in-ld \ | |
361 | --with-long-double-128 \ | |
0dcd3a97 | 362 | --enable-threads \ |
0d9cd0a8 | 363 | --enable-languages="c,c++,fortran,java,objc" \ |
0dcd3a97 PS |
364 | --enable-c99 \ |
365 | --enable-long-long \ | |
83afd976 ŁK |
366 | --enable-fully-dynamic-string \ |
367 | --enable-libstdcxx-allocator=new \ | |
368 | --enable-version-specific-runtime-libs \ | |
369 | --enable-shared \ | |
0dcd3a97 | 370 | --disable-nls \ |
83afd976 ŁK |
371 | --disable-symvers \ |
372 | --disable-sjlj-exceptions \ | |
373 | --disable-win32-registry \ | |
374 | --disable-multilib \ | |
375 | --disable-libssp \ | |
b336056d JB |
376 | --target=%{target} |
377 | ||
83afd976 ŁK |
378 | cd .. |
379 | %{__make} -C builddir all-host | |
380 | patch -p1 <%{PATCH1} | |
381 | %{__make} -C builddir | |
b336056d JB |
382 | |
383 | %install | |
b336056d | 384 | rm -rf $RPM_BUILD_ROOT |
73ff33c1 | 385 | install -d $RPM_BUILD_ROOT%{_bindir} |
b336056d | 386 | |
83afd976 | 387 | %{__make} -C builddir install \ |
d12aabe0 | 388 | DESTDIR=$RPM_BUILD_ROOT |
b336056d | 389 | |
73ff33c1 JB |
390 | # host (ELF) library |
391 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libiberty.a | |
392 | ||
73ff33c1 JB |
393 | mv $RPM_BUILD_ROOT%{gcclibdir}/include-fixed/{limits,syslimits}.h $RPM_BUILD_ROOT%{gcclibdir}/include |
394 | %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/include-fixed | |
395 | %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/install-tools | |
d12aabe0 | 396 | |
82f2d40f JB |
397 | # these must be symlinks: gcclibdir is calculated relatively to real binary path |
398 | ln -sf %{arch}/bin/%{target}-gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc | |
399 | ln -sf %{arch}/bin/%{target}-g++ $RPM_BUILD_ROOT%{_bindir}/%{target}-g++ | |
400 | ln -sf %{arch}/bin/%{target}-cpp $RPM_BUILD_ROOT%{_bindir}/%{target}-cpp | |
401 | ln -sf %{arch}/bin/%{target}-gcov $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov | |
402 | ln -sf %{arch}/bin/%{target}-gcj $RPM_BUILD_ROOT%{_bindir}/%{target}-gcj | |
403 | ln -sf %{arch}/bin/%{target}-jcf-dump $RPM_BUILD_ROOT%{_bindir}/%{target}-jcf-dump | |
404 | ln -sf %{arch}/bin/%{target}-gfortran $RPM_BUILD_ROOT%{_bindir}/%{target}-gfortran | |
83afd976 | 405 | |
73ff33c1 JB |
406 | # DLLs |
407 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
b07ce80e JB |
408 | mv -f $RPM_BUILD_ROOT%{gccarchdir}/*.dll $RPM_BUILD_ROOT%{_dlldir} |
409 | mv -f $RPM_BUILD_ROOT%{gcclibdir}/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
8f1d5c0c JB |
410 | if [ ! -f $RPM_BUILD_ROOT%{_dlldir}/libgcc_s_dw2-1.dll ]; then |
411 | echo "libgcc DLL not installed?" | |
412 | install builddir/i386-mingw32/libgcc/shlib/libgcc_s_dw2-1.dll $RPM_BUILD_ROOT%{_dlldir} | |
413 | fi | |
d12aabe0 | 414 | |
73ff33c1 JB |
415 | %if 0%{!?debug:1} |
416 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
d33f98c7 | 417 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{gcclibdir}/lib*.a |
73ff33c1 | 418 | %endif |
83afd976 | 419 | |
b07ce80e JB |
420 | # for pretty-printers see native gcc |
421 | %{__rm} $RPM_BUILD_ROOT%{gcclibdir}/libstdc++.dll.a-gdb.py | |
422 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libstdcxx | |
4b27d406 JB |
423 | # no plugin development for mingw32 (at least for now) |
424 | %{__rm} $RPM_BUILD_ROOT%{gcclibdir}/liblto_plugin.la | |
b07ce80e | 425 | %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/plugin |
73ff33c1 JB |
426 | # already in native gcc |
427 | %{__rm} -r $RPM_BUILD_ROOT%{_infodir} | |
428 | # common FSF man pages | |
429 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man7/{fsf-funding,gfdl,gpl}.7 | |
7f7a2048 JB |
430 | # programs not packaged |
431 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/%{target}-{aot-compile,gc-analyze,gcj-dbtool,gij,grmic,jv-convert,rebuild-gcj-db}.1 | |
8c4c66e6 | 432 | |
b336056d | 433 | %clean |
b336056d JB |
434 | rm -rf $RPM_BUILD_ROOT |
435 | ||
436 | %files | |
437 | %defattr(644,root,root,755) | |
83afd976 | 438 | %attr(755,root,root) %{_bindir}/%{target}-gcc |
b4c37c30 | 439 | %attr(755,root,root) %{_bindir}/%{target}-cpp |
440 | %attr(755,root,root) %{_bindir}/%{target}-gcov | |
73ff33c1 JB |
441 | %attr(755,root,root) %{arch}/bin/%{target}-gcc |
442 | %attr(755,root,root) %{arch}/bin/%{target}-gcc-%{version} | |
83afd976 ŁK |
443 | %attr(755,root,root) %{arch}/bin/%{target}-cpp |
444 | %attr(755,root,root) %{arch}/bin/%{target}-gcov | |
8f1d5c0c | 445 | %attr(755,root,root) %{arch}/bin/gcc |
73ff33c1 JB |
446 | %dir %{gccarchdir} |
447 | %dir %{gcclibdir} | |
448 | %attr(755,root,root) %{gcclibdir}/cc1 | |
449 | %attr(755,root,root) %{gcclibdir}/collect2 | |
450 | %attr(755,root,root) %{gcclibdir}/lto-wrapper | |
4b27d406 JB |
451 | %attr(755,root,root) %{gcclibdir}/lto1 |
452 | %attr(755,root,root) %{gcclibdir}/liblto_plugin.so* | |
73ff33c1 JB |
453 | %{gcclibdir}/libgcc.a |
454 | %{gcclibdir}/libgcc_eh.a | |
455 | %{gcclibdir}/libgcc_s.a | |
456 | %{gcclibdir}/libgcov.a | |
00383376 AF |
457 | %{gcclibdir}/crtbegin.o |
458 | %{gcclibdir}/crtend.o | |
459 | %{gcclibdir}/crtfastmath.o | |
73ff33c1 JB |
460 | %dir %{gcclibdir}/include |
461 | %{gcclibdir}/include/*.h | |
539d7886 | 462 | %{_mandir}/man1/%{target}-cpp.1* |
d3f237e2 | 463 | %{_mandir}/man1/%{target}-gcc.1* |
539d7886 | 464 | %{_mandir}/man1/%{target}-gcov.1* |
d3f237e2 | 465 | |
73ff33c1 JB |
466 | %files -n crossmingw32-libgcc-dll |
467 | %defattr(644,root,root,755) | |
468 | %{_dlldir}/libgcc_s_dw2-1.dll | |
469 | ||
d3f237e2 JB |
470 | %files c++ |
471 | %defattr(644,root,root,755) | |
83afd976 ŁK |
472 | %attr(755,root,root) %{_bindir}/%{target}-g++ |
473 | %attr(755,root,root) %{arch}/bin/%{target}-c++ | |
474 | %attr(755,root,root) %{arch}/bin/%{target}-g++ | |
8f1d5c0c JB |
475 | %attr(755,root,root) %{arch}/bin/c++ |
476 | %attr(755,root,root) %{arch}/bin/g++ | |
73ff33c1 JB |
477 | %attr(755,root,root) %{gcclibdir}/cc1plus |
478 | %{gcclibdir}/libstdc++.dll.a | |
479 | %{gcclibdir}/libstdc++.la | |
480 | %{gcclibdir}/libsupc++.la | |
481 | %{gcclibdir}/libsupc++.a | |
73ff33c1 | 482 | %{gcclibdir}/include/c++ |
d3f237e2 JB |
483 | %{_mandir}/man1/%{target}-g++.1* |
484 | ||
73ff33c1 JB |
485 | %files -n crossmingw32-libstdc++-static |
486 | %defattr(644,root,root,755) | |
487 | %{gcclibdir}/libstdc++.a | |
488 | ||
489 | %files -n crossmingw32-libstdc++-dll | |
490 | %defattr(644,root,root,755) | |
491 | %{_dlldir}/libstdc++-6.dll | |
492 | ||
d3f237e2 JB |
493 | %files objc |
494 | %defattr(644,root,root,755) | |
8f1d5c0c JB |
495 | %attr(755,root,root) %{gcclibdir}/cc1obj |
496 | %{gcclibdir}/libobjc.dll.a | |
497 | %{gcclibdir}/libobjc.la | |
498 | %{gcclibdir}/include/objc | |
d3f237e2 | 499 | |
8f1d5c0c JB |
500 | %files -n crossmingw32-libobjc-static |
501 | %defattr(644,root,root,755) | |
502 | %{gcclibdir}/libobjc.a | |
503 | ||
504 | %files -n crossmingw32-libobjc-dll | |
505 | %defattr(644,root,root,755) | |
b07ce80e | 506 | %{_dlldir}/libobjc-3.dll |
8f1d5c0c | 507 | |
52a544a1 | 508 | %files fortran |
d3f237e2 | 509 | %defattr(644,root,root,755) |
52a544a1 | 510 | %attr(755,root,root) %{_bindir}/%{target}-gfortran |
0d9cd0a8 | 511 | %attr(755,root,root) %{arch}/bin/%{target}-gfortran |
52a544a1 | 512 | %attr(755,root,root) %{arch}/bin/gfortran |
7f7a2048 | 513 | %attr(755,root,root) %{gcclibdir}/f951 |
0d9cd0a8 JB |
514 | %{gcclibdir}/finclude |
515 | %{gcclibdir}/libgfortran.dll.a | |
516 | %{gcclibdir}/libgfortran.la | |
b07ce80e | 517 | %{gcclibdir}/libgfortran.spec |
0d9cd0a8 JB |
518 | %{gcclibdir}/libgfortranbegin.a |
519 | %{gcclibdir}/libgfortranbegin.la | |
52a544a1 | 520 | %{_mandir}/man1/%{target}-gfortran.1* |
0d9cd0a8 JB |
521 | |
522 | %files -n crossmingw32-libgfortran-static | |
523 | %defattr(644,root,root,755) | |
524 | %{gcclibdir}/libgfortran.a | |
525 | ||
526 | %files -n crossmingw32-libgfortran-dll | |
527 | %defattr(644,root,root,755) | |
528 | %{_dlldir}/libgfortran-3.dll | |
d3f237e2 | 529 | |
b07ce80e JB |
530 | %files -n crossmingw32-libquadmath |
531 | %defattr(644,root,root,755) | |
532 | %{gcclibdir}/libquadmath.dll.a | |
533 | %{gcclibdir}/libquadmath.la | |
534 | ||
535 | %files -n crossmingw32-libquadmath-static | |
536 | %defattr(644,root,root,755) | |
537 | %{gcclibdir}/libquadmath.a | |
538 | ||
539 | %files -n crossmingw32-libquadmath-dll | |
540 | %defattr(644,root,root,755) | |
541 | %{_dlldir}/libquadmath-0.dll | |
542 | ||
d3f237e2 JB |
543 | %files java |
544 | %defattr(644,root,root,755) | |
545 | %attr(755,root,root) %{_bindir}/%{target}-gcj | |
7fc2a2bb | 546 | %attr(755,root,root) %{_bindir}/%{target}-jcf-dump |
7f7a2048 JB |
547 | %attr(755,root,root) %{arch}/bin/%{target}-gcj |
548 | %attr(755,root,root) %{arch}/bin/%{target}-jcf-dump | |
549 | %attr(755,root,root) %{gcclibdir}/jc1 | |
550 | %attr(755,root,root) %{gcclibdir}/jvgenmain | |
d12aabe0 | 551 | %{_mandir}/man1/%{target}-gcj.1* |
539d7886 | 552 | %{_mandir}/man1/%{target}-jcf-dump.1* |