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