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