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