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