Add armv7l support and fix build error of cross gcc.
[platform/upstream/gcc48.git] / packaging / gcc.spec.in
1 #
2 # spec file for package gcc48
3 #
4 # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
5 #
6 # All modifications and additions to the file contributed by third parties
7 # remain the property of their copyright owners, unless otherwise agreed
8 # upon. The license for this file, and modifications and additions to the
9 # file, is the same license as for the pristine package itself (unless the
10 # license for the pristine package is not an Open Source License, in which
11 # case the license is the MIT License). An "Open Source License" is a
12 # license that conforms to the Open Source Definition (Version 1.9)
13 # published by the Open Source Initiative.
14
15 # Please submit bugfixes or comments via http://bugs.opensuse.org/
16 #
17
18 # norootforbuild
19 # icecream 0
20
21
22 %define build_ada 0
23
24 %define quadmath_arch %ix86 x86_64 ia64
25 %define tsan_arch x86_64
26 %define asan_arch x86_64 %ix86 ppc ppc64
27 %define itm_arch x86_64 %ix86 %arm ppc ppc64
28 %define atomic_arch x86_64 %ix86 %arm ppc ppc64 s390 s390x
29
30 # We don't want to build java
31 %define build_java 0
32 %define build_libjava 0
33
34 %define build_cp 1
35 %define build_fortran !0%{?building_libjava:1}%{?building_libffi:1}
36 %define build_objc !0%{?building_libjava:1}%{?building_libffi:1}
37 %define build_objcp !0%{?building_libjava:1}%{?building_libffi:1}
38 %define build_with_mudflap 0
39
40 %if %{build_objcp}
41 %define build_cp 1
42 %define build_objc 1
43 %endif
44
45 %if %{build_libjava}
46 %define build_cp 1
47 %endif
48
49 # For optional compilers only build C, C++ and Fortran
50 %if 0%{?build_optional_compiler_languages:1}
51 %define build_ada 0
52 %define build_java 0
53 %define build_libjava 0
54 %define build_objc 0
55 %define build_objcp 0
56 %endif
57
58 # Shared library SONAME versions
59 %define libgcc_s 1
60 %define libgcj_sover %{nil}
61 %define libgcj_bc_sover %{nil}
62 %define libffi_sover %{nil}
63 %define libmudflap_sover %{nil}
64 %define libgomp_sover %{nil}
65 %define libstdcxx_sover %{nil}
66 %define libobjc_sover %{nil}
67 %define libgfortran_sover %{nil}
68 %define libquadmath_sover %{nil}
69 %define libasan_sover %{nil}
70 %define libtsan_sover %{nil}
71 %define libatomic_sover %{nil}
72 %define libitm_sover %{nil}
73
74 # Shared library package suffix
75 # This is used for the "non-standard" set of libraries, the standard
76 # being defined by %product_libs_gcc_ver, the GCC version that should
77 # provide un-suffixed shared library packages following the shared-library
78 # policy.  Even suffixed variants should provide the shared-library policy
79 # mandated names and ensure they conflict with each other.
80 # Note that on SONAME changes of any library the %product_libs_gcc_ver
81 # define needs to be either split or the newest GCC version still providing
82 # the old SONAME needs to unconditionally produce an un-suffixed library
83 # if %product_libs_gcc_ver is newer than it.  Similar the _oldest_ GCC
84 # version first providing a new SONAME needs to unconditionally produce
85 # an un-suffixed library if %product_libs_gcc_ver is lower that it.
86 %if %{!?product_libs_gcc_ver:@base_ver@}%{?product_libs_gcc_ver} != @base_ver@
87 %define pne 1
88 %endif
89 %define libgcc_s_suffix %{?pne:-gcc@base_ver@}
90 # libgcj SONAME changes with every GCC version
91 %define libgcj_suffix %nil
92 %define libgcj_bc_suffix %{?pne:-gcc@base_ver@}
93 %define libffi_suffix %{?pne:-gcc@base_ver@}
94 %define libmudflap_suffix %{?pne:-gcc@base_ver@}
95 %define libgomp_suffix %{?pne:-gcc@base_ver@}
96 %define libstdcxx_suffix %{?pne:-gcc@base_ver@}
97 %define libobjc_suffix %{?pne:-gcc@base_ver@}
98 %define libgfortran_suffix %{?pne:-gcc@base_ver@}
99 %define libquadmath_suffix %{?pne:-gcc@base_ver@}
100 %define libasan_suffix %{?pne:-gcc@base_ver@}
101 %define libtsan_suffix %{?pne:-gcc@base_ver@}
102 %define libatomic_suffix %{?pne:-gcc@base_ver@}
103 %define libitm_suffix %{?pne:-gcc@base_ver@}
104
105
106
107
108 Name:         gcc@base_ver@
109 BuildRequires: gcc-c++
110 BuildRequires: bison
111 BuildRequires: flex
112 BuildRequires: glibc-devel-32bit
113 BuildRequires: mpc-devel
114 BuildRequires: mpfr-devel
115 BuildRequires: perl
116 BuildRequires: makeinfo
117 BuildRequires: zlib-devel
118 %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
119 BuildRequires: cloog-isl-devel
120 BuildRequires: isl-devel
121 %endif
122 %if %{build_ada}
123 %define hostsuffix -4.7
124 BuildRequires: gcc47-ada
125 %endif
126 %if 0%{?building_libjava:1}%{?building_testsuite:1}
127 BuildRequires: fastjar
128 %endif
129 %if 0%{?building_libffi:1}
130 BuildRequires: pkg-config
131 %endif
132 %ifarch ia64
133 BuildRequires: libunwind-devel
134 %endif
135 %if 0%{?run_tests:1}
136 BuildRequires: dejagnu
137 BuildRequires: expect
138 BuildRequires: gdb
139 %endif
140
141 %define separate_bi32 0
142 %define separate_bi64 0
143 %ifarch ppc sparcv9
144 # Beware, this does _not_ separate libgcj, as for that one multilibing
145 # is inactive for the time being
146 %define separate_bi64 1
147 %endif
148 %ifarch x86_64 s390x ppc64 sparc64
149 %define separate_bi32 1
150 %endif
151
152 # Define two macros to trigger -32bit or -64bit package variants
153 %define separate_biarch 0
154 %if %{separate_bi32}
155 %define separate_biarch 1
156 %define separate_biarch_suffix -32bit
157 %endif
158 %if %{separate_bi64}
159 %define separate_biarch 1
160 %define separate_biarch_suffix -64bit
161 %endif
162
163 %ifarch x86_64 ia64 s390x alpha ppc64 sparc64
164 # 64-bit is primary build target
165 %define build_primary_64bit 1
166 %else
167 %define build_primary_64bit 0
168 %endif
169
170 %define biarch_libjava 0
171
172 # COMMON-BEGIN
173 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
174
175 URL:          http://gcc.gnu.org/
176 Version: 4.8.1
177 Release:      1
178 %define gcc_version %(echo %version | sed 's/_.*//')
179 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
180 %define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
181 %define binsuffix -4.8
182 # COMMON-END
183
184 %if !0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
185 Requires: binutils glibc-devel
186 Requires: cpp@base_ver@ = %{version}-%{release}
187 Requires: libgcc_s%{libgcc_s} >= %{version}-%{release}
188 Requires: libgomp%{libgomp_sover} >= %{version}-%{release}
189 %if %{build_with_mudflap}
190 Requires: libmudflap%{libmudflap_sover} >= %{version}-%{release}
191 Requires: libmudflapth%{libmudflap_sover} >= %{version}-%{release}
192 %endif
193 %ifarch %asan_arch
194 Requires: libasan%{libasan_sover} >= %{version}-%{release}
195 %endif
196 %ifarch %tsan_arch
197 Requires: libtsan%{libtsan_sover} >= %{version}-%{release}
198 %endif
199 %ifarch %atomic_arch
200 Requires: libatomic%{libatomic_sover} >= %{version}-%{release}
201 %endif
202 %ifarch %itm_arch
203 Requires: libitm%{libitm_sover} >= %{version}-%{release}
204 %endif
205 Suggests: gcc@base_ver@-info gcc@base_ver@-locale
206 %endif
207
208 # COMMON-BEGIN
209 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
210 Source:         gcc-%{version}.tar.bz2
211 Source1:        change_spec
212 Source3:        gcc48-rpmlintrc
213 Source4:        ecj.jar
214 Source6:        baselibs.conf
215
216
217 # GCC-TESTSUITE-DELETE-BEGIN
218 # LIBJAVA-DELETE-BEGIN
219 Group:          Development/Languages/C and C++
220 Summary:        The GNU C Compiler and Support Files
221 License:        GPL-3.0+
222
223 %description
224 Core package for the GNU Compiler Collection, including the C language
225 frontend.
226
227 Language frontends other than C are split to different sub-packages,
228 namely gcc-ada, gcc-c++, gcc-fortran, gcc-java, gcc-objc and
229 gcc-obj-c++.
230 # LIBFFI-DELETE-BEGIN
231
232
233
234 # COMMON-END
235 %package -n gcc@base_ver@-32bit
236 Summary:      The GNU C Compiler 32bit support
237 Group:        Development/Languages/C and C++
238 Requires: gcc@base_ver@ = %{version}-%{release}
239 Requires: libgcc_s%{libgcc_s}-32bit >= %{version}-%{release}
240 Requires: libgomp%{libgomp_sover}-32bit >= %{version}-%{release}
241 %if %{build_with_mudflap}
242 Requires: libmudflap%{libmudflap_sover}-32bit >= %{version}-%{release}
243 Requires: libmudflapth%{libmudflap_sover}-32bit >= %{version}-%{release}
244 %endif
245 Requires: glibc-devel-32bit
246
247 %description -n gcc@base_ver@-32bit
248 This package contains 32bit support for the GNU Compiler Collection.
249
250 %package -n gcc@base_ver@-64bit
251 Summary:      The GNU C Compiler 64bit support
252 Group:        Development/Languages/C and C++
253 Requires: gcc@base_ver@ = %{version}-%{release}
254 Requires: libgcc_s%{libgcc_s}-64bit >= %{version}-%{release}
255 Requires: libgomp%{libgomp_sover}-64bit >= %{version}-%{release}
256 %if %{build_with_mudflap}
257 Requires: libmudflap%{libmudflap_sover}-64bit >= %{version}-%{release}
258 Requires: libmudflapth%{libmudflap_sover}-64bit >= %{version}-%{release}
259 %endif
260 Requires: glibc-devel-64bit
261
262 %description -n gcc@base_ver@-64bit
263 This package contains 64bit support for the GNU Compiler Collection.
264
265
266 %package locale
267 Summary:      Locale Data for the GNU Compiler Collection
268 License:        GPL-3.0+
269 Group:        Development/Languages/C and C++
270 Requires: gcc@base_ver@ = %{version}-%{release}
271
272 %description locale
273 Locale data for the GNU Compiler Collection (GCC) to give error message
274 in the current locale.
275
276
277 %package c++
278 Summary:      The GNU C++ Compiler
279 License:        GPL-3.0+
280 Group:        Development/Languages/C and C++
281 Requires: gcc@base_ver@ = %{version}-%{release}
282 Requires: libstdc++@base_ver@-devel = %{version}-%{release}
283
284 %description c++
285 This package contains the GNU compiler for C++.
286
287 # PACKAGE-BEGIN
288 %package -n libstdc++@base_ver@-devel@variant@
289 Summary:      Include Files and Libraries mandatory for Development
290 License:        GPL-3.0-with-GCC-exception
291 Group:        Development/Languages/C and C++
292 Requires: libstdc++%{libstdcxx_sover}@variant@ >= %{version}-%{release}
293 Requires: glibc-devel@variant@
294 %ifarch ia64
295 Requires: libunwind-devel
296 %endif
297
298 %description -n libstdc++@base_ver@-devel@variant@
299 This package contains all the headers and libraries of the standard C++
300 library. It is needed for compiling C++ code.
301 # PACKAGE-END
302
303 %package -n libstdc++@base_ver@-doc
304 Summary:      Documentation for the GNU C++ standard library
305 License:        GPL-3.0+
306 Group:        Documentation/HTML
307 BuildArch:    noarch
308
309 %description -n libstdc++@base_ver@-doc
310 Extensive HTML documentation for the GNU C++ standard library.
311
312
313 # PACKAGE-BEGIN
314 %package -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}@variant@
315 Summary:      C compiler runtime library
316 License:        GPL-3.0-with-GCC-exception
317 Group:        System/Base
318 Provides:       libgcc_s%{libgcc_s}@variant@ = %{version}-%{release}
319
320 %description -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}@variant@
321 Libgcc is needed for dynamically linked C programs.
322
323 %post -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}@variant@
324 /sbin/ldconfig
325
326 %postun -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}@variant@
327 /sbin/ldconfig
328 # PACKAGE-END
329
330 # PACKAGE-BEGIN
331 %package -n libgomp%{libgomp_sover}%{libgomp_suffix}@variant@
332 Summary:      The GNU compiler collection OpenMP runtime library
333 License:        GPL-3.0-with-GCC-exception
334 Group:        System/Base
335 Provides:       libgomp%{libgomp_sover}@variant@ = %{version}-%{release}
336
337 %description -n libgomp%{libgomp_sover}%{libgomp_suffix}@variant@
338 This is the OpenMP runtime library needed by OpenMP enabled programs
339 that were built with the -fopenmp compiler option and by programs that
340 were auto-parallelized via the -ftree-parallelize-loops compiler
341 option.
342
343
344 %post -n libgomp%{libgomp_sover}%{libgomp_suffix}@variant@
345 /sbin/ldconfig
346
347 %postun -n libgomp%{libgomp_sover}%{libgomp_suffix}@variant@
348 /sbin/ldconfig
349 # PACKAGE-END
350
351 # PACKAGE-BEGIN
352 %package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}@variant@
353 Summary:      The standard C++ shared library
354 License:        GPL-3.0-with-GCC-exception
355 Group:        System/Libraries
356 Suggests:       libstdc++%{libstdcxx_sover}-locale
357 Provides:       libstdc++%{libstdcxx_sover}@variant@ = %{version}-%{release}
358
359 %description -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}@variant@
360 The standard C++ library, needed for dynamically linked C++ programs.
361
362
363 %post -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}@variant@
364 /sbin/ldconfig
365
366 %postun -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}@variant@
367 /sbin/ldconfig
368 # PACKAGE-END
369
370 %package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale
371 Summary:        Locale Data for the standard C++ shared library
372 License:        GPL-3.0-with-GCC-exception
373 Group:          System/Libraries
374 Provides:       libstdc++%{libstdcxx_sover}-locale = %{version}-%{release}
375
376 %description -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale
377 The standard C++ library locale data.
378
379
380 %package info
381 Summary:      Documentation for the GNU compiler collection
382 License:      GFDL-1.2
383 Group:        Documentation/Other
384 BuildArch:    noarch
385
386 %description info
387 GNU info-pages for the GNU compiler collection covering both user-level
388 and internals documentation.
389
390
391 # PACKAGE-BEGIN
392 %package objc@variant@
393 Summary:      GNU Objective C Compiler
394 License:        GPL-3.0+
395 Group:        Development/Languages/Other
396 Requires: gcc@base_ver@ = %{version}-%{release}
397 Requires: libobjc%{libobjc_sover}@variant@ >= %{version}-%{release}
398
399 %description objc@variant@
400 This package contains the GNU Objective C compiler. Objective C is an
401 object oriented language, created by Next Inc. and used in their
402 Nextstep OS. The source code is available in the gcc package.
403 # PACKAGE-END
404
405 # PACKAGE-BEGIN
406 %package -n libobjc%{libobjc_sover}%{libobjc_suffix}@variant@
407 Summary:      Library for the GNU Objective C Compiler
408 License:        GPL-3.0-with-GCC-exception
409 Group:        Development/Libraries/Other
410 Provides:       libobjc%{libobjc_sover}@variant@ = %{version}-%{release}
411
412 %description -n libobjc%{libobjc_sover}%{libobjc_suffix}@variant@
413 The library for the GNU Objective C compiler.
414
415 %post -n libobjc%{libobjc_sover}%{libobjc_suffix}@variant@
416 /sbin/ldconfig
417
418 %postun -n libobjc%{libobjc_sover}%{libobjc_suffix}@variant@
419 /sbin/ldconfig
420 # PACKAGE-END
421
422 %package obj-c++
423 Summary:      GNU Objective C++ Compiler
424 License:        GPL-3.0+
425 Group:        Development/Languages/Other
426 Requires: gcc@base_ver@-objc = %{version}-%{release}
427 Requires: gcc@base_ver@-c++ = %{version}-%{release}
428
429 %description obj-c++
430 This package contains the GNU Objective C++ compiler. Objective C++ is an
431 object oriented language, created by Next Inc. and used in their
432 Nextstep OS. The source code is available in the gcc package.
433
434
435 %package -n cpp@base_ver@
436 Summary:      The GCC Preprocessor
437 License:        GPL-3.0+
438 Group:        Development/Languages/C and C++
439
440 %description -n cpp@base_ver@
441 This Package contains just the preprocessor that is used by the X11
442 packages.
443
444
445 # PACKAGE-BEGIN
446 %package ada@variant@
447 Summary:      GNU Ada95 Compiler Based on GCC (GNAT)
448 License:        GPL-3.0+
449 Group:        Development/Languages/Other
450 Requires: gcc@base_ver@@variant@ = %{version}-%{release}
451 Requires: libada@base_ver@@variant@ = %{version}-%{release}
452
453 %description ada@variant@
454 This package contains an Ada95 compiler and associated development
455 tools based on the GNU GCC technology. Ada95 is the object oriented
456 successor of the Ada83 language. To build this package from source you
457 must have installed a binary version to bootstrap the compiler.
458 # PACKAGE-END
459
460 # PACKAGE-BEGIN
461 %package -n libada@base_ver@@variant@
462 Summary:      GNU Ada Runtime Libraries
463 License:      GPL-3.0-with-GCC-exception
464 Group:        System/Libraries
465 %description -n libada@base_ver@@variant@
466 This package contains the shared libraries required to run programs
467 compiled with the GNU Ada compiler (GNAT) if they are compiled to use
468 shared libraries. It also contains the shared libraries for the
469 Implementation of the Ada Semantic Interface Specification (ASIS), the
470 implementation of Distributed Systems Programming (GLADE) and the Posix
471 1003.5 Binding (Florist).
472
473 %post -n libada@base_ver@@variant@
474 /sbin/ldconfig
475
476 %postun -n libada@base_ver@@variant@
477 /sbin/ldconfig
478 # PACKAGE-END
479
480 # PACKAGE-BEGIN
481 %package fortran@variant@
482 Summary:      The GNU Fortran Compiler and Support Files
483 License:        GPL-3.0+
484 Group:        Development/Languages/Fortran
485 Requires: gcc@base_ver@ = %{version}-%{release}
486 Requires: libgfortran%{libgfortran_sover}@variant@ >= %{version}-%{release}
487 %ifarch %quadmath_arch
488 Requires: libquadmath%{libquadmath_sover}@variant@ >= %{version}-%{release}
489 %endif
490
491 %description fortran@variant@
492 This is the Fortran compiler of the GNU Compiler Collection (GCC).
493 # PACKAGE-END
494
495 # PACKAGE-BEGIN
496 %package -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}@variant@
497 Summary:      The GNU Fortran Compiler Runtime Library
498 License:        GPL-3.0-with-GCC-exception
499 Group:        Development/Languages/Fortran
500 %ifarch %quadmath_arch
501 Requires: libquadmath%{libquadmath_sover}@variant@ >= %{version}-%{release}
502 %endif
503 Provides:       libgfortran%{libgfortran_sover}@variant@ = %{version}-%{release}
504
505 %description -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}@variant@
506 The runtime library needed to run programs compiled with the Fortran compiler
507 of the GNU Compiler Collection (GCC).
508
509 %post -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}@variant@
510 /sbin/ldconfig
511
512 %postun -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}@variant@
513 /sbin/ldconfig
514 # PACKAGE-END
515
516 # PACKAGE-BEGIN
517 %package -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}@variant@
518 Summary:      The GNU Fortran Compiler Quadmath Runtime Library
519 License:        LGPL-2.1
520 Group:        Development/Languages/Fortran
521 Provides:       libquadmath%{libquadmath_sover}@variant@ = %{version}-%{release}
522
523 %description -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}@variant@
524 The runtime library needed to run programs compiled with the Fortran compiler
525 of the GNU Compiler Collection (GCC) and quadruple precision floating point
526 operations.
527
528 %post -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}@variant@
529 /sbin/ldconfig
530
531 %postun -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}@variant@
532 /sbin/ldconfig
533 # PACKAGE-END
534
535 # PACKAGE-BEGIN
536 %package -n libmudflap@base_ver@@variant@
537 Summary:      The Mudflap Extension Runtime Library
538 License:        GPL-3.0-with-GCC-exception
539 Group:        Development/Languages/C and C++
540
541 %description -n libmudflap@base_ver@@variant@
542 This is the Mudflap Extension Runtime Library.
543
544 %post -n libmudflap@base_ver@@variant@
545 /sbin/ldconfig
546
547 %postun -n libmudflap@base_ver@@variant@
548 /sbin/ldconfig
549 # PACKAGE-END
550
551 # PACKAGE-BEGIN
552 %package -n libitm%{libitm_sover}%{libitm_suffix}@variant@
553 Summary:      The GNU Compiler Transactional Memory Runtime Library
554 License:        MIT
555 Group:        Development/Languages/C and C++
556
557 %description -n libitm%{libitm_sover}%{libitm_suffix}@variant@
558 The runtime library needed to run programs compiled with the
559 -fgnu-tm option of the GNU Compiler Collection (GCC).
560
561 %post -n libitm%{libitm_sover}%{libitm_suffix}@variant@
562 /sbin/ldconfig
563
564 %postun -n libitm%{libitm_sover}%{libitm_suffix}@variant@
565 /sbin/ldconfig
566 # PACKAGE-END
567
568 # PACKAGE-BEGIN
569 %package -n libasan%{libasan_sover}%{libasan_suffix}@variant@
570 Summary:      The GNU Compiler Address Sanitizer Runtime Library
571 License:        MIT
572 Group:        Development/Languages/C and C++
573
574 %description -n libasan%{libasan_sover}%{libasan_suffix}@variant@
575 The runtime library needed to run programs compiled with the
576 -fsanitize=address option of the GNU Compiler Collection (GCC).
577
578 %post -n libasan%{libasan_sover}%{libasan_suffix}@variant@
579 /sbin/ldconfig
580
581 %postun -n libasan%{libasan_sover}%{libasan_suffix}@variant@
582 /sbin/ldconfig
583 # PACKAGE-END
584
585 # PACKAGE-BEGIN
586 %package -n libtsan%{libtsan_sover}%{libtsan_suffix}@variant@
587 Summary:      The GNU Compiler Thread Sanitizer Runtime Library
588 License:        MIT
589 Group:        Development/Languages/C and C++
590
591 %description -n libtsan%{libtsan_sover}%{libtsan_suffix}@variant@
592 The runtime library needed to run programs compiled with the
593 -fsanitize=thread option of the GNU Compiler Collection (GCC).
594
595 %post -n libtsan%{libtsan_sover}%{libtsan_suffix}@variant@
596 /sbin/ldconfig
597
598 %postun -n libtsan%{libtsan_sover}%{libtsan_suffix}@variant@
599 /sbin/ldconfig
600 # PACKAGE-END
601
602 # PACKAGE-BEGIN
603 %package -n libatomic%{libatomic_sover}%{libatomic_suffix}@variant@
604 Summary:      The GNU Compiler Atomic Operations Runtime Library
605 License:      GPL-3.0-with-GCC-exception
606 Group:        Development/Languages/C and C++
607
608 %description -n libatomic%{libatomic_sover}%{libatomic_suffix}@variant@
609 The runtime library for atomic operations of the GNU Compiler Collection (GCC).
610
611 %post -n libatomic%{libatomic_sover}%{libatomic_suffix}@variant@
612 /sbin/ldconfig
613
614 %postun -n libatomic%{libatomic_sover}%{libatomic_suffix}@variant@
615 /sbin/ldconfig
616 # PACKAGE-END
617
618
619 %package -n libgcj@base_ver@
620 # LIBJAVA-DELETE-END
621 Summary:      Java Runtime Library for gcc
622 License:      GPL-2.0-with-classpath-exception
623 Group:        System/Libraries
624
625 %description -n libgcj@base_ver@
626 This library is needed if you want to use the GNU Java compiler, gcj.
627 Source code for this package is in gcc.
628
629 %post -n libgcj@base_ver@
630 /sbin/ldconfig
631
632 %postun -n libgcj@base_ver@
633 /sbin/ldconfig
634
635
636 %package -n gcc@base_ver@-java
637 Summary:      The GNU Java Compiler
638 License:        GPL-3.0+
639 Group:        Development/Languages/Java
640 Requires: gcc@base_ver@ = %{version}
641 Requires: libgcj@base_ver@-devel = %{version}-%{release}
642
643 %description -n gcc@base_ver@-java
644 The Java compiler from the GCC-tools-suite.
645
646
647 %package -n libgcj_bc%{libgcj_bc_sover}%{libgcj_bc_suffix}
648 Summary:      Fake library for BC-ABI compatibility.
649 License:        GPL-2.0-with-classpath-exception
650 Group:        Development/Libraries/Java
651 # libgcj_bc is special in that it just contains a symlink to
652 # a proper libgcj version.  So require that library and add
653 # provides for the shlib version as created at link time
654 Requires: libgcj%{libgcj_sover} >= %{version}-%{release}
655 %ifarch x86_64 ia64 ppc64 s390x sparc64 aarch64
656 Provides: libgcj_bc.so.%{libgcj_bc_sover}()(64bit)
657 %else
658 Provides: libgcj_bc.so.%{libgcj_bc_sover}
659 %endif
660
661 %description -n libgcj_bc%{libgcj_bc_sover}%{libgcj_bc_suffix}
662 A fake library that is used at link time only. It ensures that
663 binaries built with the BC-ABI link against a constant SONAME.
664 This way, BC-ABI binaries continue to work if the SONAME underlying
665 libgcj.so changes.
666
667
668 %package -n libgcj@base_ver@-jar
669 Summary:      Java runtime library (jar files).
670 License:        GPL-2.0-with-classpath-exception
671 Group:        Development/Libraries/Java
672
673 %description -n libgcj@base_ver@-jar
674 These are the jar files that go along with the gcj front end to gcc.
675
676
677 %package -n libgcj@base_ver@-devel
678 Summary:      Include Files and Libraries mandatory for Development.
679 License:        GPL-2.0-with-classpath-exception
680 Group:        Development/Libraries/Java
681 Requires: libstdc++@base_ver@-devel = %{version}
682 Requires: libgcj%{libgcj_sover} >= %{version}-%{release}
683 Requires: libgcj_bc%{libgcj_bc_sover} >= %{version}-%{release}
684 Requires: libgcj@base_ver@-jar = %{version}-%{release}
685 Requires: gtk2-devel
686 Requires: libart_lgpl-devel
687 Requires: glibc-devel
688 Requires: zlib-devel
689 %ifarch ia64
690 Requires: libunwind-devel
691 %endif
692
693 %description -n libgcj@base_ver@-devel
694 This package contains all necessary include files and libraries needed
695 to develop applications that require these.
696
697
698 %package -n gcc@base_ver@-gij
699 Summary:      Java Bytecode Interpreter for gcc
700 License:      GPL-2.0-with-classpath-exception
701 Group:        Development/Libraries/Java
702 Requires: libgcj%{libgcj_sover} >= %{version}-%{release}
703
704 %description -n gcc@base_ver@-gij
705 This package contains the java bytecode interpreter gij and related tools.
706
707 # LIBFFI-DELETE-END
708 # PACKAGE-BEGIN
709 %package -n libffi%{libffi_sover}%{libffi_suffix}@variant@
710 Summary:      Foreign Function Interface library
711 License:        BSD-3-Clause
712 Group:        Development/Languages/C and C++
713
714 %description -n libffi%{libffi_sover}%{libffi_suffix}@variant@
715 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
716
717 %post -n libffi%{libffi_sover}%{libffi_suffix}@variant@
718 /sbin/ldconfig
719
720 %postun -n libffi%{libffi_sover}%{libffi_suffix}@variant@
721 /sbin/ldconfig
722 # PACKAGE-END
723
724 # PACKAGE-BEGIN
725 %package -n libffi@base_ver@-devel@variant@
726 Summary:      Foreign Function Interface library development files
727 License:        BSD 3-Clause
728 Group:        Development/Languages/C and C++
729 Requires: libffi%{libffi_sover}@variant@ >= %{version}-%{release}
730
731 %description -n libffi@base_ver@-devel@variant@
732 A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
733 # PACKAGE-END
734
735 %package -n gcc@base_ver@-testresults
736 # GCC-TESTSUITE-DELETE-END
737 Summary:      Testsuite results
738 License:        SUSE-Public-Domain
739 Group:        Development/Languages/C and C++
740
741 %description -n gcc@base_ver@-testresults
742 Results from running the gcc and target library testsuites.
743
744
745 # COMMON-BEGIN
746
747 # Define the canonical target and host architecture
748 #   %gcc_target_arch  is supposed to be the full target triple
749 #   %TARGET_ARCH      is the canonicalized CPU part
750 #   %CONFIGURE_TARGET is the target triple used for --target=
751 %if 0%{?gcc_target_arch:1}
752 %define CONFIGURE_TARGET %{gcc_target_arch}
753 %define TARGET_ARCH %(echo %{gcc_target_arch} | cut -d - -f 1 | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
754 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
755 %define CONFIGURE_TARGET powerpc64-tizen-linux
756 %endif
757 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
758 %define CONFIGURE_TARGET powerpc64-tizen-linux
759 %endif
760 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
761 %define CONFIGURE_TARGET i586-tizen-linux
762 %endif
763 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l"
764 %define CONFIGURE_TARGET armv7l-tizen-linux-gnueabi
765 %endif
766 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
767 %define CONFIGURE_TARGET armv7hl-tizen-linux-gnueabi
768 %endif
769 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
770 %define CONFIGURE_TARGET armv5tel-tizen-linux-gnueabi
771 %endif
772 %else
773 %define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
774 %endif
775 %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
776
777 %define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
778
779 %ifarch ppc
780 %define GCCDIST powerpc64-tizen-linux
781 %else
782 %ifarch %sparc
783 %define GCCDIST sparc64-tizen-linux
784 %else
785 %ifarch %arm
786 %define GCCDIST %{HOST_ARCH}-tizen-linux-gnueabi
787 %else
788 %define GCCDIST %{HOST_ARCH}-tizen-linux
789 %endif
790 %endif
791 %endif
792
793 %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
794 %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
795
796 # COMMON-END
797
798 # Versionspecific directories
799 %define versmainlibdir %{libsubdir}
800 %define versmainlibdirbi32 %{libsubdir}/32
801 %define versmainlibdirbi64 %{libsubdir}/64
802 %ifarch ppc
803 %define versmainlibdirbi32 %{libsubdir}
804 %define versmainlibdirbi64 %{libsubdir}/64
805 %endif
806 %if %{build_primary_64bit}
807 %define versmainlibdirbi %{versmainlibdirbi32}
808 %else
809 %define versmainlibdirbi %{versmainlibdirbi64}
810 %endif
811
812 %define mainlibdir %{_libdir}
813 %define mainlibdirbi32 %{_prefix}/lib
814 %define mainlibdirbi64 %{_prefix}/lib64
815 %if %{build_primary_64bit}
816 %define mainlibdirbi %{mainlibdirbi32}
817 %else
818 %define mainlibdirbi %{mainlibdirbi64}
819 %endif
820
821
822 # Now define a few macros that make it easy to package libs and
823 # related files just to the right package, without caring for the
824 # exact path the files are in.
825 #   %mainlib  package X from all dirs that belong to the main package
826 #   %biarchlib   package X from all dirs that belong to the -32/64bit package
827 %define mainlib() %{mainlibdir}/%1\
828 %{nil}
829 %define biarchlib() %{nil}
830 %if %{biarch}
831 %if !%{separate_biarch}
832 %define mainlib() %{mainlibdir}/%1\
833 %{mainlibdirbi}/%1\
834 %{nil}
835 %else
836 %define biarchlib() %{mainlibdirbi}/%1\
837 %{nil}
838 %endif
839 %endif
840
841 %define versmainlib() %{versmainlibdir}/%1\
842 %{nil}
843 %define versbiarchlib() %{nil}
844 %if %{biarch}
845 %if !%{separate_biarch}
846 %define versmainlib() %{versmainlibdir}/%1\
847 %{versmainlibdirbi}/%1\
848 %{nil}
849 %else
850 %define versbiarchlib() %{versmainlibdirbi}/%1\
851 %{nil}
852 %endif
853 %endif
854
855
856 # COMMON-BEGIN
857
858 %prep
859 %setup -q -n gcc-%{version}
860
861
862 # We are configuring ppc as ppc64 but with switched multilibs.  Adjust
863 # the libstdc++ abi testsuite baseline files accordingly
864 %ifarch ppc
865 if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
866   mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
867   mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \
868         libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/
869   mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \
870         libstdc++-v3/config/abi/post/powerpc64-linux-gnu/
871 fi
872 %endif
873
874 %build
875 # Avoid rebuilding of generated files
876 contrib/gcc_update --touch
877 # Avoid fucking up testsuite results with Java and indirect dispatch
878 export LD_AS_NEEDED=0
879 # Split version file into version used for directories (X.Y) and
880 # version to report with --version (X.Y.Z).
881 # See also gcc-dir-version.patch.
882 # Also decrement the patchlevel version by one
883 if test `cat gcc/DEV-PHASE` == "prerelease"; then
884   ( cat gcc/BASE-VER | cut -d '.' -f 1-2 | tr -d '\n'; echo -n .; cat gcc/BASE-VER | cut -d '.' -f 3 | tr '0123456789' '0012345678' ) > gcc/FULL-VER
885 else
886   mv gcc/BASE-VER gcc/FULL-VER
887 fi
888 cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
889
890 rm -rf obj-%{GCCDIST}
891 mkdir obj-%{GCCDIST}
892 cd obj-%{GCCDIST}
893 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
894 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g' -e 's/-Wmissing-format-attribute//g' -e 's/-fstack-protector//g' -e 's/-ffortify=.//g' -e 's/-Wall//g' -e 's/-m32//g' -e 's/-m64//g'`
895 %ifarch %ix86
896 # -mcpu is superceded by -mtune but -mtune is not supported by
897 # our bootstrap compiler.  -mcpu gives a warning that stops
898 # the build process, so remove it for now.  Also remove all other
899 # -march and -mtune flags.  They are superseeded by proper
900 # default compiler settings now.
901 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-mcpu=i.86//g' -e 's/-march=i.86//g' -e 's/-mtune=i.86//g'`
902 %endif
903 %ifarch s390 s390x
904 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
905 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
906 %endif
907 %if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
908 # Kill all -march/tune/cpu because that screws building the target libs
909 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
910 %endif
911 # Replace 2 spaces by one finally
912 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/  / /g'`
913
914 languages=c
915 %if %{build_cp}
916 languages=$languages,c++
917 %endif
918 %if %{build_objc}
919 languages=$languages,objc
920 %endif
921 %if %{build_fortran}
922 languages=$languages,fortran
923 %endif
924 %if %{build_objcp}
925 languages=$languages,obj-c++
926 %endif
927 %if %{build_java}
928 languages=$languages,java
929 %endif
930 %if %{build_ada}
931 languages=$languages,ada
932 %endif
933
934 J=%{?jobs:%jobs}
935 if test -z "$J"; then
936   J=$(getconf _NPROCESSORS_CONF)
937   JL=$(($J * 2))
938 else
939   test 1 -gt "$J" && J=1
940   JL=$(($(getconf _NPROCESSORS_CONF)*2))
941 fi
942 if test "$J" == "0"; then
943   J=1
944 fi
945 if test "$JL" == "0"; then
946   JL=1
947 fi
948 PARALLEL="-j$J -l$JL"
949
950 # we don't want some miscompiles in the testsuite, or some fault in
951 # the compiler to kill the machine.  Hence we limit the amount of memory
952 # by the physical RAM plus half of swap
953 #MEM=$(free -m | awk '/^Mem:/ {print $2}')
954 #SWAP=$(free -m | awk '/^Swap:/ {print $2}')
955 #ulimit -v $(((MEM + SWAP/2)*1024))
956
957 # In general we want to ship release checking enabled compilers
958 # and run BETA with checking enabled.
959 #ENABLE_CHECKING="--enable-checking=yes"
960 ENABLE_CHECKING="--enable-checking=release"
961
962 # Work around tail/head -1 changes
963 export _POSIX2_VERSION=199209
964
965 # configure tries to parse include/features.h to detect
966 # if glibc supports SSP.  When cross compiling we would need
967 # to install a cross glibc, which we don't, or make the whole
968 # thing point to the native glibc, which is in /, hence the
969 # --with-build-sysroot=/
970
971 %if %{build_ada}
972 # Using the host gnatmake like
973 #   CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
974 #   GNATMAKE="gnatmake%{hostsuffix}"
975 # doesn't work due to PR33857, so an un-suffixed gnatmake has to be
976 # available
977 mkdir -p host-tools/bin
978 cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
979 cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
980 cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
981 cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
982 ln -sf /usr/%{_lib} host-tools/%{_lib}
983 export PATH="`pwd`/host-tools/bin:$PATH"
984 %endif
985 #%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
986 #%else
987 #       --enable-threads=posix \
988 #%endif
989 #       --enable-shared \
990 %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl"
991 # temporary workaround for a miscompilation of hash functions in java code
992 GCJ_EXTRA_FLAGS="-marm"
993 %endif
994 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
995 TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \
996 ../configure \
997         --prefix=%{_prefix} \
998         --infodir=%{_infodir} \
999         --mandir=%{_mandir} \
1000         --libdir=%{_libdir} \
1001         --libexecdir=%{_libdir} \
1002     --disable-bootstrap \
1003         --enable-languages=$languages \
1004         $ENABLE_CHECKING \
1005         --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
1006         --enable-ssp \
1007         --disable-libssp \
1008         --disable-plugin \
1009         --with-bugurl="http://bugs.tizen.org/" \
1010         --with-pkgversion="Tizen" \
1011 %if !%{build_libjava}
1012         --disable-libgcj \
1013 %else
1014         --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
1015         --with-ecj-jar=%{libsubdir}/ecj.jar \
1016         --disable-java-awt \
1017 %if !%{biarch_libjava}
1018         --disable-libjava-multilib \
1019 %endif
1020 %endif
1021 %if !%{build_with_mudflap}
1022         --disable-libmudflap \
1023 %endif
1024         --with-slibdir=/%{_lib} \
1025         --with-system-zlib \
1026         --enable-__cxa_atexit \
1027         --enable-libstdcxx-allocator=new \
1028         --disable-libstdcxx-pch \
1029         --enable-version-specific-runtime-libs \
1030         --enable-linker-build-id \
1031 %if 0%{?gcc_target_arch:1}
1032 %if 0%{?gcc_icecream:1}
1033         --with-build-sysroot=/ \
1034         --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
1035         --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
1036         --enable-linux-futex \
1037 %endif
1038 %if 0%{?canonical_target:1}
1039         --with-build-time-tools=/usr/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
1040 %endif
1041 %if 0%{?sysroot:1}
1042         --with-sysroot=%sysroot \
1043 %endif
1044 %if 0%{?build_static:1}
1045         --disable-shared \
1046 %endif
1047 %if "%{TARGET_ARCH}" == "spu"
1048         --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
1049         --with-newlib \
1050 %endif
1051         --disable-nls \
1052         --target=%{CONFIGURE_TARGET} \
1053 %else
1054         --program-suffix=%{binsuffix} \
1055         --enable-linux-futex \
1056 %ifarch ia64
1057         --with-system-libunwind \
1058 %else
1059         --without-system-libunwind \
1060 %endif
1061 %endif
1062 %if "%{TARGET_ARCH}" == "armv5tel"
1063         --with-arch=armv5te \
1064         --with-float=soft \
1065         --with-mode=arm \
1066         --with-abi=aapcs-linux \
1067         --disable-sjlj-exceptions \
1068 %endif
1069 %if "%{TARGET_ARCH}" == "armv7l" 
1070         --with-arch=armv7-a \
1071         --with-tune=cortex-a9 \
1072     --with-float=soft \
1073         --with-fpu=vfpv3-d16 \
1074         --disable-sjlj-exceptions \
1075 %endif
1076 %if  "%{TARGET_ARCH}" == "armv7hl"
1077         --with-arch=armv7-a \
1078         --with-tune=cortex-a9 \
1079         --with-float=hard \
1080         --with-abi=aapcs-linux \
1081         --with-fpu=vfpv3-d16 \
1082         --disable-sjlj-exceptions \
1083 %endif
1084 %if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64"
1085 %if "%{TARGET_ARCH}" == "powerpc"
1086         --with-cpu=default32 \
1087 %endif
1088         --with-cpu-64=power4 \
1089         --enable-secureplt \
1090         --with-long-double-128 \
1091 %endif
1092 %if "%{TARGET_ARCH}" == "sparc64"
1093         --with-cpu=ultrasparc \
1094         --with-long-double-128 \
1095 %endif
1096 %if "%{TARGET_ARCH}" == "sparc"
1097         --with-cpu=v8 \
1098         --with-long-double-128 \
1099 %endif
1100 %if "%{TARGET_ARCH}" == "i586"
1101         --with-arch-32=i586 \
1102         --with-tune=generic \
1103 %endif
1104 %if "%{TARGET_ARCH}" == "x86_64"
1105         --with-arch-32=i586 \
1106         --with-tune=generic \
1107 %endif
1108 %if "%{TARGET_ARCH}" == "s390"
1109         --with-tune=z196 --with-arch=z10 \
1110         --with-long-double-128 \
1111         --enable-decimal-float \
1112 %endif
1113 %if "%{TARGET_ARCH}" == "s390x"
1114         --with-tune=z196 --with-arch=z10 \
1115         --with-long-double-128 \
1116         --enable-decimal-float \
1117 %endif
1118         --build=%{GCCDIST}
1119
1120 # COMMON-END
1121
1122 %if 0%{?building_libffi:1}
1123 make stage1-bubble $PARALLEL
1124 make all-target-libffi $PARALLEL
1125 %else
1126 STAGE1_FLAGS="-g"
1127 # Only run profiled bootstrap on archs where it works
1128 #%ifarch %ix86 x86_64 ppc ppc64 ia64
1129 #make profiledbootstrap-lean STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
1130 #%else
1131 #make bootstrap-lean STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
1132 make STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
1133 #%endif
1134 #make -C gcc proto
1135 make info
1136 %if 0%{?run_tests:1}
1137 echo "Run testsuite"
1138 (make -C %{GCCDIST}/libstdc++-v3 check-abi || true)
1139 mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.log %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.log
1140 mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.sum %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.sum
1141 # asan needs a whole shadow address space
1142 ulimit -v unlimited || true
1143 make -k check $PARALLEL || true
1144 mkdir ../testresults
1145 ../contrib/test_summary | tee ../testresults/test_summary.txt
1146 %endif
1147 %endif
1148
1149 %install
1150 export NO_BRP_CHECK_BYTECODE_VERSION=true
1151 cd obj-%{GCCDIST}
1152 # GCC-TESTSUITE-DELETE-BEGIN
1153 # Work around tail/head -1 changes
1154 export _POSIX2_VERSION=199209
1155 export LIBRARY_PATH=$RPM_BUILD_ROOT%{libsubdir}:$RPM_BUILD_ROOT%{mainlibdirbi}
1156 %if 0%{?building_libffi:1}
1157 make -C %{GCCDIST}/libffi install DESTDIR=$RPM_BUILD_ROOT
1158 %else
1159 %if 0%{?building_libjava:1}
1160 make -C %{GCCDIST}/libjava install DESTDIR=$RPM_BUILD_ROOT
1161 make -C gcc java.install-man DESTDIR=$RPM_BUILD_ROOT
1162 make -C gcc java.install-common DESTDIR=$RPM_BUILD_ROOT
1163 make -C gcc install-common DESTDIR=$RPM_BUILD_ROOT COMPILERS='jc1$(exeext) jvgenmain$(exeext)'
1164 # install-common also installs collect2, gcov and the g++ and gfortran driver
1165 %if %{build_cp}
1166 rm $RPM_BUILD_ROOT%{_prefix}/bin/g++%{binsuffix}
1167 %endif
1168 %if %{build_fortran}
1169 rm $RPM_BUILD_ROOT%{_prefix}/bin/gfortran%{binsuffix}
1170 %endif
1171 rm $RPM_BUILD_ROOT%{_prefix}/bin/gcov%{binsuffix}
1172 rm $RPM_BUILD_ROOT%{libsubdir}/collect2
1173 %else
1174 make install DESTDIR=$RPM_BUILD_ROOT
1175 %if %{build_java}
1176 make -C gcc java.uninstall DESTDIR=$RPM_BUILD_ROOT
1177 make -C gcc java.install-info DESTDIR=$RPM_BUILD_ROOT
1178 rm $RPM_BUILD_ROOT%{_prefix}/bin/jcf-dump%{binsuffix}
1179 rm $RPM_BUILD_ROOT%{_mandir}/man1/jcf-dump%{binsuffix}.1
1180 rm $RPM_BUILD_ROOT%{libsubdir}/jc1
1181 rm $RPM_BUILD_ROOT%{libsubdir}/jvgenmain
1182 %endif
1183 %endif
1184 %endif
1185
1186 # Remove libffi installed files if we did not want to build it
1187 %if !0%{?building_libffi:1}
1188 rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.*
1189 %if %{biarch}
1190   rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.*
1191 %endif
1192 rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h
1193 rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h
1194 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi%{binsuffix}.3*
1195 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_call%{binsuffix}.3*
1196 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_prep_cif%{binsuffix}.3*
1197 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_prep_cif_var%{binsuffix}.3*
1198 %endif
1199
1200 # Remove some useless .la files
1201 for lib in libobjc libgfortran libgfortranbegin libquadmath libcaf_single \
1202     libmudflap libmudflapth libgomp libstdc++ libsupc++ libgcj-tools libgij \
1203     libasan libatomic libitm libtsan; do
1204   rm -f $RPM_BUILD_ROOT%{versmainlibdir}/$lib.la
1205 %if %{biarch}
1206   rm -f $RPM_BUILD_ROOT%{versmainlibdirbi}/$lib.la
1207 %endif
1208 done
1209
1210 mkdir -p $RPM_BUILD_ROOT%{_libdir}
1211 %if %{biarch}
1212 %if %{build_primary_64bit}
1213 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib
1214 %else
1215 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib64
1216 %endif
1217 %endif
1218
1219 # LIBFFI-DELETE-BEGIN
1220 # LIBJAVA-DELETE-BEGIN
1221 %if %{build_cp}
1222 # Merge multilib c++config.h to allow omitting the duplicate and
1223 # identical other arch specific headers
1224 dir_ml=
1225 cxxconfig="`find %{GCCDIST}/libstdc++-v3/include -name c++config.h`"
1226 for i in `find %{GCCDIST}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do
1227   if ! diff -up $cxxconfig $i; then
1228     file_32=x
1229     file_64=x
1230     case $i in
1231       %{GCCDIST}/32/*)
1232         file_32=$i
1233         file_64=$cxxconfig
1234         dir_ml=32
1235         ;;
1236       %{GCCDIST}/64/*)
1237         file_32=$cxxconfig
1238         file_64=$i
1239         dir_ml=64
1240         ;;
1241     esac
1242     if ! ( test -f "$file_32" && test -f "$file_64" ); then
1243       echo "Urgs?"
1244       exit 1
1245     fi
1246     
1247     cat > $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/bits/c++config.h <<EOF
1248 #ifndef _CPP_CPPCONFIG_WRAPPER
1249 #define _CPP_CPPCONFIG_WRAPPER 1
1250 #include <bits/wordsize.h>
1251 #if __WORDSIZE == 32
1252 `cat $file_32`
1253 #else
1254 `cat $file_64`
1255 #endif
1256 #endif
1257 EOF
1258     break
1259   fi
1260 done
1261 rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/[36]*
1262 if ! test -z "$dir_ml"; then
1263   ln -s . $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/$dir_ml
1264 fi
1265 %endif
1266 # LIBJAVA-DELETE-END
1267
1268 # move shared libs from versionspecific dir to main libdir
1269 for libname in \
1270 %if 0%{?building_libjava:1}
1271   libgcj libgij libgcj-tools \
1272 %else
1273 %if %{build_fortran}
1274   libgfortran \
1275 %ifarch %quadmath_arch
1276   libquadmath \
1277 %endif
1278 %endif
1279 %if %{build_objc}
1280   libobjc \
1281 %endif
1282 %if %{build_cp}
1283   libstdc++ \
1284 %endif
1285   libgomp \
1286 %ifarch %atomic_arch
1287   libatomic \
1288 %endif
1289 %ifarch %itm_arch
1290   libitm \
1291 %endif
1292 %ifarch %asan_arch
1293   libasan \
1294 %endif
1295 %ifarch %tsan_arch
1296   libtsan \
1297 %endif
1298 %if %{build_with_mudflap}
1299   libmudflap libmudflapth \
1300 %endif
1301 %endif
1302     ; do
1303   for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name $libname.so.*`; do
1304     mv $lib $RPM_BUILD_ROOT%{mainlibdir}/
1305   done
1306   ln -sf %{mainlibdir}/`readlink $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'`  \
1307          $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so
1308 %if %{biarch}
1309   if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then
1310     for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name "$libname.so.*"`; do
1311       mv $lib $RPM_BUILD_ROOT%{mainlibdirbi}/
1312     done
1313     ln -sf %{mainlibdirbi}/`readlink $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'`  \
1314          $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so
1315   fi
1316 %endif
1317 done
1318 # FIXME, tsan is not multilib
1319 %ifarch %tsan_arch
1320 %if %{biarch}
1321 rm -f $RPM_BUILD_ROOT%{versmainlibdirbi}/libtsan.so
1322 %endif
1323 %endif
1324 %if %{build_cp}
1325 %if !0%{?building_libjava:1}
1326 # And we want to move the shlib gdb pretty printers to a more sane
1327 # place so ldconfig does not complain
1328 mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}
1329 mv $RPM_BUILD_ROOT%{mainlibdir}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/
1330 sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/libstdc++.so.*-gdb.py
1331 %if %{biarch}
1332   if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then
1333     mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}
1334     mv $RPM_BUILD_ROOT%{mainlibdirbi}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/
1335     sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/libstdc++.so.*-gdb.py
1336   fi
1337 %endif
1338 %endif
1339 %endif
1340 %if 0%{?building_libjava:1}
1341 # libgcj_bc is special as the .so file is actually a different
1342 # library as the library refered to by the SONAME which should
1343 # be a simple link to our libgcj.
1344 for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name libgcj_bc.so.*`; do
1345   rm $lib
1346 done
1347 ln -s libgcj.so.%{libgcj_sover} $RPM_BUILD_ROOT%{mainlibdir}/libgcj_bc.so.%{libgcj_bc_sover}
1348 %if %{biarch_libjava}
1349 for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name libgcj_bc.so.*`; do
1350   rm $lib
1351 done
1352 ln -s libgcj.so.%{libgcj_sover} $RPM_BUILD_ROOT%{mainlibdirbi}/libgcj_bc.so.%{libgcj_bc_sover}
1353 %endif
1354 %endif
1355
1356 # LIBJAVA-DELETE-BEGIN
1357 # Move libgcc_s around
1358 if test -L $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so; then
1359   rm -f $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so
1360   ln -sf /%{_lib}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdir}/libgcc_s.so
1361 else
1362   mv $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdir}/
1363 fi
1364 chmod a+x $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so.%{libgcc_s}
1365 %if %{biarch}
1366 %if %{build_primary_64bit}
1367 if test -L $RPM_BUILD_ROOT/lib/libgcc_s.so; then
1368   rm -f $RPM_BUILD_ROOT/lib/libgcc_s.so
1369   ln -sf /lib/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s.so
1370 else
1371   mv $RPM_BUILD_ROOT/lib/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/
1372 fi
1373 ln -sf %{versmainlibdirbi32}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s_32.so
1374 chmod a+x $RPM_BUILD_ROOT/lib/libgcc_s.so.%{libgcc_s}
1375 %else
1376 # 32-bit biarch systems
1377 if test -L $RPM_BUILD_ROOT/lib64/libgcc_s.so; then
1378   rm -f $RPM_BUILD_ROOT/lib64/libgcc_s.so
1379   ln -sf /lib64/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s.so
1380 else
1381   mv $RPM_BUILD_ROOT/lib64/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/
1382 fi
1383 ln -sf %{versmainlibdirbi64}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s_64.so
1384 chmod a+x $RPM_BUILD_ROOT/lib64/libgcc_s.so.%{libgcc_s}
1385 %endif
1386 %endif
1387
1388 # LIBJAVA-DELETE-END
1389 # LIBFFI-DELETE-END
1390
1391 %if %{build_ada}
1392 mv $RPM_BUILD_ROOT%{libsubdir}/adalib/lib*-*.so $RPM_BUILD_ROOT%{_libdir}
1393 ln -sf %{_libdir}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnarl.so
1394 ln -sf %{_libdir}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnat.so
1395 chmod a+x $RPM_BUILD_ROOT%{_libdir}/libgna*-*.so
1396 %if %{biarch}
1397 mv $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/lib*-*.so $RPM_BUILD_ROOT%{mainlibdirbi}/
1398 ln -sf %{mainlibdirbi}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
1399 ln -sf %{mainlibdirbi}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
1400 chmod a+x $RPM_BUILD_ROOT%{mainlibdirbi}/libgna*-*.so
1401 %endif
1402 %endif
1403
1404 rm -f $RPM_BUILD_ROOT%{_prefix}/bin/c++%{binsuffix}
1405
1406 # Remove some crap from the .la files:
1407 for l in `find $RPM_BUILD_ROOT -name '*.la'`; do
1408   echo "changing $l"
1409 # -e '/^dependency_libs/s|%{libsubdir}/\([^.]*\)\.la |%{_libdir}/\1\.la |g'
1410   sed -e '/^dependency_libs/s| -L%{_builddir}/[^ ]*||g' \
1411       -e '/^dependency_libs/s| -L/usr/%{GCCDIST}/bin||g' \
1412       -e '/^dependency_libs/s|-lm \(-lm \)*|-lm |' \
1413       -e '/^dependency_libs/s|-L[^ ]* ||g' \
1414 %if %{biarch}
1415 %if %{build_primary_64bit}
1416       -e '/^libdir/s|%{_libdir}/32|%{_prefix}/lib|' \
1417       -e '/^libdir/s|lib64/\.\./||' \
1418 %else
1419       -e '/^libdir/s|%{_libdir}/64|%{_prefix}/lib64|' \
1420 %endif
1421 %endif
1422       < $l  > $l.new
1423   mv $l.new $l
1424 done
1425
1426 # GCC-TESTSUITE-DELETE-END
1427 %if 0%{?run_tests:1} 
1428 cp `find . -name "*.sum"` ../testresults/
1429 cp `find . -name "*.log"  \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
1430 chmod 644 ../testresults/*
1431 %endif
1432 # GCC-TESTSUITE-DELETE-BEGIN
1433 # LIBFFI-DELETE-BEGIN
1434 %if %{build_cp}
1435 # Find C++ and Java headers
1436 find $RPM_BUILD_ROOT%{_prefix}/include/c++ \
1437   -regex ".*/\(org\|gcj\|gnu\|java\|javax\)" -prune \
1438   -o \( -type d -printf "%%%%dir " , \
1439         -printf "%{_prefix}/include/c++/%%P\n" \) > ../c++-headers
1440 %endif
1441 # LIBFFI-DELETE-END
1442 # Remove files that we do not need to clean up filelist
1443 rm -f $RPM_BUILD_ROOT%{_prefix}/bin/%{GCCDIST}-*
1444 rm -rf $RPM_BUILD_ROOT%{libsubdir}/install-tools
1445 #rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
1446 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/root
1447 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/curses.h
1448 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-*
1449 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux
1450 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sound
1451 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/features.h
1452 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/ncurses.h
1453 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/stdio.h
1454 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/zutil.h
1455 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/X11
1456 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits
1457 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/obstack.h
1458 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/spe.h
1459 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/tgmath.h
1460 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits
1461 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sys
1462 # no plugins
1463 rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin
1464 rm -f  $RPM_BUILD_ROOT%{_infodir}/dir
1465 rm -f  $RPM_BUILD_ROOT%{_prefix}/bin/gccbug%{binsuffix}
1466
1467 %if !0%{?building_libjava:1}%{?building_libffi:1}
1468 # delete compile flag tracking from crt files
1469 crt_list=$RPM_BUILD_ROOT%{versmainlibdir}/crt*.o
1470 %if %{biarch}
1471 %if %{build_primary_64bit}
1472 crt32_list=$RPM_BUILD_ROOT%{versmainlibdirbi32}/crt*.o
1473 %else
1474 crt64_list=$RPM_BUILD_ROOT%{versmainlibdirbi64}/crt*.o
1475 %endif
1476 %endif
1477 for o in $crt_list $crt32_list $crt64_list; do
1478   objcopy -R ".comment.SUSE.OPTs" $o
1479 done
1480 %endif
1481
1482 %if 0%{?building_libjava:1}
1483 # gcj -static doesn't work properly anyway, unless using --whole-archive
1484 # let's save the space instead.
1485 find $RPM_BUILD_ROOT -name libgcj.a \
1486         -o -name libgcj-tools.a \
1487         -o -name libgij.a \
1488         -o -name libjvm.a \
1489         -o -name libgcj_bc.a \
1490   | xargs rm -f
1491
1492 find $RPM_BUILD_ROOT -name libgcj.spec | xargs \
1493   sed -i -e 's/lib: /&%%{static:%%eJava programs cannot be linked statically}/'
1494
1495 # security files have broken install locations, also they cause conflicts
1496 # between libgcj versions.  Simply delete them here, libgcj will use its
1497 # defaults in this case (which is what these files contain anyway).
1498 rm $RPM_BUILD_ROOT%{_libdir}/logging.properties
1499 rm -r $RPM_BUILD_ROOT%{_libdir}/security
1500 %endif
1501
1502 %if 0%{?building_libffi:1}
1503 # Move libffi headers, remove empty libffi libtool file
1504 mkdir -p $RPM_BUILD_ROOT%{_prefix}/include
1505 mv $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h $RPM_BUILD_ROOT%{_prefix}/include/
1506 mv $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h $RPM_BUILD_ROOT%{_prefix}/include/
1507 rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.la
1508 %if %{biarch}
1509 rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.la
1510 %endif
1511 # Generate a simple pkg-config file
1512 mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig
1513 echo -e 'Name: libffi\nVersion: 3.0.9\nDescription: libffi\nLibs: -lffi' > $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libffi.pc
1514 %endif
1515
1516 %if %{build_java}
1517 %if !%{build_libjava}
1518 rm $RPM_BUILD_ROOT%{_mandir}/man1/jv-convert%{binsuffix}.1
1519 rm $RPM_BUILD_ROOT%{_mandir}/man1/gcj-dbtool%{binsuffix}.1
1520 rm $RPM_BUILD_ROOT%{_mandir}/man1/gij%{binsuffix}.1
1521 rm $RPM_BUILD_ROOT%{_mandir}/man1/grmic%{binsuffix}.1
1522 rm $RPM_BUILD_ROOT%{_mandir}/man1/gc-analyze%{binsuffix}.1
1523 rm $RPM_BUILD_ROOT%{_mandir}/man1/aot-compile%{binsuffix}.1
1524 rm $RPM_BUILD_ROOT%{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1
1525 %endif
1526 rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/aotcompile.py
1527 rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/classfile.py
1528 %endif
1529 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
1530 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
1531 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
1532 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
1533 %if %{biarch}
1534 %if %{build_primary_64bit}
1535 rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libiberty.a
1536 %else
1537 rm -f $RPM_BUILD_ROOT%{_prefix}/lib64/libiberty.a
1538 %endif
1539 %endif
1540 rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.a
1541 rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.la
1542
1543 # LIBFFI-DELETE-BEGIN
1544 %if 0%{?building_libjava:1}
1545 # For building libjava only we need to delete other info docs
1546 rm $RPM_BUILD_ROOT%{_infodir}/cp-tools.info*
1547 # Remove stale manpages for binaries we do not build
1548 rm $RPM_BUILD_ROOT%{_mandir}/man1/gjdoc%{binsuffix}.1
1549 # For building the java frontend we need to copy the ecj jar
1550 mkdir -p $RPM_BUILD_ROOT%{libsubdir}
1551 cp $RPM_SOURCE_DIR/ecj.jar $RPM_BUILD_ROOT%{libsubdir}
1552 %else
1553 # For regular build, some info files do not get renamed properly.
1554 # Do so here.
1555 mv $RPM_BUILD_ROOT%{_infodir}/libgomp.info $RPM_BUILD_ROOT%{_infodir}/libgomp%{binsuffix}.info
1556 %ifarch %itm_arch
1557 mv $RPM_BUILD_ROOT%{_infodir}/libitm.info $RPM_BUILD_ROOT%{_infodir}/libitm%{binsuffix}.info
1558 %endif
1559 %if %{build_fortran} 
1560 %ifarch %quadmath_arch
1561 mv $RPM_BUILD_ROOT%{_infodir}/libquadmath.info $RPM_BUILD_ROOT%{_infodir}/libquadmath%{binsuffix}.info
1562 %endif
1563 %endif
1564 %if %{build_ada}
1565 mv $RPM_BUILD_ROOT%{_infodir}/gnat-style.info $RPM_BUILD_ROOT%{_infodir}/gnat-style%{binsuffix}.info
1566 mv $RPM_BUILD_ROOT%{_infodir}/gnat_rm.info $RPM_BUILD_ROOT%{_infodir}/gnat_rm%{binsuffix}.info
1567 mv $RPM_BUILD_ROOT%{_infodir}/gnat_ugn.info $RPM_BUILD_ROOT%{_infodir}/gnat_ugn%{binsuffix}.info
1568 %endif
1569 %endif
1570
1571 # LIBJAVA-DELETE-BEGIN
1572 cd ..
1573 %find_lang cpplib%{binsuffix}
1574 %find_lang gcc%{binsuffix}
1575 cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc@base_ver@-locale.lang
1576
1577
1578 %post info
1579 %install_info --info-dir=%{_infodir} %{_infodir}/cpp%{binsuffix}.info.gz
1580 %install_info --info-dir=%{_infodir} %{_infodir}/cppinternals%{binsuffix}.info.gz
1581 %install_info --info-dir=%{_infodir} %{_infodir}/gcc%{binsuffix}.info.gz
1582 %install_info --info-dir=%{_infodir} %{_infodir}/gccint%{binsuffix}.info.gz
1583 %install_info --info-dir=%{_infodir} %{_infodir}/gccinstall%{binsuffix}.info.gz
1584 %install_info --info-dir=%{_infodir} %{_infodir}/libgomp%{binsuffix}.info.gz
1585 %if %{build_fortran} 
1586 %install_info --info-dir=%{_infodir} %{_infodir}/gfortran%{binsuffix}.info.gz
1587 %ifarch %quadmath_arch
1588 %install_info --info-dir=%{_infodir} %{_infodir}/libquadmath%{binsuffix}.info.gz
1589 %endif
1590 %endif
1591 %if %{build_java}
1592 %install_info --info-dir=%{_infodir} %{_infodir}/gcj%{binsuffix}.info.gz
1593 %endif
1594 %if %{build_ada}
1595 %install_info --info-dir=%{_infodir} %{_infodir}/gnat-style%{binsuffix}.info.gz
1596 %install_info --info-dir=%{_infodir} %{_infodir}/gnat_rm%{binsuffix}.info.gz
1597 %install_info --info-dir=%{_infodir} %{_infodir}/gnat_ugn%{binsuffix}.info.gz
1598 %endif
1599
1600 %postun info
1601 %install_info_delete --info-dir=%{_infodir} %{_infodir}/cpp%{binsuffix}.info.gz
1602 %install_info_delete --info-dir=%{_infodir} %{_infodir}/cppinternals%{binsuffix}.info.gz
1603 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gcc%{binsuffix}.info.gz
1604 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gccint%{binsuffix}.info.gz
1605 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gccinstall%{binsuffix}.info.gz
1606 %install_info_delete --info-dir=%{_infodir} %{_infodir}/libgomp%{binsuffix}.info.gz
1607 %if %{build_fortran}
1608 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gfortran%{binsuffix}.info.gz
1609 %ifarch %quadmath_arch
1610 %install_info_delete --info-dir=%{_infodir} %{_infodir}/libquadmath%{binsuffix}.info.gz
1611 %endif
1612 %endif
1613 %if %{build_java}
1614 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gcj%{binsuffix}.info.gz
1615 %endif
1616 %if %{build_ada}
1617 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gnat-style%{binsuffix}.info.gz
1618 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gnat_rm%{binsuffix}.info.gz
1619 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gnat_ugn%{binsuffix}.info.gz
1620 %endif
1621
1622 %files
1623 %defattr(-,root,root)
1624 %dir %{_libdir}/gcc
1625 %dir %{_libdir}/gcc/%{GCCDIST}
1626 %dir %{libsubdir}
1627 %dir %{libsubdir}/include
1628 %dir %{libsubdir}/include-fixed
1629 %if %{biarch}
1630 %if %{build_primary_64bit}
1631 %dir %{libsubdir}/32
1632 %else
1633 %dir %{libsubdir}/64
1634 %endif
1635 %endif
1636 %{_prefix}/bin/gcc%{binsuffix}
1637 %{_prefix}/bin/gcov%{binsuffix}
1638 %{_prefix}/bin/gcc-ar%{binsuffix}
1639 %{_prefix}/bin/gcc-nm%{binsuffix}
1640 %{_prefix}/bin/gcc-ranlib%{binsuffix}
1641 %{libsubdir}/collect2
1642 %{libsubdir}/lto1
1643 %{libsubdir}/lto-wrapper
1644 %{libsubdir}/liblto_plugin.so*
1645 %{libsubdir}/include-fixed/README
1646 %{libsubdir}/include-fixed/limits.h
1647 %{libsubdir}/include-fixed/syslimits.h
1648 %{libsubdir}/include/omp.h
1649 %{libsubdir}/include/float.h
1650 %{libsubdir}/include/iso646.h
1651 %{libsubdir}/include/stdarg.h
1652 %{libsubdir}/include/stdbool.h
1653 %{libsubdir}/include/stdfix.h
1654 %{libsubdir}/include/stddef.h
1655 %{libsubdir}/include/unwind.h
1656 %{libsubdir}/include/varargs.h
1657 %{libsubdir}/include/stdint.h
1658 %{libsubdir}/include/stdint-gcc.h
1659 %{libsubdir}/include/stdnoreturn.h
1660 %{libsubdir}/include/stdalign.h
1661 %ifarch %sparc
1662 %{libsubdir}/include/visintrin.h
1663 %endif
1664 %ifarch ppc ppc64
1665 %{libsubdir}/include/altivec.h
1666 %{libsubdir}/include/ppc-asm.h
1667 %{libsubdir}/include/paired.h
1668 %{libsubdir}/include/ppu_intrinsics.h
1669 %{libsubdir}/include/si2vmx.h
1670 %{libsubdir}/include/spe.h
1671 %{libsubdir}/include/spu2vmx.h
1672 %{libsubdir}/include/vec_types.h
1673 %endif
1674 %ifarch ia64
1675 %{libsubdir}/include/ia64intrin.h
1676 %endif
1677 %ifarch aarch64
1678 %{libsubdir}/include/arm_neon.h
1679 %endif
1680 %ifarch %arm
1681 %{libsubdir}/include/mmintrin.h
1682 %{libsubdir}/include/arm_neon.h
1683 %{libsubdir}/include/unwind-arm-common.h
1684 %endif
1685 %ifarch %ix86 x86_64
1686 %{libsubdir}/include/cross-stdarg.h
1687 %{libsubdir}/include/cpuid.h
1688 %{libsubdir}/include/mm3dnow.h
1689 %{libsubdir}/include/mmintrin.h
1690 %{libsubdir}/include/ammintrin.h
1691 %{libsubdir}/include/bmmintrin.h
1692 %{libsubdir}/include/emmintrin.h
1693 %{libsubdir}/include/immintrin.h
1694 %{libsubdir}/include/avxintrin.h
1695 %{libsubdir}/include/pmmintrin.h
1696 %{libsubdir}/include/xmmintrin.h
1697 %{libsubdir}/include/tmmintrin.h
1698 %{libsubdir}/include/nmmintrin.h
1699 %{libsubdir}/include/smmintrin.h
1700 %{libsubdir}/include/wmmintrin.h
1701 %{libsubdir}/include/x86intrin.h
1702 %{libsubdir}/include/ia32intrin.h
1703 %{libsubdir}/include/mm_malloc.h
1704 %{libsubdir}/include/fma4intrin.h
1705 %{libsubdir}/include/xopintrin.h
1706 %{libsubdir}/include/lwpintrin.h
1707 %{libsubdir}/include/popcntintrin.h
1708 %{libsubdir}/include/bmiintrin.h
1709 %{libsubdir}/include/tbmintrin.h
1710 %{libsubdir}/include/avx2intrin.h
1711 %{libsubdir}/include/bmi2intrin.h
1712 %{libsubdir}/include/fmaintrin.h
1713 %{libsubdir}/include/lzcntintrin.h
1714 %{libsubdir}/include/f16cintrin.h
1715 %{libsubdir}/include/adxintrin.h
1716 %{libsubdir}/include/fxsrintrin.h
1717 %{libsubdir}/include/prfchwintrin.h
1718 %{libsubdir}/include/rdseedintrin.h
1719 %{libsubdir}/include/rtmintrin.h
1720 %{libsubdir}/include/xsaveintrin.h
1721 %{libsubdir}/include/xsaveoptintrin.h
1722 %{libsubdir}/include/xtestintrin.h
1723 %endif
1724 %if %{build_with_mudflap}
1725 %{libsubdir}/include/mf-runtime.h
1726 %endif
1727 %versmainlib *crt*.o
1728 %versmainlib libgcc*.a
1729 %versmainlib libgcov.a
1730 %versmainlib libgcc_s*.so
1731 %if %{build_with_mudflap}
1732 %versmainlib libmudflap.a
1733 %versmainlib libmudflap.so
1734 %versmainlib libmudflapth.a
1735 %versmainlib libmudflapth.so
1736 %endif
1737 %versmainlib libgomp.so
1738 %versmainlib libgomp.a
1739 %versmainlib libgomp.spec
1740 %ifarch %itm_arch
1741 %versmainlib libitm.so
1742 %versmainlib libitm.a
1743 %versmainlib libitm.spec
1744 %endif
1745 %ifarch %atomic_arch
1746 %versmainlib libatomic.so
1747 %versmainlib libatomic.a
1748 %endif
1749 %ifarch %asan_arch
1750 %versmainlib libasan.so
1751 %versmainlib libasan.a
1752 %versmainlib libasan_preinit.o
1753 %endif
1754 %ifarch %tsan_arch
1755 %versmainlib libtsan.so
1756 %versmainlib libtsan.a
1757 %endif
1758 %doc %{_mandir}/man1/gcc%{binsuffix}.1.gz
1759 %doc %{_mandir}/man1/gcov%{binsuffix}.1.gz
1760
1761 %if %{separate_biarch}
1762 %files -n gcc@base_ver@%{separate_biarch_suffix}
1763 %defattr(-,root,root)
1764 %versbiarchlib *crt*.o
1765 %versbiarchlib libgcc*.a
1766 %versbiarchlib libgcov.a
1767 %versbiarchlib libgcc_s*.so
1768 %if %{build_with_mudflap}
1769 %versbiarchlib libmudflap.a
1770 %versbiarchlib libmudflap.so
1771 %versbiarchlib libmudflapth.a
1772 %versbiarchlib libmudflapth.so
1773 %endif
1774 %versbiarchlib libgomp.so
1775 %versbiarchlib libgomp.a
1776 %versbiarchlib libgomp.spec
1777 %ifarch %itm_arch
1778 %versbiarchlib libitm.so
1779 %versbiarchlib libitm.a
1780 %versbiarchlib libitm.spec
1781 %endif
1782 %ifarch %atomic_arch
1783 %versbiarchlib libatomic.a
1784 %versbiarchlib libatomic.so
1785 %endif
1786 %ifarch %asan_arch
1787 %versbiarchlib libasan.a
1788 %versbiarchlib libasan.so
1789 %versbiarchlib libasan_preinit.o
1790 %endif
1791 %if 0
1792 %ifarch %tsan_arch
1793 %versbiarchlib libtsan.a
1794 %versbiarchlib libtsan.so
1795 %endif
1796 %endif
1797 %endif
1798
1799 %files locale -f gcc@base_ver@-locale.lang
1800
1801 %files -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale
1802
1803 %if %{build_cp}
1804 %files c++
1805 %defattr(-,root,root)
1806 %dir %{_libdir}/gcc
1807 %dir %{_libdir}/gcc/%{GCCDIST}
1808 %dir %{libsubdir}
1809 %{_prefix}/bin/g++%{binsuffix}
1810 %doc %{_mandir}/man1/g++%{binsuffix}.1.gz
1811 %{libsubdir}/cc1plus
1812
1813 %files -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}
1814 %defattr(-,root,root)
1815 %mainlib libstdc++.so.%{libstdcxx_sover}*
1816
1817 %if %{separate_biarch}
1818 %files -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}%{separate_biarch_suffix}
1819 %defattr(-,root,root)
1820 %biarchlib libstdc++.so.%{libstdcxx_sover}*
1821 %endif
1822
1823 %files -n libstdc++@base_ver@-devel -f c++-headers
1824 %defattr(-,root,root)
1825 %versmainlib libstdc++.a
1826 %versmainlib libstdc++.so
1827 %versmainlib libsupc++.a
1828 %dir %{_datadir}/gdb
1829 %dir %{_datadir}/gdb/auto-load
1830 %dir %{_datadir}/gdb/auto-load%{_prefix}
1831 %dir %{_datadir}/gdb/auto-load/%{mainlibdir}
1832 %{_datadir}/gdb/auto-load/%{mainlibdir}/libstdc++.so.*-gdb.py
1833 %{_datadir}/gcc%{binsuffix}
1834
1835 %if %{separate_biarch}
1836 %files -n libstdc++@base_ver@-devel%{separate_biarch_suffix}
1837 %defattr(-,root,root)
1838 %versbiarchlib libstdc++.a
1839 %versbiarchlib libstdc++.so
1840 %versbiarchlib libsupc++.a
1841 %dir %{_datadir}/gdb/auto-load/%{mainlibdirbi}
1842 %{_datadir}/gdb/auto-load/%{mainlibdirbi}/libstdc++.so.*-gdb.py
1843 %endif
1844
1845 %files -n libstdc++@base_ver@-doc
1846 %defattr(-,root,root)
1847 %doc libstdc++-v3/doc/html
1848 %endif
1849
1850 %files -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}
1851 %defattr(-,root,root)
1852 /%{_lib}/libgcc_s.so.%{libgcc_s}
1853 %if %{biarch}
1854 %if %{build_primary_64bit}
1855 %if !%{separate_bi32}
1856 /lib/libgcc_s.so.%{libgcc_s}
1857 %endif
1858 %else
1859 %if !%{separate_bi64}
1860 /lib64/libgcc_s.so.%{libgcc_s}
1861 %endif
1862 %endif
1863 %endif
1864
1865 %if %{separate_bi64}
1866 %files -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-64bit
1867 %defattr(-,root,root)
1868 /lib64/libgcc_s.so.%{libgcc_s}
1869 %endif
1870
1871 %if %{separate_bi32}
1872 %files -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit
1873 %defattr(-,root,root)
1874 /lib/libgcc_s.so.%{libgcc_s}
1875 %endif
1876
1877
1878 %files -n libgomp%{libgomp_sover}%{libgomp_suffix}
1879 %defattr(-,root,root)
1880 %mainlib libgomp.so.%{libgomp_sover}*
1881
1882 %if %{separate_biarch}
1883 %files -n libgomp%{libgomp_sover}%{libgomp_suffix}%{separate_biarch_suffix}
1884 %defattr(-,root,root)
1885 %biarchlib libgomp.so.%{libgomp_sover}*
1886 %endif
1887
1888
1889 %ifarch %asan_arch
1890 %files -n libasan%{libasan_sover}%{libasan_suffix}
1891 %defattr(-,root,root)
1892 %mainlib libasan.so.%{libasan_sover}*
1893
1894 %if %{separate_biarch}
1895 %files -n libasan%{libasan_sover}%{libasan_suffix}%{separate_biarch_suffix}
1896 %defattr(-,root,root)
1897 %biarchlib libasan.so.%{libasan_sover}*
1898 %endif
1899 %endif
1900
1901
1902 %ifarch %tsan_arch
1903 %files -n libtsan%{libtsan_sover}%{libtsan_suffix}
1904 %defattr(-,root,root)
1905 %mainlib libtsan.so.%{libtsan_sover}*
1906
1907 %if 0
1908 %if %{separate_biarch}
1909 %files -n libtsan%{libtsan_sover}%{libtsan_suffix}%{separate_biarch_suffix}
1910 %defattr(-,root,root)
1911 %biarchlib libtsan.so.%{libtsan_sover}*
1912 %endif
1913 %endif
1914 %endif
1915
1916
1917 %ifarch %atomic_arch
1918 %files -n libatomic%{libatomic_sover}%{libatomic_suffix}
1919 %defattr(-,root,root)
1920 %mainlib libatomic.so.%{libatomic_sover}*
1921
1922 %if %{separate_biarch}
1923 %files -n libatomic%{libatomic_sover}%{libatomic_suffix}%{separate_biarch_suffix}
1924 %defattr(-,root,root)
1925 %biarchlib libatomic.so.%{libatomic_sover}*
1926 %endif
1927 %endif
1928
1929
1930 %ifarch %itm_arch
1931 %files -n libitm%{libitm_sover}%{libitm_suffix}
1932 %defattr(-,root,root)
1933 %mainlib libitm.so.%{libitm_sover}*
1934
1935 %if %{separate_biarch}
1936 %files -n libitm%{libitm_sover}%{libitm_suffix}%{separate_biarch_suffix}
1937 %defattr(-,root,root)
1938 %biarchlib libitm.so.%{libitm_sover}*
1939 %endif
1940 %endif
1941
1942
1943
1944 %if %{build_fortran}
1945 %files fortran
1946 %defattr(-,root,root)
1947 %dir %{libsubdir}/finclude
1948 %{_prefix}/bin/gfortran%{binsuffix}
1949 %{libsubdir}/f951
1950 %{libsubdir}/finclude/*
1951 %versmainlib libgfortran.a
1952 %versmainlib libgfortran.so
1953 %versmainlib libgfortran.spec
1954 %versmainlib libgfortranbegin.a
1955 %versmainlib libcaf_single.a
1956 %ifarch %quadmath_arch
1957 %{libsubdir}/include/quadmath.h
1958 %{libsubdir}/include/quadmath_weak.h
1959 %versmainlib libquadmath.a
1960 %versmainlib libquadmath.so
1961 %endif
1962 %doc %{_mandir}/man1/gfortran%{binsuffix}.1.gz
1963
1964 %if %{separate_biarch}
1965 %files fortran%{separate_biarch_suffix}
1966 %defattr(-,root,root)
1967 %versbiarchlib libgfortran.a
1968 %versbiarchlib libgfortran.so
1969 %versbiarchlib libgfortran.spec
1970 %versbiarchlib libgfortranbegin.a
1971 %versbiarchlib libcaf_single.a
1972 %ifarch %quadmath_arch
1973 %versbiarchlib libquadmath.a
1974 %versbiarchlib libquadmath.so
1975 %endif
1976 %endif
1977
1978 %files -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}
1979 %defattr(-,root,root)
1980 %mainlib libgfortran.so.%{libgfortran_sover}*
1981
1982 %if %{separate_biarch}
1983 %files -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}%{separate_biarch_suffix}
1984 %defattr(-,root,root)
1985 %biarchlib libgfortran.so.%{libgfortran_sover}*
1986 %endif
1987
1988 %ifarch %quadmath_arch
1989 %files -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}
1990 %defattr(-,root,root)
1991 %mainlib libquadmath.so.%{libquadmath_sover}*
1992
1993 %if %{separate_biarch}
1994 %files -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}%{separate_biarch_suffix}
1995 %defattr(-,root,root)
1996 %biarchlib libquadmath.so.%{libquadmath_sover}*
1997 %endif
1998 %endif
1999 %endif
2000
2001 %if %{build_with_mudflap}
2002 %files -n libmudflap@base_ver@
2003 %defattr(-,root,root)
2004 %mainlib libmudflap.so.%{libmudflap_sover}*
2005 %mainlib libmudflapth.so.%{libmudflap_sover}*
2006
2007 %if %{separate_biarch}
2008 %files -n libmudflap@base_ver@%{separate_biarch_suffix}
2009 %defattr(-,root,root)
2010 %biarchlib libmudflap.so.%{libmudflap_sover}*
2011 %biarchlib libmudflapth.so.%{libmudflap_sover}*
2012 %endif
2013 %endif
2014
2015 %files info
2016 %defattr(-,root,root)
2017 %doc %{_infodir}/*.gz
2018
2019 %files -n cpp@base_ver@
2020 %defattr(-,root,root)
2021 %dir %{_libdir}/gcc
2022 %dir %{_libdir}/gcc/%{GCCDIST}
2023 %dir %{libsubdir}
2024 %{_prefix}/bin/cpp%{binsuffix}
2025 %{libsubdir}/cc1
2026 #%{libsubdir}/specs
2027 %doc %{_mandir}/man1/cpp%{binsuffix}.1.gz
2028
2029 %if %{build_objc}
2030 %files objc
2031 %defattr(-,root,root)
2032 %{libsubdir}/cc1obj
2033 %{libsubdir}/include/objc
2034 %versmainlib libobjc.a
2035 %versmainlib libobjc.so
2036
2037 %if %{separate_biarch}
2038 %files objc%{separate_biarch_suffix}
2039 %defattr(-,root,root)
2040 %versbiarchlib libobjc.a
2041 %versbiarchlib libobjc.so
2042 %endif
2043
2044 %files -n libobjc%{libobjc_sover}%{libobjc_suffix}
2045 %defattr(-,root,root)
2046 %mainlib libobjc.so.%{libobjc_sover}*
2047
2048 %if %{separate_biarch}
2049 %files -n libobjc%{libobjc_sover}%{libobjc_suffix}%{separate_biarch_suffix}
2050 %defattr(-,root,root)
2051 %biarchlib libobjc.so.%{libobjc_sover}*
2052 %endif
2053 %endif
2054
2055
2056 %if %{build_objcp}
2057 %files obj-c++
2058 %defattr(-,root,root)
2059 %{libsubdir}/cc1objplus
2060 %endif
2061
2062
2063 %if %{build_ada}
2064 %files ada
2065 %defattr(-,root,root)
2066 %dir %{_libdir}/gcc
2067 %dir %{_libdir}/gcc/%{GCCDIST}
2068 %dir %{libsubdir}
2069 %{_prefix}/bin/gnat*
2070 %dir %{versmainlibdir}/adainclude
2071 %dir %{versmainlibdir}/adalib
2072 %{versmainlibdir}/adainclude
2073 %{versmainlibdir}/adalib/*.ali
2074 %{versmainlibdir}/adalib/*.a
2075 %{versmainlibdir}/adalib/libgnarl.so
2076 %{versmainlibdir}/adalib/libgnat.so
2077 %{versmainlibdir}/gnat1
2078
2079 %if %{separate_biarch}
2080 %files ada%{separate_biarch_suffix}
2081 %defattr(-,root,root)
2082 %dir %{versmainlibdirbi}/adainclude
2083 %dir %{versmainlibdirbi}/adalib
2084 %{versmainlibdirbi}/adainclude
2085 %{versmainlibdirbi}/adalib/*.ali
2086 %{versmainlibdirbi}/adalib/*.a
2087 %{versmainlibdirbi}/adalib/libgnarl.so
2088 %{versmainlibdirbi}/adalib/libgnat.so
2089 %endif
2090
2091 %files -n libada@base_ver@
2092 %defattr(-,root,root)
2093 %mainlib libgnarl-*.so
2094 %mainlib libgnat-*.so
2095
2096 %if %{separate_biarch}
2097 %files -n libada@base_ver@%{separate_biarch_suffix}
2098 %defattr(-,root,root)
2099 %biarchlib libgnarl-*.so
2100 %biarchlib libgnat-*.so
2101 %endif
2102 %endif
2103 # LIBJAVA-DELETE-END
2104
2105
2106 %if %{build_java}
2107 %if 0%{?building_libjava:1}
2108 %files -n gcc@base_ver@-java
2109 %defattr(-,root,root)
2110 %{_prefix}/bin/gcj%{binsuffix}
2111 %{_prefix}/bin/gcjh%{binsuffix}
2112 %{_prefix}/bin/gcj-dbtool%{binsuffix}
2113 %{_prefix}/bin/jcf-dump%{binsuffix}
2114 %{_prefix}/bin/jv-convert%{binsuffix}
2115 %{_prefix}/bin/gc-analyze%{binsuffix}
2116 %{_prefix}/bin/aot-compile%{binsuffix}
2117 %{_prefix}/bin/rebuild-gcj-db%{binsuffix}
2118 %{libsubdir}/jc1
2119 %{libsubdir}/jvgenmain
2120 %{libsubdir}/ecj.jar
2121 %{libsubdir}/ecj1
2122 %doc %{_mandir}/man1/gcj%{binsuffix}.1.gz
2123 %doc %{_mandir}/man1/gcjh%{binsuffix}.1.gz
2124 %doc %{_mandir}/man1/gcj-dbtool%{binsuffix}.1.gz
2125 %doc %{_mandir}/man1/jcf-dump%{binsuffix}.1.gz
2126 %doc %{_mandir}/man1/jv-convert%{binsuffix}.1.gz
2127 %doc %{_mandir}/man1/gc-analyze%{binsuffix}.1.gz
2128 %doc %{_mandir}/man1/aot-compile%{binsuffix}.1.gz
2129 %doc %{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1.gz
2130 %endif
2131 %endif
2132
2133 %if %{build_java}
2134 %if %{build_libjava}
2135 %files -n libgcj@base_ver@
2136 %defattr(-,root,root)
2137 %dir %{_libdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}
2138 %dir %{_libdir}/gcc
2139 %dir %{_libdir}/gcc/%{GCCDIST}
2140 %dir %{libsubdir}
2141 %{_libdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}/classmap.db
2142 # We usually do not multilib libjava
2143 %if %{biarch_libjava}
2144 %versbiarchlib libgcj.la
2145 %biarchlib libgcj.so.*
2146 %biarchlib libgij.so.*
2147 %biarchlib libgcj-tools.so.*
2148 %else
2149 %versmainlib libgcj.la
2150 %mainlib libgcj.so.*
2151 %mainlib libgij.so.*
2152 %mainlib libgcj-tools.so.*
2153 %endif
2154 %{_libdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}/libjvm.la
2155 %{_libdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}/libjvm.so
2156 %{_libdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}/libjavamath.la
2157 %{_libdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}/libjavamath.so
2158
2159 %files -n libgcj_bc%{libgcj_bc_sover}%{libgcj_bc_suffix}
2160 %defattr(-,root,root)
2161 %if %{biarch_libjava}
2162 %biarchlib libgcj_bc.so.%{libgcj_bc_sover}*
2163 %else
2164 %mainlib libgcj_bc.so.%{libgcj_bc_sover}*
2165 %endif
2166
2167 %files -n libgcj@base_ver@-jar
2168 %defattr(-,root,root)
2169 %{_prefix}/share/java/libgcj-%{gcc_dir_version}.jar
2170 %{_prefix}/share/java/libgcj-tools-%{gcc_dir_version}.jar
2171
2172 %files -n libgcj@base_ver@-devel
2173 %defattr(-,root,root)
2174 %dir %{_prefix}/include/c++
2175 %dir %{libsubdir}
2176 %dir %{libsubdir}/include
2177 %dir %{gxxinclude}
2178 %{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
2179 %{libsubdir}/include/jawt.h
2180 %{libsubdir}/include/jawt_md.h
2181 %{libsubdir}/include/jni.h
2182 %{libsubdir}/include/jni_md.h
2183 %{libsubdir}/include/jvmpi.h
2184 %{gxxinclude}/gnu
2185 %{gxxinclude}/gcj
2186 %{gxxinclude}/java
2187 %{gxxinclude}/javax
2188 %{gxxinclude}/org
2189 %{gxxinclude}/sun
2190 %{libsubdir}/include/gcj
2191 %if %{biarch_libjava}
2192 %versbiarchlib libgcj.so
2193 %versbiarchlib libgcj.spec
2194 %versbiarchlib libgcj-tools.so
2195 %versbiarchlib libgij.so
2196 %versbiarchlib libgcj_bc.so
2197 %else
2198 %versmainlib libgcj.so
2199 %versmainlib libgcj.spec
2200 %versmainlib libgcj-tools.so
2201 %versmainlib libgij.so
2202 %versmainlib libgcj_bc.so
2203 %endif
2204
2205 %files -n gcc@base_ver@-gij
2206 %defattr(-,root,root)
2207 %{_prefix}/bin/gij%{binsuffix}
2208 %{_prefix}/bin/gappletviewer%{binsuffix}
2209 %{_prefix}/bin/gjar%{binsuffix}
2210 %{_prefix}/bin/gjarsigner%{binsuffix}
2211 %{_prefix}/bin/gjavah%{binsuffix}
2212 %{_prefix}/bin/gkeytool%{binsuffix}
2213 %{_prefix}/bin/gnative2ascii%{binsuffix}
2214 %{_prefix}/bin/gorbd%{binsuffix}
2215 %{_prefix}/bin/grmic%{binsuffix}
2216 %{_prefix}/bin/grmid%{binsuffix}
2217 %{_prefix}/bin/grmiregistry%{binsuffix}
2218 %{_prefix}/bin/gserialver%{binsuffix}
2219 %{_prefix}/bin/gtnameserv%{binsuffix}
2220 %doc %{_mandir}/man1/gij%{binsuffix}.1.gz
2221 %doc %{_mandir}/man1/gappletviewer%{binsuffix}.1.gz
2222 %doc %{_mandir}/man1/grmic%{binsuffix}.1.gz
2223 %doc %{_mandir}/man1/grmid%{binsuffix}.1.gz
2224 %doc %{_mandir}/man1/grmiregistry%{binsuffix}.1.gz
2225 %doc %{_mandir}/man1/gkeytool%{binsuffix}.1.gz
2226 %doc %{_mandir}/man1/gjar%{binsuffix}.1.gz
2227 %doc %{_mandir}/man1/gjarsigner%{binsuffix}.1.gz
2228 %doc %{_mandir}/man1/gjavah%{binsuffix}.1.gz
2229 %doc %{_mandir}/man1/gnative2ascii%{binsuffix}.1.gz
2230 %doc %{_mandir}/man1/gorbd%{binsuffix}.1.gz
2231 %doc %{_mandir}/man1/gserialver%{binsuffix}.1.gz
2232 %doc %{_mandir}/man1/gtnameserv%{binsuffix}.1.gz
2233 %endif
2234 %endif
2235 # LIBFFI-DELETE-END
2236
2237 %if %{build_java}
2238 %if 0%{?building_libffi:1}
2239 %files -n libffi%{libffi_sover}%{libffi_suffix}
2240 %defattr(-,root,root)
2241 %mainlib libffi.so.%{libffi_sover}*
2242
2243 %if %{separate_biarch}
2244 %files -n libffi%{libffi_sover}%{libffi_suffix}%{separate_biarch_suffix}
2245 %defattr(-,root,root)
2246 %biarchlib libffi.so.%{libffi_sover}*
2247 %endif
2248
2249 %post -n libffi@base_ver@-devel
2250 %install_info --info-dir=%{_infodir} %{_infodir}/libffi%{binsuffix}.info.gz
2251 %postun -n libffi@base_ver@-devel
2252 %install_info_delete --info-dir=%{_infodir} %{_infodir}/libffi%{binsuffix}.info.gz
2253
2254 %files -n libffi@base_ver@-devel
2255 %defattr(-,root,root)
2256 %{_prefix}/include/ffi.h
2257 %{_prefix}/include/ffitarget.h
2258 %mainlib libffi.so
2259 %mainlib libffi.a
2260 %{_libdir}/pkgconfig/libffi.pc
2261 %doc %{_infodir}/libffi%{binsuffix}.info.gz
2262 %doc %{_mandir}/man3/ffi%{binsuffix}.3.gz
2263 %doc %{_mandir}/man3/ffi_call%{binsuffix}.3.gz
2264 %doc %{_mandir}/man3/ffi_prep_cif%{binsuffix}.3.gz
2265 %doc %{_mandir}/man3/ffi_prep_cif_var%{binsuffix}.3.gz
2266
2267 %if %{separate_biarch}
2268 %files -n libffi@base_ver@-devel%{separate_biarch_suffix}
2269 %defattr(-,root,root)
2270 %biarchlib libffi.so
2271 %biarchlib libffi.a
2272 %endif
2273 %endif
2274 %endif
2275 # GCC-TESTSUITE-DELETE-END
2276
2277 %if 0%{?run_tests:1}
2278 %files -n gcc@base_ver@-testresults
2279 %defattr(-,root,root)
2280 %doc testresults/test_summary.txt
2281 %doc testresults/*.sum
2282 %doc testresults/*.log
2283 %endif
2284
2285
2286 %changelog