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