]> git.pld-linux.org Git - packages/crossmingw32-gcc.git/blob - crossmingw32-gcc.spec
- added pthreads-w32, use POSIX threading model for std::thread/std::mutex support
[packages/crossmingw32-gcc.git] / crossmingw32-gcc.spec
1 #
2 # Conditional build:
3 %bcond_with     bootstrap       # bootstrap build (using binary w32api/mingwrt, only C/C++, no gomp)
4 %bcond_without  pthreads        # POSIX threads support (needed for GOMP and C++ 11 thread/mutex support)
5 %bcond_without  gomp            # OpenMP libraries
6 #
7 %if %{with bootstrap}
8 %undefine       with_pthreads
9 %endif
10 %if %{without pthreads}
11 %undefine       with_gomp
12 %endif
13 Summary:        Cross MinGW32 GNU binary utility development utilities - gcc
14 Summary(es.UTF-8):      Utilitarios para desarrollo de binarios de la GNU - MinGW32 gcc
15 Summary(fr.UTF-8):      Utilitaires de développement binaire de GNU - MinGW32 gcc
16 Summary(pl.UTF-8):      Skrośne narzędzia programistyczne GNU dla MinGW32 - gcc
17 Summary(pt_BR.UTF-8):   Utilitários para desenvolvimento de binários da GNU - MinGW32 gcc
18 Summary(tr.UTF-8):      GNU geliştirme araçları - MinGW32 gcc
19 Name:           crossmingw32-gcc
20 Version:        9.5.0
21 Release:        1
22 Epoch:          1
23 License:        GPL v3+
24 Group:          Development/Languages
25 Source0:        https://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.xz
26 # Source0-md5:  34cd76facb562835ff5faca81fead17e
27 %define         w32api_ver      5.4.2
28 #Source1Download: https://osdn.net/projects/mingw/releases/
29 Source1:        https://osdn.net/projects/mingw/downloads/74926/w32api-%{w32api_ver}-mingw32-dev.tar.xz
30 # Source1-md5:  88b0dc6185079e60d83bdbaec92028b8
31 %define         mingw32_ver     5.4.2
32 #Source2Download: https://osdn.net/projects/mingw/releases/
33 Source2:        https://osdn.net/projects/mingw/downloads/74925/mingwrt-%{mingw32_ver}-mingw32-dev.tar.xz
34 # Source2-md5:  d8dceb05b85602eec82eac4e11d5c027
35 Source3:        gcc-optimize-la.pl
36 #Patch100:      gcc-branch.diff
37 Patch0:         %{name}-buildsystem1.patch
38 Patch1:         %{name}-buildsystem2.patch
39 Patch2:         %{name}-lfs.patch
40 Patch3:         gcc-mingw32.patch
41 Patch4:         gcc-build-libvtv.patch
42 Patch5:         gcc-pthreads-w32.patch
43 URL:            http://gcc.gnu.org/
44 BuildRequires:  autoconf >= 2.64
45 BuildRequires:  automake >= 1:1.11.1
46 BuildRequires:  bison
47 BuildRequires:  crossmingw32-binutils >= 2.23
48 %{?with_pthreads:BuildRequires: crossmingw32-pthreads-w32}
49 %if %{without bootstrap}
50 BuildRequires:  crossmingw32-runtime >= 3.5
51 BuildRequires:  crossmingw32-w32api >= 3.1
52 %endif
53 BuildRequires:  flex >= 2.5.4
54 BuildRequires:  gettext-tools >= 0.14.5
55 BuildRequires:  gmp-devel >= 4.3.2
56 BuildRequires:  isl-devel >= 0.15
57 BuildRequires:  libmpc-devel >= 0.8.1
58 BuildRequires:  libstdc++-devel
59 BuildRequires:  mpfr-devel >= 2.4.2
60 BuildRequires:  perl-tools-pod
61 BuildRequires:  tar >= 1:1.22
62 BuildRequires:  texinfo >= 4.7
63 BuildRequires:  xz
64 BuildRequires:  zlib-devel
65 BuildConflicts: pdksh < 5.2.14-50
66 Requires:       crossmingw32-binutils >= 2.23
67 Requires:       gcc-dirs
68 Requires:       gmp >= 4.3.2
69 Requires:       isl >= 0.15
70 Requires:       libmpc >= 0.8.1
71 Requires:       mpfr >= 2.4.2
72 # java support dropped from gcc 7+
73 Obsoletes:      crossmingw32-java < 1:7
74 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
75
76 %define         target          i386-mingw32
77 %define         sysprefix       /usr
78 %define         archprefix      %{sysprefix}/%{target}
79 %define         archbindir      %{archprefix}/bin
80 %define         archincludedir  %{archprefix}/include
81 %define         archlibdir      %{archprefix}/lib
82 %define         gccarchdir      %{_libdir}/gcc/%{target}
83 %define         gcclibdir       %{gccarchdir}/%{version}
84 %define         _dlldir         /usr/share/wine/windows/system
85
86 %define         _noautostrip    .*/lib.*\\.a
87
88 %define         _enable_debug_packages 0
89
90 # functions with printf format attribute but with special parser and also
91 # receiving non constant format strings
92 %define         Werror_cflags   %{nil}
93 %define         _ssp_cflags     %{nil}
94 # -fPIC is not valid for target platform
95 %define         filterout_c     -fPIC
96
97 %description
98 crossmingw32 is a complete cross-compiling development system for
99 building stand-alone Microsoft Windows applications under Linux using
100 the MinGW32 build libraries. This includes a binutils, gcc with g++
101 and objc, and libstdc++, all cross targeted to i386-mingw32, along
102 with supporting Win32 libraries in 'coff' format from free sources.
103
104 This package contains cross targeted gcc.
105
106 %description -l de.UTF-8
107 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
108 anderem Rechner Code für Win32 zu generieren.
109
110 %description -l pl.UTF-8
111 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
112 pozwalającym budować aplikacje MS Windows pod Linuksem używając
113 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
114 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
115 z bibliotek w formacie COFF.
116
117 Ten pakiet zawiera gcc generujące skrośnie kod dla Win32.
118
119 %package -n crossmingw32-libgcc-dll
120 Summary:        libgcc DLL library for Windows
121 Summary(pl.UTF-8):      Biblioteka DLL libgcc dla Windows
122 Group:          Applications/Emulators
123 Requires:       wine
124
125 %description -n crossmingw32-libgcc-dll
126 libgcc DLL library for Windows.
127
128 %description -n crossmingw32-libgcc-dll -l pl.UTF-8
129 Biblioteka DLL libgcc dla Windows.
130
131 %package -n crossmingw32-libatomic
132 Summary:        The GNU Atomic library - cross MinGW32 version
133 Summary(pl.UTF-8):      Biblioteka GNU Atomic - wersja skrośna MinGW32
134 License:        GPL v3+ with GCC Runtime Library Exception v3.1
135 Group:          Development/Libraries
136 Requires:       %{name} = %{epoch}:%{version}-%{release}
137
138 %description -n crossmingw32-libatomic
139 This package contains cross MinGW32 version of the GNU Atomic library
140 which is a GCC support library for atomic operations not supported by
141 hardware.
142
143 %description -n crossmingw32-libatomic -l pl.UTF-8
144 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GNU Atomic,
145 będącej biblioteką GCC, wspierającej operacje atomowe na sprzęcie ich
146 nie obsługującym.
147
148 %package -n crossmingw32-libatomic-static
149 Summary:        The GNU Atomic static library - cross MinGW32 version
150 Summary(pl.UTF-8):      Statyczna biblioteka GNU Atomic - wersja skrośna MinGW32
151 License:        GPL v3+ with GCC Runtime Library Exception v3.1
152 Group:          Development/Libraries
153 Requires:       crossmingw32-libatomic = %{epoch}:%{version}-%{release}
154
155 %description -n crossmingw32-libatomic-static
156 The GNU Atomic static library - cross MinGW32 version.
157
158 %description -n crossmingw32-libatomic-static -l pl.UTF-8
159 Statyczna biblioteka GNU Atomic - wersja skrośna MinGW32.
160
161 %package -n crossmingw32-libatomic-dll
162 Summary:        DLL GNU Atomic library for Windows
163 Summary(pl.UTF-8):      Biblioteka DLL GNU Atomic dla Windows
164 License:        GPL v3+ with GCC Runtime Library Exception v3.1
165 Group:          Applications/Emulators
166 Requires:       wine
167
168 %description -n crossmingw32-libatomic-dll
169 DLL GNU Atomic library for Windows.
170
171 %description -n crossmingw32-libatomic-dll -l pl.UTF-8
172 Biblioteka DLL GNU Atomic dla Windows.
173
174 %package -n crossmingw32-libgomp
175 Summary:        GNU OpenMP library - cross MinGW32 version
176 Summary(pl.UTF-8):      Biblioteka GNU OpenMP - wersja skrośna MinGW32
177 License:        GPL v3+ with GCC Runtime Library Exception v3.1
178 Group:          Development/Libraries
179 Requires:       %{name} = %{epoch}:%{version}-%{release}
180
181 %description -n crossmingw32-libgomp
182 This package contains cross MinGW32 version of GNU OpenMP library.
183
184 %description -n crossmingw32-libgomp -l pl.UTF-8
185 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GNU OpenMP.
186
187 %package -n crossmingw32-libgomp-static
188 Summary:        Static GNU OpenMP library - cross MinGW32 version
189 Summary(pl.UTF-8):      Statyczna biblioteka GNU OpenMP - wersja skrośna MinGW32
190 License:        GPL v3+ with GCC Runtime Library Exception v3.1
191 Group:          Development/Libraries
192 Requires:       crossmingw32-libgomp = %{epoch}:%{version}-%{release}
193
194 %description -n crossmingw32-libgomp-static
195 Static GNU OpenMP library - cross MinGW32 version.
196
197 %description -n crossmingw32-libgomp-static -l pl.UTF-8
198 Statyczna biblioteka GNU OpenMP - wersja skrośna MinGW32.
199
200 %package -n crossmingw32-libgomp-dll
201 Summary:        DLL GNU OpenMP library for Windows
202 Summary(pl.UTF-8):      Biblioteka DLL GNU OpenMP dla Windows
203 License:        GPL v3+ with GCC Runtime Library Exception v3.1
204 Group:          Applications/Emulators
205 Requires:       crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
206 Requires:       crossmingw32-pthreads-w32-dll
207
208 %description -n crossmingw32-libgomp-dll
209 DLL GNU OpenMP library for Windows.
210
211 %description -n crossmingw32-libgomp-dll -l pl.UTF-8
212 Biblioteka DLL GNU OpenMP dla Windows.
213
214 %package -n crossmingw32-libvtv
215 Summary:        The Virtual Table Verification library - cross MinGW32 version
216 Summary(pl.UTF-8):      Biblioteka Virtual Table Verification do weryfikacji tablicy wirtualnej - wersja skrośna MinGW32
217 License:        GPL v3+ with GCC Runtime Library Exception v3.1
218 Group:          Development/Libraries
219 URL:            https://gcc.gnu.org/wiki/vtv
220 Requires:       %{name} = %{epoch}:%{version}-%{release}
221
222 %description -n crossmingw32-libvtv
223 This package contains cross MinGW32 version of the Virtual Table
224 Verification library which is used for -fvtable-verify=...
225 instrumented programs.
226
227 %description -n crossmingw32-libvtv -l pl.UTF-8
228 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki Virtual Table
229 Verification, służącej do weryfikacji tablicy wirtualnej w programach
230 kompilowanych z opcją -fvtable-verify=....
231
232 %package -n crossmingw32-libvtv-static
233 Summary:        The Virtual Table Verification static library - cross MinGW32 version
234 Summary(pl.UTF-8):      Statyczna biblioteka Virtual Table Verification - wersja skrośna MinGW32
235 License:        GPL v3+ with GCC Runtime Library Exception v3.1
236 Group:          Development/Libraries
237 URL:            https://gcc.gnu.org/wiki/vtv
238 Requires:       crossmingw32-libvtv = %{epoch}:%{version}-%{release}
239
240 %description -n crossmingw32-libvtv-static
241 The Virtual Table Verification static library - cross MinGW32 version.
242
243 %description -n crossmingw32-libvtv-static -l pl.UTF-8
244 Statyczna biblioteka Virtual Table Verification - wersja skrośna
245 MinGW32.
246
247 %package -n crossmingw32-libvtv-dll
248 Summary:        DLL Virtual Table Verification libraries for Windows
249 Summary(pl.UTF-8):      Biblioteki DLL Virtual Table Verification dla Windows
250 License:        GPL v3+ with GCC Runtime Library Exception v3.1
251 Group:          Applications/Emulators
252 URL:            https://gcc.gnu.org/wiki/vtv
253 Requires:       crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
254
255 %description -n crossmingw32-libvtv-dll
256 DLL Virtual Table Verification libraries for Windows.
257
258 %description -n crossmingw32-libvtv-dll -l pl.UTF-8
259 Biblioteki DLL Virtual Table Verification dla Windows.
260
261 %package c++
262 Summary:        MinGW32 binary utility development utilities - g++
263 Summary(pl.UTF-8):      Zestaw narzędzi MinGW32 - g++
264 Group:          Development/Languages
265 Requires:       %{name} = %{epoch}:%{version}-%{release}
266
267 %description c++
268 crossmingw32 is a complete cross-compiling development system for
269 building stand-alone Microsoft Windows applications under Linux using
270 the MinGW32 build libraries. This includes a binutils, gcc with g++
271 and objc, and libstdc++, all cross targeted to i386-mingw32, along
272 with supporting Win32 libraries in 'coff' format from free sources.
273
274 This package contains cross targeted g++ and (static) libstdc++.
275
276 %description c++ -l pl.UTF-8
277 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
278 pozwalającym budować aplikacje MS Windows pod Linuksem używając
279 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
280 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
281 z bibliotek w formacie COFF.
282
283 Ten pakiet zawiera g++ generujące kod pod Win32 oraz bibliotekę
284 libstdc++.
285
286 %package -n crossmingw32-libstdc++-static
287 Summary:        Static standard C++ library - cross MinGW32 version
288 Summary(pl.UTF-8):      Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32
289 Group:          Development/Libraries
290 Requires:       %{name}-c++ = %{epoch}:%{version}-%{release}
291
292 %description -n crossmingw32-libstdc++-static
293 Static standard C++ library - cross MinGW32 version.
294
295 %description -n crossmingw32-libstdc++-static -l pl.UTF-8
296 Statyczna biblioteka standardowa C++ - wersja skrośna MinGW32.
297
298 %package -n crossmingw32-libstdc++-dll
299 Summary:        libstdc++ DLL library for Windows
300 Summary(pl.UTF-8):      Biblioteka DLL libstdc++ dla Windows
301 Group:          Applications/Emulators
302 Requires:       crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
303 Requires:       wine
304
305 %description -n crossmingw32-libstdc++-dll
306 libstdc++ DLL library for Windows.
307
308 %description -n crossmingw32-libstdc++-dll -l pl.UTF-8
309 Biblioteka DLL libstdc++ dla Windows.
310
311 %package objc
312 Summary:        MinGW32 binary utility development utilities - objc
313 Summary(pl.UTF-8):      Zestaw narzędzi MinGW32 - objc
314 Group:          Development/Languages
315 Requires:       %{name} = %{epoch}:%{version}-%{release}
316
317 %description objc
318 crossmingw32 is a complete cross-compiling development system for
319 building stand-alone Microsoft Windows applications under Linux using
320 the MinGW32 build libraries. This includes a binutils, gcc with g++
321 and objc, and libstdc++, all cross targeted to i386-mingw32, along
322 with supporting Win32 libraries in 'coff' format from free sources.
323
324 This package contains cross targeted objc compiler.
325
326 %description objc -l pl.UTF-8
327 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
328 pozwalającym budować aplikacje MS Windows pod Linuksem używając
329 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
330 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
331 z bibliotek w formacie COFF.
332
333 Ten pakiet zawiera kompilator objc generujący kod pod Win32.
334
335 %package objc++
336 Summary:        MinGW32 binary utility development utilities - objc++
337 Summary(pl.UTF-8):      Zestaw narzędzi MinGW32 - objc++
338 Group:          Development/Languages
339 Requires:       %{name}-objc = %{epoch}:%{version}-%{release}
340
341 %description objc++
342 crossmingw32 is a complete cross-compiling development system for
343 building stand-alone Microsoft Windows applications under Linux using
344 the MinGW32 build libraries. This includes a binutils, gcc with g++
345 and objc, and libstdc++, all cross targeted to i386-mingw32, along
346 with supporting Win32 libraries in 'coff' format from free sources.
347
348 This package contains Objective C++ support.
349
350 %description objc++ -l pl.UTF-8
351 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
352 pozwalającym budować aplikacje MS Windows pod Linuksem używając
353 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
354 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
355 z bibliotek w formacie COFF.
356
357 Ten pakiet zawiera obsługę języka Objective C++.
358
359 %package -n crossmingw32-libobjc-static
360 Summary:        Static Objective C library - cross MinGW32 version
361 Summary(pl.UTF-8):      Statyczna biblioteka Objective C - wersja skrośna MinGW32
362 Group:          Development/Libraries
363 Requires:       %{name}-objc = %{epoch}:%{version}-%{release}
364
365 %description -n crossmingw32-libobjc-static
366 Static Objective C library - cross MinGW32 version.
367
368 %description -n crossmingw32-libobjc-static -l pl.UTF-8
369 Statyczna biblioteka Objective C - wersja skrośna MinGW32.
370
371 %package -n crossmingw32-libobjc-dll
372 Summary:        libobjc DLL library for Windows
373 Summary(pl.UTF-8):      Biblioteka DLL libobjc dla Windows
374 Group:          Applications/Emulators
375 Requires:       crossmingw32-libgcc-dll = %{epoch}:%{version}-%{release}
376 Requires:       wine
377
378 %description -n crossmingw32-libobjc-dll
379 libobjc DLL library for Windows.
380
381 %description -n crossmingw32-libobjc-dll -l pl.UTF-8
382 Biblioteka DLL libobjc dla Windows.
383
384 %package fortran
385 Summary:        MinGW32 binary utility development utilities - Fortran
386 Summary(pl.UTF-8):      Zestaw narzędzi MinGW32 - Fortran
387 Group:          Development/Languages
388 Requires:       %{name} = %{epoch}:%{version}-%{release}
389 Requires:       crossmingw32-libquadmath = %{epoch}:%{version}-%{release}
390 Obsoletes:      crossmingw32-gcc-g77 < 1:4
391
392 %description fortran
393 crossmingw32 is a complete cross-compiling development system for
394 building stand-alone Microsoft Windows applications under Linux using
395 the MinGW32 build libraries. This includes a binutils, gcc with g++
396 and objc, and libstdc++, all cross targeted to i386-mingw32, along
397 with supporting Win32 libraries in 'coff' format from free sources.
398
399 This package contains cross targeted Fortran compiler.
400
401 %description fortran -l pl.UTF-8
402 crossmingw32 jest kompletnym systemem do kompilacji skrośnej,
403 pozwalającym budować aplikacje MS Windows pod Linuksem używając
404 bibliotek MinGW32. System składa się z binutils, gcc z g++ i objc,
405 libstdc++ - wszystkie generujące kod dla platformy i386-mingw32, oraz
406 z bibliotek w formacie COFF.
407
408 Ten pakiet zawiera kompilator Fortranu generujący kod pod Win32.
409
410 %package -n crossmingw32-libgfortran-static
411 Summary:        Static Fortran library - cross MinGW32 version
412 Summary(pl.UTF-8):      Statyczna biblioteka Fortranu - wersja skrośna MinGW32
413 Group:          Development/Libraries
414 Requires:       %{name}-fortran = %{epoch}:%{version}-%{release}
415
416 %description -n crossmingw32-libgfortran-static
417 Static Fortran library - cross MinGW32 version.
418
419 %description -n crossmingw32-libgfortran-static -l pl.UTF-8
420 Statyczna biblioteka Fortranu - wersja skrośna MinGW32.
421
422 %package -n crossmingw32-libgfortran-dll
423 Summary:        libgfortran DLL library for Windows
424 Summary(pl.UTF-8):      Biblioteka DLL libgfortran dla Windows
425 Group:          Applications/Emulators
426 Requires:       crossmingw32-libquadmath-dll
427
428 %description -n crossmingw32-libgfortran-dll
429 libgfortran DLL library for Windows.
430
431 %description -n crossmingw32-libgfortran-dll -l pl.UTF-8
432 Biblioteka DLL libgfortran dla Windows.
433
434 %package -n crossmingw32-libquadmath
435 Summary:        GCC __float128 support library - cross MinGW32 version
436 Summary(pl.UTF-8):      Biblioteka do obsługi typu __float128 - wersja skrośna MinGW32
437 License:        GPL v2+ with linking exception
438 Group:          Development/Libraries
439 Requires:       %{name} = %{epoch}:%{version}-%{release}
440
441 %description -n crossmingw32-libquadmath
442 This package contains cross MinGW32 version of GCC support library
443 which is needed for __float128 math support and for Fortran REAL*16
444 support.
445
446 %description -n crossmingw32-libquadmath -l pl.UTF-8
447 Ten pakiet zawiera wersję skrośną MinGW32 biblioteki GCC do obsługi
448 operacji matematycznych na zmiennych typu __float128 oraz typu REAL*16
449 w Fortranie.
450
451 %package -n crossmingw32-libquadmath-static
452 Summary:        Static GCC __float128 support library - cross MinGW32 version
453 Summary(pl.UTF-8):      Biblioteka statyczna GCC do obsługi typu __float128 - wersja skrośna MinGW32
454 License:        GPL v2+ with linking exception
455 Group:          Development/Libraries
456 Requires:       crossmingw32-libquadmath = %{epoch}:%{version}-%{release}
457
458 %description -n crossmingw32-libquadmath-static
459 Static GCC __float128 support library - cross MinGW32 version.
460
461 %description -n crossmingw32-libquadmath-static -l pl.UTF-8
462 Biblioteka statyczna GCC do obsługi typu __float128 - wersja skrośna
463 MinGW32.
464
465 %package -n crossmingw32-libquadmath-dll
466 Summary:        DLL GCC __float128 support library for Windows
467 Summary(pl.UTF-8):      Biblioteka DLL GCC do obsługi typu __float128 dla Windows
468 License:        GPL v2+ with linking exception
469 Group:          Applications/Emulators
470 Requires:       wine
471
472 %description -n crossmingw32-libquadmath-dll
473 DLL GCC __float128 support library for Windows.
474
475 %description -n crossmingw32-libquadmath-dll -l pl.UTF-8
476 Biblioteka DLL GCC do obsługi typu __float128 dla Windows.
477
478 %prep
479 %setup -q -n gcc-%{version}
480 #patch100 -p0
481 %patch0 -p1
482 %patch2 -p1
483 %patch3 -p1
484 %patch4 -p1
485 %patch5 -p1
486
487 %if %{with bootstrap}
488 # note: "winsup" dirs are special, handled by gcc's configure
489 install -d winsup/{mingw,w32api}
490 tar xf %{SOURCE1} -C winsup/w32api
491 tar xf %{SOURCE2} -C winsup/mingw
492 # required by _mingw.h
493 touch winsup/mingw/include/features.h
494 %endif
495
496 # override snapshot version.
497 echo %{version} > gcc/BASE-VER
498 echo "release" > gcc/DEV-PHASE
499
500 %build
501 cd libvtv
502 %{__aclocal} -I .. -I ../config
503 %{__autoconf}
504 %{__automake}
505 cd ..
506
507 rm -rf builddir && install -d builddir && cd builddir
508 %if %{with bootstrap}
509 install -d %{target}/winsup
510 ln -sf ../../../winsup/mingw/lib %{target}/winsup/mingw
511 ln -sf ../../../winsup/w32api %{target}/winsup/w32api
512 WINSUPDIR=$(cd ..; pwd)/winsup
513 %endif
514
515 # note: libbacktrace requires at least i486 now
516 CC="%{__cc}" \
517 CFLAGS="%{rpmcflags}" \
518 CXXFLAGS="%{rpmcxxflags}" \
519 TEXCONFIG=false \
520 CFLAGS_FOR_TARGET="-O2 -march=i486" \
521 CXXFLAGS_FOR_TARGET="-O2 -march=i486" \
522 ../configure \
523         --prefix=%{sysprefix} \
524         --bindir=%{archbindir} \
525         --libdir=%{_libdir} \
526         --includedir=%{archincludedir} \
527         --libexecdir=%{_libdir} \
528         --infodir=%{_infodir} \
529         --mandir=%{_mandir} \
530         --with-bugurl="http://bugs.pld-linux.org" \
531         --with-build-time-tools=%{archbindir} \
532         %{!?with_bootstrap:--with-headers=%{archincludedir}} \
533         --with-libs=%{!?with_bootstrap:%{archlibdir}}%{?with_bootstrap:${WINSUPDIR}/mingw/lib} \
534         --with-demangler-in-ld \
535         --with-dwarf2 \
536         --with-gnu-as \
537         --with-gnu-ld \
538         --with-long-double-128 \
539         --with-pkgversion="PLD-Linux" \
540         --enable-c99 \
541         --enable-fully-dynamic-string \
542         --disable-isl-version-check \
543         --enable-languages="c,c++%{!?with_bootstrap:,fortran,objc,obj-c++}" \
544         %{?with_bootstrap:--disable-libatomic} \
545         --disable-libcc1 \
546         --enable-libgomp%{!?with_gomp:=no} \
547         %{?with_bootstrap:--disable-libquadmath} \
548         --disable-libssp \
549         --enable-libstdcxx-allocator=new \
550         %{?with_bootstrap:--disable-libvtv} \
551         --enable-linker-build-id \
552         --enable-long-long \
553         --enable-lto \
554         --disable-multilib \
555         --disable-nls \
556         --enable-shared \
557         --disable-sjlj-exceptions \
558         --disable-symvers \
559         --enable-threads%{?with_pthreads:=posix} \
560         --disable-werror \
561         --disable-win32-registry \
562         --target=%{target}
563
564 cd ..
565 %{__make} -C builddir all-host
566 patch -p1 <%{PATCH1}
567 %{__make} -C builddir
568
569 %install
570 rm -rf $RPM_BUILD_ROOT
571 install -d $RPM_BUILD_ROOT%{_bindir}
572
573 %{__make} -C builddir install \
574         DESTDIR=$RPM_BUILD_ROOT
575
576 %{__mv} $RPM_BUILD_ROOT%{gcclibdir}/include-fixed/{limits,syslimits}.h $RPM_BUILD_ROOT%{gcclibdir}/include
577 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/include-fixed
578 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/install-tools
579
580 # these must be symlinks: gcclibdir is calculated relatively to real binary path
581 ln -sf %{archbindir}/%{target}-gcc $RPM_BUILD_ROOT%{_bindir}/%{target}-gcc
582 ln -sf %{archbindir}/%{target}-g++ $RPM_BUILD_ROOT%{_bindir}/%{target}-g++
583 ln -sf %{archbindir}/%{target}-cpp $RPM_BUILD_ROOT%{_bindir}/%{target}-cpp
584 ln -sf %{archbindir}/%{target}-gcov $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov
585 ln -sf %{archbindir}/%{target}-gcov-dump $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov-dump
586 ln -sf %{archbindir}/%{target}-gcov-tool $RPM_BUILD_ROOT%{_bindir}/%{target}-gcov-tool
587 ln -sf %{archbindir}/%{target}-gfortran $RPM_BUILD_ROOT%{_bindir}/%{target}-gfortran
588
589 # DLLs
590 install -d $RPM_BUILD_ROOT%{_dlldir}
591 %{__mv} $RPM_BUILD_ROOT%{archlibdir}/*.dll $RPM_BUILD_ROOT%{_dlldir}
592 if [ ! -f $RPM_BUILD_ROOT%{_dlldir}/libgcc_s_dw2-1.dll ]; then
593         echo "libgcc DLL not installed?"
594         install builddir/i386-mingw32/libgcc/shlib/libgcc_s_dw2-1.dll $RPM_BUILD_ROOT%{_dlldir}
595 fi
596
597 %if 0%{!?debug:1}
598 %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll
599 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{archlibdir}/lib*.a
600 %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{gcclibdir}/lib*.a
601 %endif
602
603 # avoid -L poisoning in *.la
604 %if %{without bootstrap}
605 for f in libatomic.la libgfortran.la libobjc.la libquadmath.la %{?with_gomp:libgomp.la} ; do
606         file="$RPM_BUILD_ROOT%{archlibdir}/$f"
607         %{__perl} %{SOURCE3} "$file" %{gcclibdir} >"${file}.fixed"
608         %{__mv} "${file}.fixed" "$file"
609 done
610 for f in libcaf_single.la ; do
611         file="$RPM_BUILD_ROOT%{gcclibdir}/$f"
612         %{__perl} %{SOURCE3} "$file" %{gcclibdir} >"${file}.fixed"
613         %{__mv} "${file}.fixed" "$file"
614 done
615 %endif
616
617 # for pretty-printers see native gcc
618 %{__rm} $RPM_BUILD_ROOT%{archlibdir}/libstdc++.dll.a-gdb.py
619 %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/gcc-%{version}/python/libstdcxx
620 # no plugin development for mingw32 (at least for now)
621 %{__rm} $RPM_BUILD_ROOT%{gcclibdir}/liblto_plugin.la
622 %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/plugin
623 # already in native gcc
624 %{__rm} -r $RPM_BUILD_ROOT%{_infodir}
625 # common FSF man pages
626 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man7/{fsf-funding,gfdl,gpl}.7
627
628 %clean
629 rm -rf $RPM_BUILD_ROOT
630
631 %files
632 %defattr(644,root,root,755)
633 %attr(755,root,root) %{_bindir}/%{target}-gcc
634 %attr(755,root,root) %{_bindir}/%{target}-cpp
635 %attr(755,root,root) %{_bindir}/%{target}-gcov
636 %attr(755,root,root) %{_bindir}/%{target}-gcov-dump
637 %attr(755,root,root) %{_bindir}/%{target}-gcov-tool
638 %attr(755,root,root) %{archbindir}/%{target}-cpp
639 %attr(755,root,root) %{archbindir}/%{target}-gcc
640 %attr(755,root,root) %{archbindir}/%{target}-gcc-%{version}
641 %attr(755,root,root) %{archbindir}/%{target}-gcc-ar
642 %attr(755,root,root) %{archbindir}/%{target}-gcc-nm
643 %attr(755,root,root) %{archbindir}/%{target}-gcc-ranlib
644 %attr(755,root,root) %{archbindir}/%{target}-gcov
645 %attr(755,root,root) %{archbindir}/%{target}-gcov-dump
646 %attr(755,root,root) %{archbindir}/%{target}-gcov-tool
647 %{archlibdir}/libgcc_s.a
648 %dir %{gccarchdir}
649 %dir %{gcclibdir}
650 %attr(755,root,root) %{gcclibdir}/cc1
651 %attr(755,root,root) %{gcclibdir}/collect2
652 %attr(755,root,root) %{gcclibdir}/lto-wrapper
653 %attr(755,root,root) %{gcclibdir}/lto1
654 %attr(755,root,root) %{gcclibdir}/liblto_plugin.so*
655 %{gcclibdir}/libgcc.a
656 %{gcclibdir}/libgcc_eh.a
657 %{gcclibdir}/libgcov.a
658 %{gcclibdir}/crtbegin.o
659 %{gcclibdir}/crtend.o
660 %{gcclibdir}/crtfastmath.o
661 %dir %{gcclibdir}/include
662 %{gcclibdir}/include/*.h
663 %{_mandir}/man1/%{target}-cpp.1*
664 %{_mandir}/man1/%{target}-gcc.1*
665 %{_mandir}/man1/%{target}-gcov.1*
666 %{_mandir}/man1/%{target}-gcov-dump.1*
667 %{_mandir}/man1/%{target}-gcov-tool.1*
668
669 %files -n crossmingw32-libgcc-dll
670 %defattr(644,root,root,755)
671 %{_dlldir}/libgcc_s_dw2-1.dll
672
673 %if %{without bootstrap}
674 %files -n crossmingw32-libatomic
675 %defattr(644,root,root,755)
676 %{archlibdir}/libatomic.dll.a
677 %{archlibdir}/libatomic.la
678
679 %files -n crossmingw32-libatomic-static
680 %defattr(644,root,root,755)
681 %{archlibdir}/libatomic.a
682
683 %files -n crossmingw32-libatomic-dll
684 %defattr(644,root,root,755)
685 %{_dlldir}/libatomic-1.dll
686 %endif
687
688 %if %{with gomp}
689 %files -n crossmingw32-libgomp
690 %defattr(644,root,root,755)
691 %{archlibdir}/libgomp.dll.a
692 %{archlibdir}/libgomp.la
693 %{archlibdir}/libgomp.spec
694
695 %files -n crossmingw32-libgomp-static
696 %defattr(644,root,root,755)
697 %{archlibdir}/libgomp.a
698
699 %files -n crossmingw32-libgomp-dll
700 %defattr(644,root,root,755)
701 %{_dlldir}/libgomp-1.dll
702 %endif
703
704 %if %{without bootstrap}
705 %files -n crossmingw32-libvtv
706 %defattr(644,root,root,755)
707 %{archlibdir}/libvtv.dll.a
708 %{archlibdir}/libvtv.la
709 %{archlibdir}/libvtv_stubs.dll.a
710 %{archlibdir}/libvtv_stubs.la
711
712 %files -n crossmingw32-libvtv-static
713 %defattr(644,root,root,755)
714 %{archlibdir}/libvtv.a
715 %{archlibdir}/libvtv_stubs.a
716
717 %files -n crossmingw32-libvtv-dll
718 %defattr(644,root,root,755)
719 %{_dlldir}/libvtv-0.dll
720 %{_dlldir}/libvtv_stubs-0.dll
721 %endif
722
723 %files c++
724 %defattr(644,root,root,755)
725 %attr(755,root,root) %{_bindir}/%{target}-g++
726 %attr(755,root,root) %{archbindir}/%{target}-c++
727 %attr(755,root,root) %{archbindir}/%{target}-g++
728 %attr(755,root,root) %{gcclibdir}/cc1plus
729 %{archlibdir}/libstdc++.dll.a
730 %{archlibdir}/libstdc++.la
731 %{archlibdir}/libsupc++.la
732 %{archlibdir}/libsupc++.a
733 %{archincludedir}/c++
734 %{_mandir}/man1/%{target}-g++.1*
735
736 %files -n crossmingw32-libstdc++-static
737 %defattr(644,root,root,755)
738 %{archlibdir}/libstdc++.a
739
740 %files -n crossmingw32-libstdc++-dll
741 %defattr(644,root,root,755)
742 %{_dlldir}/libstdc++-6.dll
743
744 %if %{without bootstrap}
745 %files objc
746 %defattr(644,root,root,755)
747 %doc libobjc/README
748 %attr(755,root,root) %{gcclibdir}/cc1obj
749 %{archlibdir}/libobjc.dll.a
750 %{archlibdir}/libobjc.la
751 %{gcclibdir}/include/objc
752
753 %files objc++
754 %defattr(644,root,root,755)
755 %doc gcc/objcp/ChangeLog
756 %attr(755,root,root) %{gcclibdir}/cc1objplus
757
758 %files -n crossmingw32-libobjc-static
759 %defattr(644,root,root,755)
760 %{archlibdir}/libobjc.a
761
762 %files -n crossmingw32-libobjc-dll
763 %defattr(644,root,root,755)
764 %{_dlldir}/libobjc-4.dll
765
766 %files fortran
767 %defattr(644,root,root,755)
768 %attr(755,root,root) %{_bindir}/%{target}-gfortran
769 %attr(755,root,root) %{archbindir}/%{target}-gfortran
770 %attr(755,root,root) %{gcclibdir}/f951
771 %{archlibdir}/libgfortran.dll.a
772 %{archlibdir}/libgfortran.la
773 %{archlibdir}/libgfortran.spec
774 %{gcclibdir}/finclude
775 %{gcclibdir}/libcaf_single.a
776 %{gcclibdir}/libcaf_single.la
777 %{_mandir}/man1/%{target}-gfortran.1*
778
779 %files -n crossmingw32-libgfortran-static
780 %defattr(644,root,root,755)
781 %{archlibdir}/libgfortran.a
782
783 %files -n crossmingw32-libgfortran-dll
784 %defattr(644,root,root,755)
785 %{_dlldir}/libgfortran-5.dll
786
787 %files -n crossmingw32-libquadmath
788 %defattr(644,root,root,755)
789 %{archlibdir}/libquadmath.dll.a
790 %{archlibdir}/libquadmath.la
791
792 %files -n crossmingw32-libquadmath-static
793 %defattr(644,root,root,755)
794 %{archlibdir}/libquadmath.a
795
796 %files -n crossmingw32-libquadmath-dll
797 %defattr(644,root,root,755)
798 %{_dlldir}/libquadmath-0.dll
799 %endif
This page took 0.140018 seconds and 4 git commands to generate.