set gcc_dir_version
[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_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_libjava}
981         --disable-libgcj \
982 %else
983         --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
984         --with-ecj-jar=%{libsubdir}/ecj.jar \
985         --disable-java-awt \
986 %if !%{biarch_libjava}
987         --disable-libjava-multilib \
988 %endif
989 %endif
990 %if !%{build_with_mudflap}
991         --disable-libmudflap \
992 %endif
993         --with-slibdir=/%{_lib} \
994         --with-system-zlib \
995         --enable-__cxa_atexit \
996         --enable-libstdcxx-allocator=new \
997         --disable-libstdcxx-pch \
998         --enable-version-specific-runtime-libs \
999         --enable-linker-build-id \
1000 %if 0%{?gcc_target_arch:1}
1001 %if 0%{?gcc_icecream:1}
1002         --with-build-sysroot=/ \
1003         --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
1004         --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
1005         --enable-linux-futex \
1006 %endif
1007 %if 0%{?canonical_target:1}
1008         --with-build-time-tools=/usr/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
1009 %endif
1010 %if 0%{?sysroot:1}
1011         --with-sysroot=%sysroot \
1012 %endif
1013 %if 0%{?build_static:1}
1014         --disable-shared \
1015 %endif
1016 %if "%{TARGET_ARCH}" == "spu"
1017         --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
1018         --with-newlib \
1019 %endif
1020         --disable-nls \
1021         --target=%{CONFIGURE_TARGET} \
1022 %else
1023         --program-suffix=%{binsuffix} \
1024         --enable-linux-futex \
1025 %ifarch ia64
1026         --with-system-libunwind \
1027 %else
1028         --without-system-libunwind \
1029 %endif
1030 %endif
1031 %if "%{TARGET_ARCH}" == "armv5tel"
1032         --with-arch=armv5te \
1033         --with-float=soft \
1034         --with-mode=arm \
1035         --with-abi=aapcs-linux \
1036         --disable-sjlj-exceptions \
1037 %endif
1038 %if "%{TARGET_ARCH}" == "armv7l" 
1039         --with-arch=armv7-a \
1040         --with-tune=cortex-a8 \
1041         --with-float=softfp \
1042         --with-fpu=vfpv3 \
1043         --disable-sjlj-exceptions \
1044 %endif
1045 %if  "%{TARGET_ARCH}" == "armv7hl"
1046         --with-arch=armv7-a \
1047         --with-tune=cortex-a9 \
1048         --with-float=hard \
1049         --with-abi=aapcs-linux \
1050         --with-fpu=vfpv3-d16 \
1051         --disable-sjlj-exceptions \
1052 %endif
1053 %if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64"
1054 %if "%{TARGET_ARCH}" == "powerpc"
1055         --with-cpu=default32 \
1056 %endif
1057         --with-cpu-64=power4 \
1058         --enable-secureplt \
1059         --with-long-double-128 \
1060 %endif
1061 %if "%{TARGET_ARCH}" == "sparc64"
1062         --with-cpu=ultrasparc \
1063         --with-long-double-128 \
1064 %endif
1065 %if "%{TARGET_ARCH}" == "sparc"
1066         --with-cpu=v8 \
1067         --with-long-double-128 \
1068 %endif
1069 %if "%{TARGET_ARCH}" == "i586"
1070         --with-arch-32=i586 \
1071         --with-tune=generic \
1072 %endif
1073 %if "%{TARGET_ARCH}" == "x86_64"
1074         --with-arch-32=i586 \
1075         --with-tune=generic \
1076 %endif
1077 %if "%{TARGET_ARCH}" == "s390"
1078         --with-tune=z196 --with-arch=z10 \
1079         --with-long-double-128 \
1080         --enable-decimal-float \
1081 %endif
1082 %if "%{TARGET_ARCH}" == "s390x"
1083         --with-tune=z196 --with-arch=z10 \
1084         --with-long-double-128 \
1085         --enable-decimal-float \
1086 %endif
1087         --build=%{GCCDIST}
1088
1089 # COMMON-END
1090
1091 %if 0%{?building_libffi:1}
1092 make stage1-bubble $PARALLEL
1093 make all-target-libffi $PARALLEL
1094 %else
1095 STAGE1_FLAGS="-g"
1096 # Only run profiled bootstrap on archs where it works
1097 #%ifarch %ix86 x86_64 ppc ppc64 ia64
1098 #make profiledbootstrap-lean STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
1099 #%else
1100 #make bootstrap-lean STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
1101 make STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
1102 #%endif
1103 #make -C gcc proto
1104 make info
1105 %if 0%{?run_tests:1}
1106 echo "Run testsuite"
1107 (make -C %{GCCDIST}/libstdc++-v3 check-abi || true)
1108 mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.log %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.log
1109 mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.sum %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.sum
1110 # asan needs a whole shadow address space
1111 ulimit -v unlimited || true
1112 make -k check $PARALLEL || true
1113 mkdir ../testresults
1114 ../contrib/test_summary | tee ../testresults/test_summary.txt
1115 %endif
1116 %endif
1117
1118 %install
1119 export NO_BRP_CHECK_BYTECODE_VERSION=true
1120 cd obj-%{GCCDIST}
1121 # GCC-TESTSUITE-DELETE-BEGIN
1122 # Work around tail/head -1 changes
1123 export _POSIX2_VERSION=199209
1124 export LIBRARY_PATH=$RPM_BUILD_ROOT%{libsubdir}:$RPM_BUILD_ROOT%{mainlibdirbi}
1125 %if 0%{?building_libffi:1}
1126 make -C %{GCCDIST}/libffi install DESTDIR=$RPM_BUILD_ROOT
1127 %else
1128 %if 0%{?building_libjava:1}
1129 make -C %{GCCDIST}/libjava install DESTDIR=$RPM_BUILD_ROOT
1130 make -C gcc java.install-man DESTDIR=$RPM_BUILD_ROOT
1131 make -C gcc java.install-common DESTDIR=$RPM_BUILD_ROOT
1132 make -C gcc install-common DESTDIR=$RPM_BUILD_ROOT COMPILERS='jc1$(exeext) jvgenmain$(exeext)'
1133 # install-common also installs collect2, gcov and the g++ and gfortran driver
1134 %if %{build_cp}
1135 rm $RPM_BUILD_ROOT%{_prefix}/bin/g++%{binsuffix}
1136 %endif
1137 %if %{build_fortran}
1138 rm $RPM_BUILD_ROOT%{_prefix}/bin/gfortran%{binsuffix}
1139 %endif
1140 rm $RPM_BUILD_ROOT%{_prefix}/bin/gcov%{binsuffix}
1141 rm $RPM_BUILD_ROOT%{libsubdir}/collect2
1142 %else
1143 make install DESTDIR=$RPM_BUILD_ROOT
1144 %if %{build_java}
1145 make -C gcc java.uninstall DESTDIR=$RPM_BUILD_ROOT
1146 make -C gcc java.install-info DESTDIR=$RPM_BUILD_ROOT
1147 rm $RPM_BUILD_ROOT%{_prefix}/bin/jcf-dump%{binsuffix}
1148 rm $RPM_BUILD_ROOT%{_mandir}/man1/jcf-dump%{binsuffix}.1
1149 rm $RPM_BUILD_ROOT%{libsubdir}/jc1
1150 rm $RPM_BUILD_ROOT%{libsubdir}/jvgenmain
1151 %endif
1152 %endif
1153 %endif
1154
1155 # Remove libffi installed files if we did not want to build it
1156 %if !0%{?building_libffi:1}
1157 rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.*
1158 %if %{biarch}
1159   rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.*
1160 %endif
1161 rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h
1162 rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h
1163 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi%{binsuffix}.3*
1164 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_call%{binsuffix}.3*
1165 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_prep_cif%{binsuffix}.3*
1166 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_prep_cif_var%{binsuffix}.3*
1167 %endif
1168
1169 # Remove some useless .la files
1170 for lib in libobjc libgfortran libgfortranbegin libquadmath libcaf_single \
1171     libmudflap libmudflapth libgomp libstdc++ libsupc++ libgcj-tools libgij \
1172     libasan libatomic libitm libtsan; do
1173   rm -f $RPM_BUILD_ROOT%{versmainlibdir}/$lib.la
1174 %if %{biarch}
1175   rm -f $RPM_BUILD_ROOT%{versmainlibdirbi}/$lib.la
1176 %endif
1177 done
1178
1179 mkdir -p $RPM_BUILD_ROOT%{_libdir}
1180 %if %{biarch}
1181 %if %{build_primary_64bit}
1182 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib
1183 %else
1184 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib64
1185 %endif
1186 %endif
1187
1188 # LIBFFI-DELETE-BEGIN
1189 # LIBJAVA-DELETE-BEGIN
1190 %if %{build_cp}
1191 # Merge multilib c++config.h to allow omitting the duplicate and
1192 # identical other arch specific headers
1193 dir_ml=
1194 cxxconfig="`find %{GCCDIST}/libstdc++-v3/include -name c++config.h`"
1195 for i in `find %{GCCDIST}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do
1196   if ! diff -up $cxxconfig $i; then
1197     file_32=x
1198     file_64=x
1199     case $i in
1200       %{GCCDIST}/32/*)
1201         file_32=$i
1202         file_64=$cxxconfig
1203         dir_ml=32
1204         ;;
1205       %{GCCDIST}/64/*)
1206         file_32=$cxxconfig
1207         file_64=$i
1208         dir_ml=64
1209         ;;
1210     esac
1211     if ! ( test -f "$file_32" && test -f "$file_64" ); then
1212       echo "Urgs?"
1213       exit 1
1214     fi
1215     
1216     cat > $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/bits/c++config.h <<EOF
1217 #ifndef _CPP_CPPCONFIG_WRAPPER
1218 #define _CPP_CPPCONFIG_WRAPPER 1
1219 #include <bits/wordsize.h>
1220 #if __WORDSIZE == 32
1221 `cat $file_32`
1222 #else
1223 `cat $file_64`
1224 #endif
1225 #endif
1226 EOF
1227     break
1228   fi
1229 done
1230 rm -rf $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/[36]*
1231 if ! test -z "$dir_ml"; then
1232   ln -s . $RPM_BUILD_ROOT%{_prefix}/include/c++/%{gcc_dir_version}/%{GCCDIST}/$dir_ml
1233 fi
1234 %endif
1235 # LIBJAVA-DELETE-END
1236
1237 # move shared libs from versionspecific dir to main libdir
1238 for libname in \
1239 %if 0%{?building_libjava:1}
1240   libgcj libgij libgcj-tools \
1241 %else
1242 %if %{build_fortran}
1243   libgfortran \
1244 %ifarch %quadmath_arch
1245   libquadmath \
1246 %endif
1247 %endif
1248 %if %{build_objc}
1249   libobjc \
1250 %endif
1251 %if %{build_cp}
1252   libstdc++ \
1253 %endif
1254   libgomp \
1255 %ifarch %atomic_arch
1256   libatomic \
1257 %endif
1258 %ifarch %itm_arch
1259   libitm \
1260 %endif
1261 %ifarch %asan_arch
1262   libasan \
1263 %endif
1264 %ifarch %tsan_arch
1265   libtsan \
1266 %endif
1267 %if %{build_with_mudflap}
1268   libmudflap libmudflapth \
1269 %endif
1270 %endif
1271     ; do
1272   for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name $libname.so.*`; do
1273     mv $lib $RPM_BUILD_ROOT%{mainlibdir}/
1274   done
1275   ln -sf %{mainlibdir}/`readlink $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'`  \
1276          $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so
1277 %if %{biarch}
1278   if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then
1279     for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name "$libname.so.*"`; do
1280       mv $lib $RPM_BUILD_ROOT%{mainlibdirbi}/
1281     done
1282     ln -sf %{mainlibdirbi}/`readlink $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'`  \
1283          $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so
1284   fi
1285 %endif
1286 done
1287 # FIXME, tsan is not multilib
1288 %ifarch %tsan_arch
1289 %if %{biarch}
1290 rm -f $RPM_BUILD_ROOT%{versmainlibdirbi}/libtsan.so
1291 %endif
1292 %endif
1293 %if %{build_cp}
1294 %if !0%{?building_libjava:1}
1295 # And we want to move the shlib gdb pretty printers to a more sane
1296 # place so ldconfig does not complain
1297 mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}
1298 mv $RPM_BUILD_ROOT%{mainlibdir}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/
1299 sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/libstdc++.so.*-gdb.py
1300 %if %{biarch}
1301   if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then
1302     mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}
1303     mv $RPM_BUILD_ROOT%{mainlibdirbi}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/
1304     sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/libstdc++.so.*-gdb.py
1305   fi
1306 %endif
1307 %endif
1308 %endif
1309 %if 0%{?building_libjava:1}
1310 # libgcj_bc is special as the .so file is actually a different
1311 # library as the library refered to by the SONAME which should
1312 # be a simple link to our libgcj.
1313 for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name libgcj_bc.so.*`; do
1314   rm $lib
1315 done
1316 ln -s libgcj.so.%{libgcj_sover} $RPM_BUILD_ROOT%{mainlibdir}/libgcj_bc.so.%{libgcj_bc_sover}
1317 %if %{biarch_libjava}
1318 for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name libgcj_bc.so.*`; do
1319   rm $lib
1320 done
1321 ln -s libgcj.so.%{libgcj_sover} $RPM_BUILD_ROOT%{mainlibdirbi}/libgcj_bc.so.%{libgcj_bc_sover}
1322 %endif
1323 %endif
1324
1325 # LIBJAVA-DELETE-BEGIN
1326 # Move libgcc_s around
1327 if test -L $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so; then
1328   rm -f $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so
1329   ln -sf /%{_lib}/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdir}/libgcc_s.so
1330 else
1331   mv $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdir}/
1332 fi
1333 chmod a+x $RPM_BUILD_ROOT/%{_lib}/libgcc_s.so.%{libgcc_s}
1334 %if %{biarch}
1335 %if %{build_primary_64bit}
1336 if test -L $RPM_BUILD_ROOT/lib/libgcc_s.so; then
1337   rm -f $RPM_BUILD_ROOT/lib/libgcc_s.so
1338   ln -sf /lib/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s.so
1339 else
1340   mv $RPM_BUILD_ROOT/lib/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/
1341 fi
1342 ln -sf %{versmainlibdirbi32}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi32}/libgcc_s_32.so
1343 chmod a+x $RPM_BUILD_ROOT/lib/libgcc_s.so.%{libgcc_s}
1344 %else
1345 # 32-bit biarch systems
1346 if test -L $RPM_BUILD_ROOT/lib64/libgcc_s.so; then
1347   rm -f $RPM_BUILD_ROOT/lib64/libgcc_s.so
1348   ln -sf /lib64/libgcc_s.so.%{libgcc_s} $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s.so
1349 else
1350   mv $RPM_BUILD_ROOT/lib64/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/
1351 fi
1352 ln -sf %{versmainlibdirbi64}/libgcc_s.so $RPM_BUILD_ROOT%{versmainlibdirbi64}/libgcc_s_64.so
1353 chmod a+x $RPM_BUILD_ROOT/lib64/libgcc_s.so.%{libgcc_s}
1354 %endif
1355 %endif
1356
1357 # LIBJAVA-DELETE-END
1358 # LIBFFI-DELETE-END
1359
1360 %if %{build_ada}
1361 mv $RPM_BUILD_ROOT%{libsubdir}/adalib/lib*-*.so $RPM_BUILD_ROOT%{_libdir}
1362 ln -sf %{_libdir}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnarl.so
1363 ln -sf %{_libdir}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnat.so
1364 chmod a+x $RPM_BUILD_ROOT%{_libdir}/libgna*-*.so
1365 %if %{biarch}
1366 mv $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/lib*-*.so $RPM_BUILD_ROOT%{mainlibdirbi}/
1367 ln -sf %{mainlibdirbi}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
1368 ln -sf %{mainlibdirbi}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
1369 chmod a+x $RPM_BUILD_ROOT%{mainlibdirbi}/libgna*-*.so
1370 %endif
1371 %endif
1372
1373 rm -f $RPM_BUILD_ROOT%{_prefix}/bin/c++%{binsuffix}
1374
1375 # Remove some crap from the .la files:
1376 for l in `find $RPM_BUILD_ROOT -name '*.la'`; do
1377   echo "changing $l"
1378 # -e '/^dependency_libs/s|%{libsubdir}/\([^.]*\)\.la |%{_libdir}/\1\.la |g'
1379   sed -e '/^dependency_libs/s| -L%{_builddir}/[^ ]*||g' \
1380       -e '/^dependency_libs/s| -L/usr/%{GCCDIST}/bin||g' \
1381       -e '/^dependency_libs/s|-lm \(-lm \)*|-lm |' \
1382       -e '/^dependency_libs/s|-L[^ ]* ||g' \
1383 %if %{biarch}
1384 %if %{build_primary_64bit}
1385       -e '/^libdir/s|%{_libdir}/32|%{_prefix}/lib|' \
1386       -e '/^libdir/s|lib64/\.\./||' \
1387 %else
1388       -e '/^libdir/s|%{_libdir}/64|%{_prefix}/lib64|' \
1389 %endif
1390 %endif
1391       < $l  > $l.new
1392   mv $l.new $l
1393 done
1394
1395 # GCC-TESTSUITE-DELETE-END
1396 %if 0%{?run_tests:1} 
1397 cp `find . -name "*.sum"` ../testresults/
1398 cp `find . -name "*.log"  \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
1399 chmod 644 ../testresults/*
1400 %endif
1401 # GCC-TESTSUITE-DELETE-BEGIN
1402 # LIBFFI-DELETE-BEGIN
1403 %if %{build_cp}
1404 # Find C++ and Java headers
1405 find $RPM_BUILD_ROOT%{_prefix}/include/c++ \
1406   -regex ".*/\(org\|gcj\|gnu\|java\|javax\)" -prune \
1407   -o \( -type d -printf "%%%%dir " , \
1408         -printf "%{_prefix}/include/c++/%%P\n" \) > ../c++-headers
1409 %endif
1410 # LIBFFI-DELETE-END
1411 # Remove files that we do not need to clean up filelist
1412 rm -f $RPM_BUILD_ROOT%{_prefix}/bin/%{GCCDIST}-*
1413 rm -rf $RPM_BUILD_ROOT%{libsubdir}/install-tools
1414 #rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
1415 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/root
1416 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/curses.h
1417 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-*
1418 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux
1419 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sound
1420 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/features.h
1421 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/ncurses.h
1422 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/stdio.h
1423 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/zutil.h
1424 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/X11
1425 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits
1426 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/obstack.h
1427 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/spe.h
1428 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/tgmath.h
1429 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits
1430 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sys
1431 # no plugins
1432 rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin
1433 rm -f  $RPM_BUILD_ROOT%{_infodir}/dir
1434 rm -f  $RPM_BUILD_ROOT%{_prefix}/bin/gccbug%{binsuffix}
1435
1436 %if !0%{?building_libjava:1}%{?building_libffi:1}
1437 # delete compile flag tracking from crt files
1438 crt_list=$RPM_BUILD_ROOT%{versmainlibdir}/crt*.o
1439 %if %{biarch}
1440 %if %{build_primary_64bit}
1441 crt32_list=$RPM_BUILD_ROOT%{versmainlibdirbi32}/crt*.o
1442 %else
1443 crt64_list=$RPM_BUILD_ROOT%{versmainlibdirbi64}/crt*.o
1444 %endif
1445 %endif
1446 for o in $crt_list $crt32_list $crt64_list; do
1447   objcopy -R ".comment.SUSE.OPTs" $o
1448 done
1449 %endif
1450
1451 %if 0%{?building_libjava:1}
1452 # gcj -static doesn't work properly anyway, unless using --whole-archive
1453 # let's save the space instead.
1454 find $RPM_BUILD_ROOT -name libgcj.a \
1455         -o -name libgcj-tools.a \
1456         -o -name libgij.a \
1457         -o -name libjvm.a \
1458         -o -name libgcj_bc.a \
1459   | xargs rm -f
1460
1461 find $RPM_BUILD_ROOT -name libgcj.spec | xargs \
1462   sed -i -e 's/lib: /&%%{static:%%eJava programs cannot be linked statically}/'
1463
1464 # security files have broken install locations, also they cause conflicts
1465 # between libgcj versions.  Simply delete them here, libgcj will use its
1466 # defaults in this case (which is what these files contain anyway).
1467 rm $RPM_BUILD_ROOT%{_libdir}/logging.properties
1468 rm -r $RPM_BUILD_ROOT%{_libdir}/security
1469 %endif
1470
1471 %if 0%{?building_libffi:1}
1472 # Move libffi headers, remove empty libffi libtool file
1473 mkdir -p $RPM_BUILD_ROOT%{_prefix}/include
1474 mv $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h $RPM_BUILD_ROOT%{_prefix}/include/
1475 mv $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h $RPM_BUILD_ROOT%{_prefix}/include/
1476 rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.la
1477 %if %{biarch}
1478 rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.la
1479 %endif
1480 # Generate a simple pkg-config file
1481 mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig
1482 echo -e 'Name: libffi\nVersion: 3.0.9\nDescription: libffi\nLibs: -lffi' > $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libffi.pc
1483 %endif
1484
1485 %if %{build_java}
1486 %if !%{build_libjava}
1487 rm $RPM_BUILD_ROOT%{_mandir}/man1/jv-convert%{binsuffix}.1
1488 rm $RPM_BUILD_ROOT%{_mandir}/man1/gcj-dbtool%{binsuffix}.1
1489 rm $RPM_BUILD_ROOT%{_mandir}/man1/gij%{binsuffix}.1
1490 rm $RPM_BUILD_ROOT%{_mandir}/man1/grmic%{binsuffix}.1
1491 rm $RPM_BUILD_ROOT%{_mandir}/man1/gc-analyze%{binsuffix}.1
1492 rm $RPM_BUILD_ROOT%{_mandir}/man1/aot-compile%{binsuffix}.1
1493 rm $RPM_BUILD_ROOT%{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1
1494 %endif
1495 rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/aotcompile.py
1496 rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/classfile.py
1497 %endif
1498 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
1499 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
1500 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
1501 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
1502 %if %{biarch}
1503 %if %{build_primary_64bit}
1504 rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libiberty.a
1505 %else
1506 rm -f $RPM_BUILD_ROOT%{_prefix}/lib64/libiberty.a
1507 %endif
1508 %endif
1509 rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.a
1510 rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.la
1511
1512 # LIBFFI-DELETE-BEGIN
1513 %if 0%{?building_libjava:1}
1514 # For building libjava only we need to delete other info docs
1515 rm $RPM_BUILD_ROOT%{_infodir}/cp-tools.info*
1516 # Remove stale manpages for binaries we do not build
1517 rm $RPM_BUILD_ROOT%{_mandir}/man1/gjdoc%{binsuffix}.1
1518 # For building the java frontend we need to copy the ecj jar
1519 mkdir -p $RPM_BUILD_ROOT%{libsubdir}
1520 cp $RPM_SOURCE_DIR/ecj.jar $RPM_BUILD_ROOT%{libsubdir}
1521 %else
1522 # For regular build, some info files do not get renamed properly.
1523 # Do so here.
1524 mv $RPM_BUILD_ROOT%{_infodir}/libgomp.info $RPM_BUILD_ROOT%{_infodir}/libgomp%{binsuffix}.info
1525 %ifarch %itm_arch
1526 mv $RPM_BUILD_ROOT%{_infodir}/libitm.info $RPM_BUILD_ROOT%{_infodir}/libitm%{binsuffix}.info
1527 %endif
1528 %if %{build_fortran} 
1529 %ifarch %quadmath_arch
1530 mv $RPM_BUILD_ROOT%{_infodir}/libquadmath.info $RPM_BUILD_ROOT%{_infodir}/libquadmath%{binsuffix}.info
1531 %endif
1532 %endif
1533 %if %{build_ada}
1534 mv $RPM_BUILD_ROOT%{_infodir}/gnat-style.info $RPM_BUILD_ROOT%{_infodir}/gnat-style%{binsuffix}.info
1535 mv $RPM_BUILD_ROOT%{_infodir}/gnat_rm.info $RPM_BUILD_ROOT%{_infodir}/gnat_rm%{binsuffix}.info
1536 mv $RPM_BUILD_ROOT%{_infodir}/gnat_ugn.info $RPM_BUILD_ROOT%{_infodir}/gnat_ugn%{binsuffix}.info
1537 %endif
1538 %endif
1539
1540 # LIBJAVA-DELETE-BEGIN
1541 cd ..
1542 %find_lang cpplib%{binsuffix}
1543 %find_lang gcc%{binsuffix}
1544 cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc@base_ver@-locale.lang
1545
1546
1547 %post info
1548 %install_info --info-dir=%{_infodir} %{_infodir}/cpp%{binsuffix}.info.gz
1549 %install_info --info-dir=%{_infodir} %{_infodir}/cppinternals%{binsuffix}.info.gz
1550 %install_info --info-dir=%{_infodir} %{_infodir}/gcc%{binsuffix}.info.gz
1551 %install_info --info-dir=%{_infodir} %{_infodir}/gccint%{binsuffix}.info.gz
1552 %install_info --info-dir=%{_infodir} %{_infodir}/gccinstall%{binsuffix}.info.gz
1553 %install_info --info-dir=%{_infodir} %{_infodir}/libgomp%{binsuffix}.info.gz
1554 %if %{build_fortran} 
1555 %install_info --info-dir=%{_infodir} %{_infodir}/gfortran%{binsuffix}.info.gz
1556 %ifarch %quadmath_arch
1557 %install_info --info-dir=%{_infodir} %{_infodir}/libquadmath%{binsuffix}.info.gz
1558 %endif
1559 %endif
1560 %if %{build_java}
1561 %install_info --info-dir=%{_infodir} %{_infodir}/gcj%{binsuffix}.info.gz
1562 %endif
1563 %if %{build_ada}
1564 %install_info --info-dir=%{_infodir} %{_infodir}/gnat-style%{binsuffix}.info.gz
1565 %install_info --info-dir=%{_infodir} %{_infodir}/gnat_rm%{binsuffix}.info.gz
1566 %install_info --info-dir=%{_infodir} %{_infodir}/gnat_ugn%{binsuffix}.info.gz
1567 %endif
1568
1569 %postun info
1570 %install_info_delete --info-dir=%{_infodir} %{_infodir}/cpp%{binsuffix}.info.gz
1571 %install_info_delete --info-dir=%{_infodir} %{_infodir}/cppinternals%{binsuffix}.info.gz
1572 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gcc%{binsuffix}.info.gz
1573 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gccint%{binsuffix}.info.gz
1574 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gccinstall%{binsuffix}.info.gz
1575 %install_info_delete --info-dir=%{_infodir} %{_infodir}/libgomp%{binsuffix}.info.gz
1576 %if %{build_fortran}
1577 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gfortran%{binsuffix}.info.gz
1578 %ifarch %quadmath_arch
1579 %install_info_delete --info-dir=%{_infodir} %{_infodir}/libquadmath%{binsuffix}.info.gz
1580 %endif
1581 %endif
1582 %if %{build_java}
1583 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gcj%{binsuffix}.info.gz
1584 %endif
1585 %if %{build_ada}
1586 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gnat-style%{binsuffix}.info.gz
1587 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gnat_rm%{binsuffix}.info.gz
1588 %install_info_delete --info-dir=%{_infodir} %{_infodir}/gnat_ugn%{binsuffix}.info.gz
1589 %endif
1590
1591 %files
1592 %defattr(-,root,root)
1593 %dir %{_libdir}/gcc
1594 %dir %{_libdir}/gcc/%{GCCDIST}
1595 %dir %{libsubdir}
1596 %dir %{libsubdir}/include
1597 %dir %{libsubdir}/include-fixed
1598 %if %{biarch}
1599 %if %{build_primary_64bit}
1600 %dir %{libsubdir}/32
1601 %else
1602 %dir %{libsubdir}/64
1603 %endif
1604 %endif
1605 %{_prefix}/bin/gcc%{binsuffix}
1606 %{_prefix}/bin/gcov%{binsuffix}
1607 %{_prefix}/bin/gcc-ar%{binsuffix}
1608 %{_prefix}/bin/gcc-nm%{binsuffix}
1609 %{_prefix}/bin/gcc-ranlib%{binsuffix}
1610 %{libsubdir}/collect2
1611 %{libsubdir}/lto1
1612 %{libsubdir}/lto-wrapper
1613 %{libsubdir}/liblto_plugin.so*
1614 %{libsubdir}/include-fixed/README
1615 %{libsubdir}/include-fixed/limits.h
1616 %{libsubdir}/include-fixed/syslimits.h
1617 %{libsubdir}/include/omp.h
1618 %{libsubdir}/include/float.h
1619 %{libsubdir}/include/iso646.h
1620 %{libsubdir}/include/stdarg.h
1621 %{libsubdir}/include/stdbool.h
1622 %{libsubdir}/include/stdfix.h
1623 %{libsubdir}/include/stddef.h
1624 %{libsubdir}/include/unwind.h
1625 %{libsubdir}/include/varargs.h
1626 %{libsubdir}/include/stdint.h
1627 %{libsubdir}/include/stdint-gcc.h
1628 %{libsubdir}/include/stdnoreturn.h
1629 %{libsubdir}/include/stdalign.h
1630 %ifarch %sparc
1631 %{libsubdir}/include/visintrin.h
1632 %endif
1633 %ifarch ppc ppc64
1634 %{libsubdir}/include/altivec.h
1635 %{libsubdir}/include/ppc-asm.h
1636 %{libsubdir}/include/paired.h
1637 %{libsubdir}/include/ppu_intrinsics.h
1638 %{libsubdir}/include/si2vmx.h
1639 %{libsubdir}/include/spe.h
1640 %{libsubdir}/include/spu2vmx.h
1641 %{libsubdir}/include/vec_types.h
1642 %endif
1643 %ifarch ia64
1644 %{libsubdir}/include/ia64intrin.h
1645 %endif
1646 %ifarch aarch64
1647 %{libsubdir}/include/arm_neon.h
1648 %endif
1649 %ifarch %arm
1650 %{libsubdir}/include/mmintrin.h
1651 %{libsubdir}/include/arm_neon.h
1652 %{libsubdir}/include/unwind-arm-common.h
1653 %endif
1654 %ifarch %ix86 x86_64
1655 %{libsubdir}/include/cross-stdarg.h
1656 %{libsubdir}/include/cpuid.h
1657 %{libsubdir}/include/mm3dnow.h
1658 %{libsubdir}/include/mmintrin.h
1659 %{libsubdir}/include/ammintrin.h
1660 %{libsubdir}/include/bmmintrin.h
1661 %{libsubdir}/include/emmintrin.h
1662 %{libsubdir}/include/immintrin.h
1663 %{libsubdir}/include/avxintrin.h
1664 %{libsubdir}/include/pmmintrin.h
1665 %{libsubdir}/include/xmmintrin.h
1666 %{libsubdir}/include/tmmintrin.h
1667 %{libsubdir}/include/nmmintrin.h
1668 %{libsubdir}/include/smmintrin.h
1669 %{libsubdir}/include/wmmintrin.h
1670 %{libsubdir}/include/x86intrin.h
1671 %{libsubdir}/include/ia32intrin.h
1672 %{libsubdir}/include/mm_malloc.h
1673 %{libsubdir}/include/fma4intrin.h
1674 %{libsubdir}/include/xopintrin.h
1675 %{libsubdir}/include/lwpintrin.h
1676 %{libsubdir}/include/popcntintrin.h
1677 %{libsubdir}/include/bmiintrin.h
1678 %{libsubdir}/include/tbmintrin.h
1679 %{libsubdir}/include/avx2intrin.h
1680 %{libsubdir}/include/bmi2intrin.h
1681 %{libsubdir}/include/fmaintrin.h
1682 %{libsubdir}/include/lzcntintrin.h
1683 %{libsubdir}/include/f16cintrin.h
1684 %{libsubdir}/include/adxintrin.h
1685 %{libsubdir}/include/fxsrintrin.h
1686 %{libsubdir}/include/prfchwintrin.h
1687 %{libsubdir}/include/rdseedintrin.h
1688 %{libsubdir}/include/rtmintrin.h
1689 %{libsubdir}/include/xsaveintrin.h
1690 %{libsubdir}/include/xsaveoptintrin.h
1691 %{libsubdir}/include/xtestintrin.h
1692 %endif
1693 %if %{build_with_mudflap}
1694 %{libsubdir}/include/mf-runtime.h
1695 %endif
1696 %versmainlib *crt*.o
1697 %versmainlib libgcc*.a
1698 %versmainlib libgcov.a
1699 %versmainlib libgcc_s*.so
1700 %if %{build_with_mudflap}
1701 %versmainlib libmudflap.a
1702 %versmainlib libmudflap.so
1703 %versmainlib libmudflapth.a
1704 %versmainlib libmudflapth.so
1705 %endif
1706 %versmainlib libgomp.so
1707 %versmainlib libgomp.a
1708 %versmainlib libgomp.spec
1709 %ifarch %itm_arch
1710 %versmainlib libitm.so
1711 %versmainlib libitm.a
1712 %versmainlib libitm.spec
1713 %endif
1714 %ifarch %atomic_arch
1715 %versmainlib libatomic.so
1716 %versmainlib libatomic.a
1717 %endif
1718 %ifarch %asan_arch
1719 %versmainlib libasan.so
1720 %versmainlib libasan.a
1721 %versmainlib libasan_preinit.o
1722 %endif
1723 %ifarch %tsan_arch
1724 %versmainlib libtsan.so
1725 %versmainlib libtsan.a
1726 %endif
1727 %doc %{_mandir}/man1/gcc%{binsuffix}.1.gz
1728 %doc %{_mandir}/man1/gcov%{binsuffix}.1.gz
1729
1730 %if %{separate_biarch}
1731 %files -n gcc@base_ver@%{separate_biarch_suffix}
1732 %defattr(-,root,root)
1733 %versbiarchlib *crt*.o
1734 %versbiarchlib libgcc*.a
1735 %versbiarchlib libgcov.a
1736 %versbiarchlib libgcc_s*.so
1737 %if %{build_with_mudflap}
1738 %versbiarchlib libmudflap.a
1739 %versbiarchlib libmudflap.so
1740 %versbiarchlib libmudflapth.a
1741 %versbiarchlib libmudflapth.so
1742 %endif
1743 %versbiarchlib libgomp.so
1744 %versbiarchlib libgomp.a
1745 %versbiarchlib libgomp.spec
1746 %ifarch %itm_arch
1747 %versbiarchlib libitm.so
1748 %versbiarchlib libitm.a
1749 %versbiarchlib libitm.spec
1750 %endif
1751 %ifarch %atomic_arch
1752 %versbiarchlib libatomic.a
1753 %versbiarchlib libatomic.so
1754 %endif
1755 %ifarch %asan_arch
1756 %versbiarchlib libasan.a
1757 %versbiarchlib libasan.so
1758 %versbiarchlib libasan_preinit.o
1759 %endif
1760 %if 0
1761 %ifarch %tsan_arch
1762 %versbiarchlib libtsan.a
1763 %versbiarchlib libtsan.so
1764 %endif
1765 %endif
1766 %endif
1767
1768 %files locale -f gcc@base_ver@-locale.lang
1769
1770 %files -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale
1771
1772 %if %{build_cp}
1773 %files c++
1774 %defattr(-,root,root)
1775 %dir %{_libdir}/gcc
1776 %dir %{_libdir}/gcc/%{GCCDIST}
1777 %dir %{libsubdir}
1778 %{_prefix}/bin/g++%{binsuffix}
1779 %doc %{_mandir}/man1/g++%{binsuffix}.1.gz
1780 %{libsubdir}/cc1plus
1781
1782 %files -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}
1783 %defattr(-,root,root)
1784 %mainlib libstdc++.so.%{libstdcxx_sover}*
1785
1786 %if %{separate_biarch}
1787 %files -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}%{separate_biarch_suffix}
1788 %defattr(-,root,root)
1789 %biarchlib libstdc++.so.%{libstdcxx_sover}*
1790 %endif
1791
1792 %files -n libstdc++@base_ver@-devel -f c++-headers
1793 %defattr(-,root,root)
1794 %versmainlib libstdc++.a
1795 %versmainlib libstdc++.so
1796 %versmainlib libsupc++.a
1797 %dir %{_datadir}/gdb
1798 %dir %{_datadir}/gdb/auto-load
1799 %dir %{_datadir}/gdb/auto-load%{_prefix}
1800 %dir %{_datadir}/gdb/auto-load/%{mainlibdir}
1801 %{_datadir}/gdb/auto-load/%{mainlibdir}/libstdc++.so.*-gdb.py
1802 %{_datadir}/gcc%{binsuffix}
1803
1804 %if %{separate_biarch}
1805 %files -n libstdc++@base_ver@-devel%{separate_biarch_suffix}
1806 %defattr(-,root,root)
1807 %versbiarchlib libstdc++.a
1808 %versbiarchlib libstdc++.so
1809 %versbiarchlib libsupc++.a
1810 %dir %{_datadir}/gdb/auto-load/%{mainlibdirbi}
1811 %{_datadir}/gdb/auto-load/%{mainlibdirbi}/libstdc++.so.*-gdb.py
1812 %endif
1813
1814 %files -n libstdc++@base_ver@-doc
1815 %defattr(-,root,root)
1816 %doc libstdc++-v3/doc/html
1817 %endif
1818
1819 %files -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}
1820 %defattr(-,root,root)
1821 /%{_lib}/libgcc_s.so.%{libgcc_s}
1822 %if %{biarch}
1823 %if %{build_primary_64bit}
1824 %if !%{separate_bi32}
1825 /lib/libgcc_s.so.%{libgcc_s}
1826 %endif
1827 %else
1828 %if !%{separate_bi64}
1829 /lib64/libgcc_s.so.%{libgcc_s}
1830 %endif
1831 %endif
1832 %endif
1833
1834 %if %{separate_bi64}
1835 %files -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-64bit
1836 %defattr(-,root,root)
1837 /lib64/libgcc_s.so.%{libgcc_s}
1838 %endif
1839
1840 %if %{separate_bi32}
1841 %files -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit
1842 %defattr(-,root,root)
1843 /lib/libgcc_s.so.%{libgcc_s}
1844 %endif
1845
1846
1847 %files -n libgomp%{libgomp_sover}%{libgomp_suffix}
1848 %defattr(-,root,root)
1849 %mainlib libgomp.so.%{libgomp_sover}*
1850
1851 %if %{separate_biarch}
1852 %files -n libgomp%{libgomp_sover}%{libgomp_suffix}%{separate_biarch_suffix}
1853 %defattr(-,root,root)
1854 %biarchlib libgomp.so.%{libgomp_sover}*
1855 %endif
1856
1857
1858 %ifarch %asan_arch
1859 %files -n libasan%{libasan_sover}%{libasan_suffix}
1860 %defattr(-,root,root)
1861 %mainlib libasan.so.%{libasan_sover}*
1862
1863 %if %{separate_biarch}
1864 %files -n libasan%{libasan_sover}%{libasan_suffix}%{separate_biarch_suffix}
1865 %defattr(-,root,root)
1866 %biarchlib libasan.so.%{libasan_sover}*
1867 %endif
1868 %endif
1869
1870
1871 %ifarch %tsan_arch
1872 %files -n libtsan%{libtsan_sover}%{libtsan_suffix}
1873 %defattr(-,root,root)
1874 %mainlib libtsan.so.%{libtsan_sover}*
1875
1876 %if 0
1877 %if %{separate_biarch}
1878 %files -n libtsan%{libtsan_sover}%{libtsan_suffix}%{separate_biarch_suffix}
1879 %defattr(-,root,root)
1880 %biarchlib libtsan.so.%{libtsan_sover}*
1881 %endif
1882 %endif
1883 %endif
1884
1885
1886 %ifarch %atomic_arch
1887 %files -n libatomic%{libatomic_sover}%{libatomic_suffix}
1888 %defattr(-,root,root)
1889 %mainlib libatomic.so.%{libatomic_sover}*
1890
1891 %if %{separate_biarch}
1892 %files -n libatomic%{libatomic_sover}%{libatomic_suffix}%{separate_biarch_suffix}
1893 %defattr(-,root,root)
1894 %biarchlib libatomic.so.%{libatomic_sover}*
1895 %endif
1896 %endif
1897
1898
1899 %ifarch %itm_arch
1900 %files -n libitm%{libitm_sover}%{libitm_suffix}
1901 %defattr(-,root,root)
1902 %mainlib libitm.so.%{libitm_sover}*
1903
1904 %if %{separate_biarch}
1905 %files -n libitm%{libitm_sover}%{libitm_suffix}%{separate_biarch_suffix}
1906 %defattr(-,root,root)
1907 %biarchlib libitm.so.%{libitm_sover}*
1908 %endif
1909 %endif
1910
1911
1912
1913 %if %{build_fortran}
1914 %files fortran
1915 %defattr(-,root,root)
1916 %dir %{libsubdir}/finclude
1917 %{_prefix}/bin/gfortran%{binsuffix}
1918 %{libsubdir}/f951
1919 %{libsubdir}/finclude/*
1920 %versmainlib libgfortran.a
1921 %versmainlib libgfortran.so
1922 %versmainlib libgfortran.spec
1923 %versmainlib libgfortranbegin.a
1924 %versmainlib libcaf_single.a
1925 %ifarch %quadmath_arch
1926 %{libsubdir}/include/quadmath.h
1927 %{libsubdir}/include/quadmath_weak.h
1928 %versmainlib libquadmath.a
1929 %versmainlib libquadmath.so
1930 %endif
1931 %doc %{_mandir}/man1/gfortran%{binsuffix}.1.gz
1932
1933 %if %{separate_biarch}
1934 %files fortran%{separate_biarch_suffix}
1935 %defattr(-,root,root)
1936 %versbiarchlib libgfortran.a
1937 %versbiarchlib libgfortran.so
1938 %versbiarchlib libgfortran.spec
1939 %versbiarchlib libgfortranbegin.a
1940 %versbiarchlib libcaf_single.a
1941 %ifarch %quadmath_arch
1942 %versbiarchlib libquadmath.a
1943 %versbiarchlib libquadmath.so
1944 %endif
1945 %endif
1946
1947 %files -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}
1948 %defattr(-,root,root)
1949 %mainlib libgfortran.so.%{libgfortran_sover}*
1950
1951 %if %{separate_biarch}
1952 %files -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}%{separate_biarch_suffix}
1953 %defattr(-,root,root)
1954 %biarchlib libgfortran.so.%{libgfortran_sover}*
1955 %endif
1956
1957 %ifarch %quadmath_arch
1958 %files -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}
1959 %defattr(-,root,root)
1960 %mainlib libquadmath.so.%{libquadmath_sover}*
1961
1962 %if %{separate_biarch}
1963 %files -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}%{separate_biarch_suffix}
1964 %defattr(-,root,root)
1965 %biarchlib libquadmath.so.%{libquadmath_sover}*
1966 %endif
1967 %endif
1968 %endif
1969
1970 %if %{build_with_mudflap}
1971 %files -n libmudflap@base_ver@
1972 %defattr(-,root,root)
1973 %mainlib libmudflap.so.%{libmudflap_sover}*
1974 %mainlib libmudflapth.so.%{libmudflap_sover}*
1975
1976 %if %{separate_biarch}
1977 %files -n libmudflap@base_ver@%{separate_biarch_suffix}
1978 %defattr(-,root,root)
1979 %biarchlib libmudflap.so.%{libmudflap_sover}*
1980 %biarchlib libmudflapth.so.%{libmudflap_sover}*
1981 %endif
1982 %endif
1983
1984 %files info
1985 %defattr(-,root,root)
1986 %doc %{_infodir}/*.gz
1987
1988 %files -n cpp@base_ver@
1989 %defattr(-,root,root)
1990 %dir %{_libdir}/gcc
1991 %dir %{_libdir}/gcc/%{GCCDIST}
1992 %dir %{libsubdir}
1993 %{_prefix}/bin/cpp%{binsuffix}
1994 %{libsubdir}/cc1
1995 #%{libsubdir}/specs
1996 %doc %{_mandir}/man1/cpp%{binsuffix}.1.gz
1997
1998 %if %{build_objc}
1999 %files objc
2000 %defattr(-,root,root)
2001 %{libsubdir}/cc1obj
2002 %{libsubdir}/include/objc
2003 %versmainlib libobjc.a
2004 %versmainlib libobjc.so
2005
2006 %if %{separate_biarch}
2007 %files objc%{separate_biarch_suffix}
2008 %defattr(-,root,root)
2009 %versbiarchlib libobjc.a
2010 %versbiarchlib libobjc.so
2011 %endif
2012
2013 %files -n libobjc%{libobjc_sover}%{libobjc_suffix}
2014 %defattr(-,root,root)
2015 %mainlib libobjc.so.%{libobjc_sover}*
2016
2017 %if %{separate_biarch}
2018 %files -n libobjc%{libobjc_sover}%{libobjc_suffix}%{separate_biarch_suffix}
2019 %defattr(-,root,root)
2020 %biarchlib libobjc.so.%{libobjc_sover}*
2021 %endif
2022 %endif
2023
2024
2025 %if %{build_objcp}
2026 %files obj-c++
2027 %defattr(-,root,root)
2028 %{libsubdir}/cc1objplus
2029 %endif
2030
2031
2032 %if %{build_ada}
2033 %files ada
2034 %defattr(-,root,root)
2035 %dir %{_libdir}/gcc
2036 %dir %{_libdir}/gcc/%{GCCDIST}
2037 %dir %{libsubdir}
2038 %{_prefix}/bin/gnat*
2039 %dir %{versmainlibdir}/adainclude
2040 %dir %{versmainlibdir}/adalib
2041 %{versmainlibdir}/adainclude
2042 %{versmainlibdir}/adalib/*.ali
2043 %{versmainlibdir}/adalib/*.a
2044 %{versmainlibdir}/adalib/libgnarl.so
2045 %{versmainlibdir}/adalib/libgnat.so
2046 %{versmainlibdir}/gnat1
2047
2048 %if %{separate_biarch}
2049 %files ada%{separate_biarch_suffix}
2050 %defattr(-,root,root)
2051 %dir %{versmainlibdirbi}/adainclude
2052 %dir %{versmainlibdirbi}/adalib
2053 %{versmainlibdirbi}/adainclude
2054 %{versmainlibdirbi}/adalib/*.ali
2055 %{versmainlibdirbi}/adalib/*.a
2056 %{versmainlibdirbi}/adalib/libgnarl.so
2057 %{versmainlibdirbi}/adalib/libgnat.so
2058 %endif
2059
2060 %files -n libada@base_ver@
2061 %defattr(-,root,root)
2062 %mainlib libgnarl-*.so
2063 %mainlib libgnat-*.so
2064
2065 %if %{separate_biarch}
2066 %files -n libada@base_ver@%{separate_biarch_suffix}
2067 %defattr(-,root,root)
2068 %biarchlib libgnarl-*.so
2069 %biarchlib libgnat-*.so
2070 %endif
2071 %endif
2072 # LIBJAVA-DELETE-END
2073
2074
2075 %if %{build_java}
2076 %if 0%{?building_libjava:1}
2077 %files -n gcc@base_ver@-java
2078 %defattr(-,root,root)
2079 %{_prefix}/bin/gcj%{binsuffix}
2080 %{_prefix}/bin/gcjh%{binsuffix}
2081 %{_prefix}/bin/gcj-dbtool%{binsuffix}
2082 %{_prefix}/bin/jcf-dump%{binsuffix}
2083 %{_prefix}/bin/jv-convert%{binsuffix}
2084 %{_prefix}/bin/gc-analyze%{binsuffix}
2085 %{_prefix}/bin/aot-compile%{binsuffix}
2086 %{_prefix}/bin/rebuild-gcj-db%{binsuffix}
2087 %{libsubdir}/jc1
2088 %{libsubdir}/jvgenmain
2089 %{libsubdir}/ecj.jar
2090 %{libsubdir}/ecj1
2091 %doc %{_mandir}/man1/gcj%{binsuffix}.1.gz
2092 %doc %{_mandir}/man1/gcjh%{binsuffix}.1.gz
2093 %doc %{_mandir}/man1/gcj-dbtool%{binsuffix}.1.gz
2094 %doc %{_mandir}/man1/jcf-dump%{binsuffix}.1.gz
2095 %doc %{_mandir}/man1/jv-convert%{binsuffix}.1.gz
2096 %doc %{_mandir}/man1/gc-analyze%{binsuffix}.1.gz
2097 %doc %{_mandir}/man1/aot-compile%{binsuffix}.1.gz
2098 %doc %{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1.gz
2099 %endif
2100 %endif
2101
2102 %if %{build_java}
2103 %if %{build_libjava}
2104 %files -n libgcj@base_ver@
2105 %defattr(-,root,root)
2106 %dir %{_libdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}
2107 %dir %{_libdir}/gcc
2108 %dir %{_libdir}/gcc/%{GCCDIST}
2109 %dir %{libsubdir}
2110 %{_libdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}/classmap.db
2111 # We usually do not multilib libjava
2112 %if %{biarch_libjava}
2113 %versbiarchlib libgcj.la
2114 %biarchlib libgcj.so.*
2115 %biarchlib libgij.so.*
2116 %biarchlib libgcj-tools.so.*
2117 %else
2118 %versmainlib libgcj.la
2119 %mainlib libgcj.so.*
2120 %mainlib libgij.so.*
2121 %mainlib libgcj-tools.so.*
2122 %endif
2123 %{_libdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}/libjvm.la
2124 %{_libdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}/libjvm.so
2125 %{_libdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}/libjavamath.la
2126 %{_libdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}/libjavamath.so
2127
2128 %files -n libgcj_bc%{libgcj_bc_sover}%{libgcj_bc_suffix}
2129 %defattr(-,root,root)
2130 %if %{biarch_libjava}
2131 %biarchlib libgcj_bc.so.%{libgcj_bc_sover}*
2132 %else
2133 %mainlib libgcj_bc.so.%{libgcj_bc_sover}*
2134 %endif
2135
2136 %files -n libgcj@base_ver@-jar
2137 %defattr(-,root,root)
2138 %{_prefix}/share/java/libgcj-%{gcc_dir_version}.jar
2139 %{_prefix}/share/java/libgcj-tools-%{gcc_dir_version}.jar
2140
2141 %files -n libgcj@base_ver@-devel
2142 %defattr(-,root,root)
2143 %dir %{_prefix}/include/c++
2144 %dir %{libsubdir}
2145 %dir %{libsubdir}/include
2146 %dir %{gxxinclude}
2147 %{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
2148 %{libsubdir}/include/jawt.h
2149 %{libsubdir}/include/jawt_md.h
2150 %{libsubdir}/include/jni.h
2151 %{libsubdir}/include/jni_md.h
2152 %{libsubdir}/include/jvmpi.h
2153 %{gxxinclude}/gnu
2154 %{gxxinclude}/gcj
2155 %{gxxinclude}/java
2156 %{gxxinclude}/javax
2157 %{gxxinclude}/org
2158 %{gxxinclude}/sun
2159 %{libsubdir}/include/gcj
2160 %if %{biarch_libjava}
2161 %versbiarchlib libgcj.so
2162 %versbiarchlib libgcj.spec
2163 %versbiarchlib libgcj-tools.so
2164 %versbiarchlib libgij.so
2165 %versbiarchlib libgcj_bc.so
2166 %else
2167 %versmainlib libgcj.so
2168 %versmainlib libgcj.spec
2169 %versmainlib libgcj-tools.so
2170 %versmainlib libgij.so
2171 %versmainlib libgcj_bc.so
2172 %endif
2173
2174 %files -n gcc@base_ver@-gij
2175 %defattr(-,root,root)
2176 %{_prefix}/bin/gij%{binsuffix}
2177 %{_prefix}/bin/gappletviewer%{binsuffix}
2178 %{_prefix}/bin/gjar%{binsuffix}
2179 %{_prefix}/bin/gjarsigner%{binsuffix}
2180 %{_prefix}/bin/gjavah%{binsuffix}
2181 %{_prefix}/bin/gkeytool%{binsuffix}
2182 %{_prefix}/bin/gnative2ascii%{binsuffix}
2183 %{_prefix}/bin/gorbd%{binsuffix}
2184 %{_prefix}/bin/grmic%{binsuffix}
2185 %{_prefix}/bin/grmid%{binsuffix}
2186 %{_prefix}/bin/grmiregistry%{binsuffix}
2187 %{_prefix}/bin/gserialver%{binsuffix}
2188 %{_prefix}/bin/gtnameserv%{binsuffix}
2189 %doc %{_mandir}/man1/gij%{binsuffix}.1.gz
2190 %doc %{_mandir}/man1/gappletviewer%{binsuffix}.1.gz
2191 %doc %{_mandir}/man1/grmic%{binsuffix}.1.gz
2192 %doc %{_mandir}/man1/grmid%{binsuffix}.1.gz
2193 %doc %{_mandir}/man1/grmiregistry%{binsuffix}.1.gz
2194 %doc %{_mandir}/man1/gkeytool%{binsuffix}.1.gz
2195 %doc %{_mandir}/man1/gjar%{binsuffix}.1.gz
2196 %doc %{_mandir}/man1/gjarsigner%{binsuffix}.1.gz
2197 %doc %{_mandir}/man1/gjavah%{binsuffix}.1.gz
2198 %doc %{_mandir}/man1/gnative2ascii%{binsuffix}.1.gz
2199 %doc %{_mandir}/man1/gorbd%{binsuffix}.1.gz
2200 %doc %{_mandir}/man1/gserialver%{binsuffix}.1.gz
2201 %doc %{_mandir}/man1/gtnameserv%{binsuffix}.1.gz
2202 %endif
2203 %endif
2204 # LIBFFI-DELETE-END
2205
2206 %if %{build_java}
2207 %if 0%{?building_libffi:1}
2208 %files -n libffi%{libffi_sover}%{libffi_suffix}
2209 %defattr(-,root,root)
2210 %mainlib libffi.so.%{libffi_sover}*
2211
2212 %if %{separate_biarch}
2213 %files -n libffi%{libffi_sover}%{libffi_suffix}%{separate_biarch_suffix}
2214 %defattr(-,root,root)
2215 %biarchlib libffi.so.%{libffi_sover}*
2216 %endif
2217
2218 %post -n libffi@base_ver@-devel
2219 %install_info --info-dir=%{_infodir} %{_infodir}/libffi%{binsuffix}.info.gz
2220 %postun -n libffi@base_ver@-devel
2221 %install_info_delete --info-dir=%{_infodir} %{_infodir}/libffi%{binsuffix}.info.gz
2222
2223 %files -n libffi@base_ver@-devel
2224 %defattr(-,root,root)
2225 %{_prefix}/include/ffi.h
2226 %{_prefix}/include/ffitarget.h
2227 %mainlib libffi.so
2228 %mainlib libffi.a
2229 %{_libdir}/pkgconfig/libffi.pc
2230 %doc %{_infodir}/libffi%{binsuffix}.info.gz
2231 %doc %{_mandir}/man3/ffi%{binsuffix}.3.gz
2232 %doc %{_mandir}/man3/ffi_call%{binsuffix}.3.gz
2233 %doc %{_mandir}/man3/ffi_prep_cif%{binsuffix}.3.gz
2234 %doc %{_mandir}/man3/ffi_prep_cif_var%{binsuffix}.3.gz
2235
2236 %if %{separate_biarch}
2237 %files -n libffi@base_ver@-devel%{separate_biarch_suffix}
2238 %defattr(-,root,root)
2239 %biarchlib libffi.so
2240 %biarchlib libffi.a
2241 %endif
2242 %endif
2243 %endif
2244 # GCC-TESTSUITE-DELETE-END
2245
2246 %if 0%{?run_tests:1}
2247 %files -n gcc@base_ver@-testresults
2248 %defattr(-,root,root)
2249 %doc testresults/test_summary.txt
2250 %doc testresults/*.sum
2251 %doc testresults/*.log
2252 %endif
2253
2254
2255 %changelog