1 %define building_libjava 1
3 # spec file for package gcc49
5 # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
7 # All modifications and additions to the file contributed by third parties
8 # remain the property of their copyright owners, unless otherwise agreed
9 # upon. The license for this file, and modifications and additions to the
10 # file, is the same license as for the pristine package itself (unless the
11 # license for the pristine package is not an Open Source License, in which
12 # case the license is the MIT License). An "Open Source License" is a
13 # license that conforms to the Open Source Definition (Version 1.9)
14 # published by the Open Source Initiative.
16 # Please submit bugfixes or comments via http://bugs.opensuse.org/
25 %define quadmath_arch %ix86 x86_64 ia64
26 %define tsan_arch x86_64
27 %define asan_arch x86_64 %ix86 ppc ppc64 %sparc %arm
28 %define itm_arch x86_64 %ix86 %arm ppc ppc64 ppc64le s390 s390x %sparc aarch64
29 %define atomic_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc m68k
30 %define lsan_arch x86_64
31 %define ubsan_arch x86_64 %ix86 ppc ppc64 %arm
32 %if 0%{?build_libvtv:1}
33 %define vtv_arch x86_64 %ix86
35 %define cilkrts_arch x86_64 %ix86
37 # We don't want to build java
39 %define build_libjava 0
41 # Also go and objc aren't needed right now
47 %define build_fortran !0%{?building_libjava:1}%{?building_libffi:1}
58 # For optional compilers only build C, C++ and Fortran
59 %if 0%{?build_optional_compiler_languages:1}
62 %define build_libjava 0
68 # Shared library SONAME versions
78 %define libgcj_sover %{nil}
79 %define libgcj_bc_sover %{nil}
80 %define libffi_sover %{nil}
81 %define libgomp_sover %{nil}
82 %define libstdcxx_sover %{nil}
83 %define libobjc_sover %{nil}
84 %define libgfortran_sover %{nil}
85 %define libquadmath_sover %{nil}
86 %define libasan_sover %{nil}
87 %define libtsan_sover %{nil}
88 %define libatomic_sover %{nil}
89 %define libitm_sover %{nil}
90 %define libubsan_sover %{nil}
91 %define liblsan_sover %{nil}
92 %define libvtv_sover %{nil}
93 %define libcilkrts_sover %{nil}
94 %define libgo_sover %{nil}
96 # Shared library package suffix
97 # This is used for the "non-standard" set of libraries, the standard
98 # being defined by %product_libs_gcc_ver, the GCC version that should
99 # provide un-suffixed shared library packages following the shared-library
100 # policy. Even suffixed variants should provide the shared-library policy
101 # mandated names and ensure they conflict with each other.
102 # Note that on SONAME changes of any library the %product_libs_gcc_ver
103 # define needs to be either split or the newest GCC version still providing
104 # the old SONAME needs to unconditionally produce an un-suffixed library
105 # if %product_libs_gcc_ver is newer than it. Similar the _oldest_ GCC
106 # version first providing a new SONAME needs to unconditionally produce
107 # an un-suffixed library if %product_libs_gcc_ver is lower that it.
108 %if %{!?product_libs_gcc_ver:49}%{?product_libs_gcc_ver} != 49
111 %define libgcc_s_suffix %{?pne:-gcc49}
112 # libgcj SONAME changes with every GCC version
113 %define libgcj_suffix %nil
114 %define libgcj_bc_suffix %{?pne:-gcc49}
115 %define libffi_suffix %{?pne:-gcc49}
116 %define libgomp_suffix %{?pne:-gcc49}
117 %define libstdcxx_suffix %{?pne:-gcc49}
118 %define libobjc_suffix %{?pne:-gcc49}
119 %define libgfortran_suffix %{?pne:-gcc49}
120 %define libquadmath_suffix %{?pne:-gcc49}
121 %define libasan_suffix %{?pne:-gcc49}
122 %define libtsan_suffix %{?pne:-gcc49}
123 %define libatomic_suffix %{?pne:-gcc49}
124 %define libitm_suffix %{?pne:-gcc49}
127 %define libubsan_suffix %{?pne:-gcc49}
128 %define liblsan_suffix %{?pne:-gcc49}
129 %define libvtv_suffix %{?pne:-gcc49}
130 %define libcilkrts_suffix %{?pne:-gcc49}
131 %define libgo_suffix %{?pne:-gcc49}
133 %define selfconflict() %1
136 # With generated files in src we could drop the following
139 BuildRequires: gettext-devel
140 BuildRequires: makeinfo
141 # until here, but at least renaming and patching info files breaks this
142 BuildRequires: gcc-c++
143 BuildRequires: glibc-devel-32bit
144 BuildRequires: mpc-devel
145 BuildRequires: mpfr-devel
147 BuildRequires: zlib-devel
148 %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm aarch64
149 BuildRequires: cloog-isl-devel
150 BuildRequires: isl-devel
153 %define hostsuffix -4.9
154 BuildRequires: gcc49-ada
156 %if 0%{?building_libjava:1}%{?building_testsuite:1}
157 BuildRequires: fastjar
159 %if 0%{?building_libffi:1}
160 BuildRequires: pkg-config
163 BuildRequires: libunwind-devel
166 BuildRequires: dejagnu
167 BuildRequires: expect
171 %define separate_bi32 0
172 %define separate_bi64 0
174 # Beware, this does _not_ separate libgcj, as for that one multilibing
175 # is inactive for the time being
176 %define separate_bi64 1
178 %ifarch x86_64 s390x ppc64 sparc64
179 %define separate_bi32 1
182 # Define two macros to trigger -32bit or -64bit package variants
183 %define separate_biarch 0
185 %define separate_biarch 1
186 %define separate_biarch_suffix -32bit
189 %define separate_biarch 1
190 %define separate_biarch_suffix -64bit
193 %ifarch x86_64 ia64 s390x alpha ppc64 sparc64 aarch64
194 # 64-bit is primary build target
195 %define build_primary_64bit 1
197 %define build_primary_64bit 0
200 %define biarch_libjava 0
202 %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64
204 URL: http://gcc.gnu.org/
207 %define gcc_dir_version 4.9
208 %define binsuffix -4.9
210 %if !0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
211 Requires: binutils glibc-devel
212 Requires: cpp49 = %{version}-%{release}
213 Requires: libgcc_s%{libgcc_s} >= %{version}-%{release}
214 Requires: libgomp%{libgomp_sover} >= %{version}-%{release}
216 Requires: libasan%{libasan_sover} >= %{version}-%{release}
219 Requires: libtsan%{libtsan_sover} >= %{version}-%{release}
222 Requires: libatomic%{libatomic_sover} >= %{version}-%{release}
225 Requires: libitm%{libitm_sover} >= %{version}-%{release}
227 %ifarch %cilkrts_arch
228 Requires: libcilkrts%{libcilkrts_sover} >= %{version}-%{release}
231 Requires: liblsan%{liblsan_sover} >= %{version}-%{release}
234 Requires: libubsan%{libubsan_sover} >= %{version}-%{release}
237 Requires: libvtv%{libvtv_sover} >= %{version}-%{release}
239 Requires: gcc49-info gcc49-locale
242 BuildRoot: %{_tmppath}/%{name}-%{version}-build
243 Source: gcc-%{version}.tar.bz2
245 Source2: libffi49-rpmlintrc
246 Source3: gcc49-rpmlintrc
248 Source5: baselibs.conf
249 Source6: libgcj49-rpmlintrc
251 Summary: Java Runtime Library for gcc
252 License: GPL-2.0-with-classpath-exception
253 Group: Development/Building
254 Requires: libgcj49-jar = %{version}-%{release}
255 Provides: libgcj%{libgcj_sover} = %{version}-%{release}
256 Provides: libgij%{libgcj_sover} = %{version}-%{release}
257 Provides: libgcj-tools%{libgcj_sover} = %{version}-%{release}
260 This library is needed if you want to use the GNU Java compiler, gcj.
261 Source code for this package is in gcc.
263 %post -n libgcj49 -p /sbin/ldconfig
265 %postun -n libgcj49 -p /sbin/ldconfig
268 %package -n gcc49-java
269 Summary: The GNU Java Compiler
271 Group: Development/Languages
272 Requires: gcc49 = %{version}
273 Requires: libgcj49-devel = %{version}-%{release}
275 %description -n gcc49-java
276 The Java compiler from the GCC-tools-suite.
279 %package -n libgcj_bc%{libgcj_bc_sover}%{libgcj_bc_suffix}
280 Summary: Fake library for BC-ABI compatibility.
281 License: GPL-2.0-with-classpath-exception
282 Group: Development/Languages
283 # libgcj_bc is special in that it just contains a symlink to
284 # a proper libgcj version. So require that library and add
285 # provides for the shlib version as created at link time
286 Requires: libgcj%{libgcj_sover} >= %{version}-%{release}
287 %ifarch x86_64 ia64 ppc64 s390x sparc64 aarch64
288 Provides: libgcj_bc.so.%{libgcj_bc_sover}()(64bit)
290 Provides: libgcj_bc.so.%{libgcj_bc_sover}
292 Provides: libgcj_bc%{libgcj_bc_sover} = %{version}-%{release}
294 %description -n libgcj_bc%{libgcj_bc_sover}%{libgcj_bc_suffix}
295 A fake library that is used at link time only. It ensures that
296 binaries built with the BC-ABI link against a constant SONAME.
297 This way, BC-ABI binaries continue to work if the SONAME underlying
301 %package -n libgcj49-jar
302 Summary: Java runtime library (jar files).
303 License: GPL-2.0-with-classpath-exception
304 Group: Development/Languages
306 %description -n libgcj49-jar
307 These are the jar files that go along with the gcj front end to gcc.
310 %package -n libgcj49-devel
311 Summary: Include Files and Libraries mandatory for Development.
312 License: GPL-2.0-with-classpath-exception
313 Group: Development/Languages
314 Requires: libgcj%{libgcj_sover} >= %{version}-%{release}
315 Requires: libgcj_bc%{libgcj_bc_sover} >= %{version}-%{release}
316 Requires: libgcj49-jar = %{version}-%{release}
318 %description -n libgcj49-devel
319 This package contains all necessary include files and libraries needed
320 to develop applications that require these.
323 %package -n gcc49-gij
324 Summary: Java Bytecode Interpreter for gcc
325 License: GPL-2.0-with-classpath-exception
326 Group: Development/Languages
327 Requires: libgcj%{libgcj_sover} >= %{version}-%{release}
329 %description -n gcc49-gij
330 This package contains the java bytecode interpreter gij and related tools.
333 %package -n libstdc++49-doc
334 Summary: Documentation for the GNU C++ standard library
336 Group: Development/Building
339 %description -n libstdc++49-doc
340 Extensive HTML documentation for the GNU C++ standard library.
343 %package -n libffi%{libffi_sover}%{libffi_suffix}
344 Summary: Foreign Function Interface library
345 License: BSD-3-Clause
346 Group: Development/Building
347 Provides: libffi%{libffi_sover} = %{version}-%{release}
349 %description -n libffi%{libffi_sover}%{libffi_suffix}
350 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.
352 %post -n libffi%{libffi_sover}%{libffi_suffix} -p /sbin/ldconfig
354 %postun -n libffi%{libffi_sover}%{libffi_suffix} -p /sbin/ldconfig
355 %package -n libffi%{libffi_sover}%{libffi_suffix}-32bit
356 Summary: Foreign Function Interface library
357 License: BSD-3-Clause
358 Group: Development/Building
359 Provides: libffi%{libffi_sover}-32bit = %{version}-%{release}
361 %description -n libffi%{libffi_sover}%{libffi_suffix}-32bit
362 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.
364 %post -n libffi%{libffi_sover}%{libffi_suffix}-32bit -p /sbin/ldconfig
366 %postun -n libffi%{libffi_sover}%{libffi_suffix}-32bit -p /sbin/ldconfig
367 %package -n libffi%{libffi_sover}%{libffi_suffix}-64bit
368 Summary: Foreign Function Interface library
369 License: BSD-3-Clause
370 Group: Development/Building
371 Provides: libffi%{libffi_sover}-64bit = %{version}-%{release}
373 %description -n libffi%{libffi_sover}%{libffi_suffix}-64bit
374 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.
376 %post -n libffi%{libffi_sover}%{libffi_suffix}-64bit -p /sbin/ldconfig
378 %postun -n libffi%{libffi_sover}%{libffi_suffix}-64bit -p /sbin/ldconfig
380 %package -n libffi49-devel
381 Summary: Foreign Function Interface library development files
382 License: BSD 3-Clause
383 Group: Development/Building
384 Requires: libffi%{libffi_sover} >= %{version}-%{release}
385 Provides: libffi-devel = %{version}-%{release}
387 %description -n libffi49-devel
388 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.
389 %package -n libffi49-devel-32bit
390 Summary: Foreign Function Interface library development files
391 License: BSD 3-Clause
392 Group: Development/Building
393 Requires: libffi%{libffi_sover}-32bit >= %{version}-%{release}
394 Provides: libffi-devel-32bit = %{version}-%{release}
396 %description -n libffi49-devel-32bit
397 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.
398 %package -n libffi49-devel-64bit
399 Summary: Foreign Function Interface library development files
400 License: BSD 3-Clause
401 Group: Development/Building
402 Requires: libffi%{libffi_sover}-64bit >= %{version}-%{release}
403 Provides: libffi-devel-64bit = %{version}-%{release}
405 %description -n libffi49-devel-64bit
406 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.
409 Summary: GNU Go Compiler
411 Group: Development/Languages
412 Requires: gcc49 = %{version}-%{release}
413 Requires: libgo%{libgo_sover} >= %{version}-%{release}
416 This package contains a Go compiler and associated development
417 files based on the GNU GCC technology.
419 Summary: GNU Go Compiler
421 Group: Development/Languages
422 Requires: gcc49-32bit = %{version}-%{release}
423 Requires: libgo%{libgo_sover}-32bit >= %{version}-%{release}
425 %description go-32bit
426 This package contains a Go compiler and associated development
427 files based on the GNU GCC technology.
429 Summary: GNU Go Compiler
431 Group: Development/Languages
432 Requires: gcc49-64bit = %{version}-%{release}
433 Requires: libgo%{libgo_sover}-64bit >= %{version}-%{release}
435 %description go-64bit
436 This package contains a Go compiler and associated development
437 files based on the GNU GCC technology.
439 %package -n libgo%{libgo_sover}%{libgo_suffix}
440 Summary: GNU Go compiler runtime library
441 License: BSD-3-Clause
442 Group: Development/Languages
443 Provides: libgo%{libgo_sover} = %{version}-%{release}
445 %description -n libgo%{libgo_sover}%{libgo_suffix}
446 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.
448 %post -n libgo%{libgo_sover}%{libgo_suffix} -p /sbin/ldconfig
450 %postun -n libgo%{libgo_sover}%{libgo_suffix} -p /sbin/ldconfig
451 %package -n libgo%{libgo_sover}%{libgo_suffix}-32bit
452 Summary: GNU Go compiler runtime library
453 License: BSD-3-Clause
454 Group: Development/Languages
455 Provides: libgo%{libgo_sover}-32bit = %{version}-%{release}
457 %description -n libgo%{libgo_sover}%{libgo_suffix}-32bit
458 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.
460 %post -n libgo%{libgo_sover}%{libgo_suffix}-32bit -p /sbin/ldconfig
462 %postun -n libgo%{libgo_sover}%{libgo_suffix}-32bit -p /sbin/ldconfig
463 %package -n libgo%{libgo_sover}%{libgo_suffix}-64bit
464 Summary: GNU Go compiler runtime library
465 License: BSD-3-Clause
466 Group: Development/Languages
467 Provides: libgo%{libgo_sover}-64bit = %{version}-%{release}
469 %description -n libgo%{libgo_sover}%{libgo_suffix}-64bit
470 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.
472 %post -n libgo%{libgo_sover}%{libgo_suffix}-64bit -p /sbin/ldconfig
474 %postun -n libgo%{libgo_sover}%{libgo_suffix}-64bit -p /sbin/ldconfig
477 %package -n gcc49-testresults
478 Summary: Testsuite results
479 License: SUSE-Public-Domain
480 Group: Development/Languages
482 %description -n gcc49-testresults
483 Results from running the gcc and target library testsuites.
488 # Define the canonical target and host architecture
489 # %gcc_target_arch is supposed to be the full target triple
490 # %TARGET_ARCH is the canonicalized CPU part
491 # %CONFIGURE_TARGET is the target triple used for --target=
492 %if 0%{?gcc_target_arch:1}
493 %define CONFIGURE_TARGET %{gcc_target_arch}
494 %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/;")
495 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc"
496 %define CONFIGURE_TARGET powerpc64-tizen-linux
498 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "powerpc64"
499 %define CONFIGURE_TARGET powerpc64-tizen-linux
501 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
502 %define CONFIGURE_TARGET i586-tizen-linux
504 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "aarch64"
505 %define CONFIGURE_TARGET aarch64-tizen-linux
507 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l"
508 %define CONFIGURE_TARGET armv7l-tizen-linux-gnueabi
510 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
511 %define CONFIGURE_TARGET armv7hl-tizen-linux-gnueabi
513 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5tel"
514 %define CONFIGURE_TARGET armv5tel-tizen-linux-gnueabi
517 %define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
519 %define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
521 %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
523 %define GCCDIST powerpc64-tizen-linux
526 %define GCCDIST sparc64-tizen-linux
529 %define GCCDIST %{HOST_ARCH}-tizen-linux-gnueabi
531 %define GCCDIST %{HOST_ARCH}-tizen-linux
536 %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
537 %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
540 # Versionspecific directories
541 %define versmainlibdir %{libsubdir}
542 %define versmainlibdirbi32 %{libsubdir}/32
543 %define versmainlibdirbi64 %{libsubdir}/64
545 %define versmainlibdirbi32 %{libsubdir}
546 %define versmainlibdirbi64 %{libsubdir}/64
548 %if %{build_primary_64bit}
549 %define versmainlibdirbi %{versmainlibdirbi32}
551 %define versmainlibdirbi %{versmainlibdirbi64}
554 %define mainlibdir %{_libdir}
555 %define mainlibdirbi32 %{_prefix}/lib
556 %define mainlibdirbi64 %{_prefix}/lib64
557 %if %{build_primary_64bit}
558 %define mainlibdirbi %{mainlibdirbi32}
560 %define mainlibdirbi %{mainlibdirbi64}
564 # Now define a few macros that make it easy to package libs and
565 # related files just to the right package, without caring for the
566 # exact path the files are in.
567 # %mainlib package X from all dirs that belong to the main package
568 # %biarchlib package X from all dirs that belong to the -32/64bit package
569 %define mainlib() %{mainlibdir}/%1\
571 %define biarchlib() %{nil}
573 %if !%{separate_biarch}
574 %define mainlib() %{mainlibdir}/%1\
578 %define biarchlib() %{mainlibdirbi}/%1\
583 %define versmainlib() %{versmainlibdir}/%1\
585 %define versbiarchlib() %{nil}
587 %if !%{separate_biarch}
588 %define versmainlib() %{versmainlibdir}/%1\
589 %{versmainlibdirbi}/%1\
592 %define versbiarchlib() %{versmainlibdirbi}/%1\
600 %setup -q -n gcc-%{version}
602 # We are configuring ppc as ppc64 but with switched multilibs. Adjust
603 # the libstdc++ abi testsuite baseline files accordingly
605 if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
606 mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
607 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt \
608 libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64/
609 mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt \
610 libstdc++-v3/config/abi/post/powerpc64-linux-gnu/
615 # Avoid rebuilding of generated files
616 contrib/gcc_update --touch
617 # Avoid fucking up testsuite results with Java and indirect dispatch
618 export LD_AS_NEEDED=0
619 # Split version file into version used for directories (X.Y) and
620 # version to report with --version (X.Y.Z).
621 # See also gcc-dir-version.patch.
622 # Also decrement the patchlevel version by one if possible and remove
623 # the 'prerelease' tagging in this case
624 if test `cat gcc/DEV-PHASE` == "prerelease"; then
625 if test `cat gcc/BASE-VER | cut -d '.' -f 3` != "0"; then
628 ( 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
630 mv gcc/BASE-VER gcc/FULL-VER
632 cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
634 rm -rf obj-%{GCCDIST}
637 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' -e 's/-fexceptions//' -e 's/\([[:space:]]\+.*-D_FORTIFY_SOURCE=\)[[:alnum:]]\+/\10/g'
638 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D__USE_FORTIFY_LEVEL=0"`
640 # -mcpu is superceded by -mtune but -mtune is not supported by
641 # our bootstrap compiler. -mcpu gives a warning that stops
642 # the build process, so remove it for now. Also remove all other
643 # -march and -mtune flags. They are superseeded by proper
644 # default compiler settings now.
645 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'`
648 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fsigned-char//g'`
649 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-O1/-O2/g'`
651 %if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
652 # Kill all -march/tune/cpu because that screws building the target libs
653 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
655 # Replace 2 spaces by one finally
656 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
660 languages=$languages,c++
663 languages=$languages,objc
666 languages=$languages,fortran
669 languages=$languages,obj-c++
672 languages=$languages,java
675 languages=$languages,ada
678 languages=$languages,go
682 if test -z "$J"; then
683 J=$(getconf _NPROCESSORS_CONF)
686 test 1 -gt "$J" && J=1
687 JL=$(($(getconf _NPROCESSORS_CONF)*2))
689 if test "$J" == "0"; then
692 if test "$JL" == "0"; then
695 PARALLEL="-j$J -l$JL"
697 # we don't want some miscompiles in the testsuite, or some fault in
698 # the compiler to kill the machine. Hence we limit the amount of memory
699 # by the physical RAM plus half of swap
700 #MEM=$(free -m | awk '/^Mem:/ {print $2}')
701 #SWAP=$(free -m | awk '/^Swap:/ {print $2}')
702 #ulimit -v $(((MEM + SWAP/2)*1024))
704 # In general we want to ship release checking enabled compilers
705 # and run BETA with checking enabled.
706 #ENABLE_CHECKING="--enable-checking=yes"
707 ENABLE_CHECKING="--enable-checking=release"
709 # Work around tail/head -1 changes
710 export _POSIX2_VERSION=199209
713 # Using the host gnatmake like
714 # CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
715 # GNATMAKE="gnatmake%{hostsuffix}"
716 # doesn't work due to PR33857, so an un-suffixed gnatmake has to be
718 mkdir -p host-tools/bin
719 cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
720 cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
721 cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
722 cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
723 ln -sf /usr/%{_lib} host-tools/%{_lib}
724 export PATH="`pwd`/host-tools/bin:$PATH"
726 #%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
728 # --enable-threads=posix \
731 %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl"
732 # temporary workaround for a miscompilation of hash functions in java code
733 GCJ_EXTRA_FLAGS="-marm"
736 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
737 TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS $GCJ_EXTRA_FLAGS" \
739 --prefix=%{_prefix} \
740 --infodir=%{_infodir} \
741 --mandir=%{_mandir} \
742 --libdir=%{_libdir} \
743 --libexecdir=%{_libdir} \
744 --enable-languages=$languages \
746 --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
749 --disable-bootstrap \
750 %if 0%{!?build_libvtv:1}
754 --with-bugurl="http://bugs.tizen.org/" \
755 --with-pkgversion="Tizen" \
756 %if !%{build_fortran}
757 --disable-libquadmath \
759 %if !%{build_libjava}
762 --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
763 --with-ecj-jar=%{libsubdir}/ecj.jar \
765 %if !%{biarch_libjava}
766 --disable-libjava-multilib \
769 --with-slibdir=/%{_lib} \
771 --enable-__cxa_atexit \
772 --enable-libstdcxx-allocator=new \
773 --disable-libstdcxx-pch \
774 --enable-version-specific-runtime-libs \
775 --enable-linker-build-id \
776 --enable-linux-futex \
777 --program-suffix=%{binsuffix} \
778 %if 0%{!?gcc_target_arch:1}
780 --with-system-libunwind \
782 --without-system-libunwind \
785 %if 0%{?gcc_target_arch:1}
786 --program-prefix=%{gcc_target_arch}- \
787 --target=%{gcc_target_arch} \
790 --with-sysroot=%sysroot \
792 --with-sysroot=%{_prefix}/%{gcc_target_arch} \
794 %if 0%{?build_sysroot:1}
795 --with-build-sysroot=%{build_sysroot} \
798 --with-build-sysroot=%{sysroot} \
800 --with-build-sysroot=%{_prefix}/%{gcc_target_arch} \
803 %if 0%{?canonical_target:1}
804 --with-build-time-tools=/usr/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
806 %if "%{TARGET_ARCH}" == "spu"
807 --with-gxx-include-dir=%sysroot/include/c++/%{gcc_dir_version} \
811 %if "%{TARGET_ARCH}" == "armv5tel"
812 --with-arch=armv5te \
815 --with-abi=aapcs-linux \
816 --disable-sjlj-exceptions \
818 %if "%{TARGET_ARCH}" == "armv7l"
819 --with-arch=armv7-a \
820 --with-tune=cortex-a8 \
821 --with-float=softfp \
824 --disable-sjlj-exceptions \
826 %if "%{TARGET_ARCH}" == "armv7hl"
827 --with-arch=armv7-a \
828 --with-tune=cortex-a9 \
830 --with-abi=aapcs-linux \
831 --with-fpu=vfpv3-d16 \
832 --disable-sjlj-exceptions \
834 %if "%{TARGET_ARCH}" == "aarch64"
835 --with-arch=armv8-a \
836 --disable-sjlj-exceptions \
838 %if "%{TARGET_ARCH}" == "powerpc" || "%{TARGET_ARCH}" == "powerpc64"
839 %if "%{TARGET_ARCH}" == "powerpc"
840 --with-cpu=default32 \
842 %if "%{TARGET_ARCH}" == "powerpc64le"
845 --with-cpu-64=power4 \
848 --with-long-double-128 \
849 %if "%{TARGET_ARCH}" == "powerpc64le"
853 %if "%{TARGET_ARCH}" == "sparc64"
854 --with-cpu=ultrasparc \
855 --with-long-double-128 \
857 %if "%{TARGET_ARCH}" == "sparc"
859 --with-long-double-128 \
861 %if "%{TARGET_ARCH}" == "i586"
862 --with-arch-32=i586 \
863 --with-tune=generic \
865 %if "%{TARGET_ARCH}" == "x86_64"
866 --with-arch-32=i586 \
867 --with-tune=generic \
870 %if "%{TARGET_ARCH}" == "s390"
871 --with-tune=zEC12 --with-arch=z196 \
872 --with-long-double-128 \
873 --enable-decimal-float \
875 %if "%{TARGET_ARCH}" == "s390x"
876 --with-tune=zEC12 --with-arch=z196 \
877 --with-long-double-128 \
878 --enable-decimal-float \
880 %if "%{TARGET_ARCH}" == "m68k"
887 %if 0%{?building_libffi:1}
888 make stage1-bubble $PARALLEL
889 make all-target-libffi $PARALLEL
892 # Only run profiled bootstrap on archs where it works and matters
893 %ifarch ppc64le s390x
894 make profiledbootstrap STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
896 make STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
899 %if 0%{?building_libjava:1}
900 make -C %{GCCDIST}/libstdc++-v3/doc doc-html-doxygen
904 (make -C %{GCCDIST}/libstdc++-v3 check-abi || true)
905 mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.log %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.log
906 mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.sum %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.sum
907 # asan needs a whole shadow address space
908 ulimit -v unlimited || true
909 make -k check $PARALLEL || true
911 ../contrib/test_summary | tee ../testresults/test_summary.txt
916 export NO_BRP_CHECK_BYTECODE_VERSION=true
918 # Work around tail/head -1 changes
919 export _POSIX2_VERSION=199209
920 export LIBRARY_PATH=$RPM_BUILD_ROOT%{libsubdir}:$RPM_BUILD_ROOT%{mainlibdirbi}
921 %if 0%{?building_libffi:1}
922 make -C %{GCCDIST}/libffi install DESTDIR=$RPM_BUILD_ROOT
924 %if 0%{?building_libjava:1}
925 make -C %{GCCDIST}/libjava install DESTDIR=$RPM_BUILD_ROOT
926 make -C gcc java.install-man DESTDIR=$RPM_BUILD_ROOT
927 make -C gcc java.install-common DESTDIR=$RPM_BUILD_ROOT
928 make -C gcc install-common DESTDIR=$RPM_BUILD_ROOT COMPILERS='jc1$(exeext) jvgenmain$(exeext)'
929 # copy the libstdc++ API reference
930 cp -r %{GCCDIST}/libstdc++-v3/doc/doxygen/html ../libstdc++-v3/doc/html/api
931 # install-common also installs collect2, gcov and the g++ and gfortran driver
933 rm $RPM_BUILD_ROOT%{_prefix}/bin/g++%{binsuffix}
936 rm $RPM_BUILD_ROOT%{_prefix}/bin/gfortran%{binsuffix}
938 rm $RPM_BUILD_ROOT%{_prefix}/bin/gcov%{binsuffix}
939 rm $RPM_BUILD_ROOT%{libsubdir}/collect2
941 make install DESTDIR=$RPM_BUILD_ROOT
943 make -C gcc java.uninstall DESTDIR=$RPM_BUILD_ROOT
944 make -C gcc java.install-info DESTDIR=$RPM_BUILD_ROOT
945 rm $RPM_BUILD_ROOT%{_prefix}/bin/jcf-dump%{binsuffix}
946 rm $RPM_BUILD_ROOT%{_mandir}/man1/jcf-dump%{binsuffix}.1
947 rm $RPM_BUILD_ROOT%{libsubdir}/jc1
948 rm $RPM_BUILD_ROOT%{libsubdir}/jvgenmain
953 # Remove libffi installed files if we did not want to build it
954 %if !0%{?building_libffi:1}
955 rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.*
957 rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.*
959 rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h
960 rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h
961 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi%{binsuffix}.3*
962 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_call%{binsuffix}.3*
963 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_prep_cif%{binsuffix}.3*
964 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_prep_cif_var%{binsuffix}.3*
967 # Remove some useless .la files
968 for lib in libobjc libgfortran libgfortranbegin libquadmath libcaf_single \
969 libgomp libstdc++ libsupc++ libgcj-tools libgij libgo \
970 libasan libatomic libitm libtsan libcilkrts liblsan libubsan libvtv; do
971 rm -f $RPM_BUILD_ROOT%{versmainlibdir}/$lib.la
973 rm -f $RPM_BUILD_ROOT%{versmainlibdirbi}/$lib.la
977 mkdir -p $RPM_BUILD_ROOT%{_libdir}
979 %if %{build_primary_64bit}
980 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib
982 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib64
987 # move shared libs from versionspecific dir to main libdir
989 %if 0%{?building_libjava:1}
990 libgcj libgij libgcj-tools \
994 %ifarch %quadmath_arch
1008 %ifarch %atomic_arch
1020 %ifarch %cilkrts_arch
1034 for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name $libname.so.*`; do
1035 mv $lib $RPM_BUILD_ROOT%{mainlibdir}/
1037 ln -sf %{mainlibdir}/`readlink $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \
1038 $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so
1040 if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then
1041 for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name "$libname.so.*"`; do
1042 mv $lib $RPM_BUILD_ROOT%{mainlibdirbi}/
1044 ln -sf %{mainlibdirbi}/`readlink $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \
1045 $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so
1049 # FIXME, tsan and lsan are not multilib
1052 rm -f $RPM_BUILD_ROOT%{versmainlibdirbi}/libtsan.so
1057 rm -f $RPM_BUILD_ROOT%{versmainlibdirbi}/liblsan.so
1061 %if !0%{?building_libjava:1}
1062 # And we want to move the shlib gdb pretty printers to a more sane
1063 # place so ldconfig does not complain
1064 mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}
1065 mv $RPM_BUILD_ROOT%{mainlibdir}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/
1066 sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/libstdc++.so.*-gdb.py
1068 if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then
1069 mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}
1070 mv $RPM_BUILD_ROOT%{mainlibdirbi}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/
1071 sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/libstdc++.so.*-gdb.py
1076 %if 0%{?building_libjava:1}
1077 # libgcj_bc is special as the .so file is actually a different
1078 # library as the library refered to by the SONAME which should
1079 # be a simple link to our libgcj.
1080 for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name libgcj_bc.so.*`; do
1083 ln -s libgcj.so.%{libgcj_sover} $RPM_BUILD_ROOT%{mainlibdir}/libgcj_bc.so.%{libgcj_bc_sover}
1084 %if %{biarch_libjava}
1085 for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name libgcj_bc.so.*`; do
1088 ln -s libgcj.so.%{libgcj_sover} $RPM_BUILD_ROOT%{mainlibdirbi}/libgcj_bc.so.%{libgcj_bc_sover}
1090 mv $RPM_BUILD_ROOT%{libsubdir}/pkgconfig $RPM_BUILD_ROOT%{_libdir}/
1095 mv $RPM_BUILD_ROOT%{libsubdir}/adalib/lib*-*.so $RPM_BUILD_ROOT%{_libdir}
1096 ln -sf %{_libdir}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnarl.so
1097 ln -sf %{_libdir}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnat.so
1098 chmod a+x $RPM_BUILD_ROOT%{_libdir}/libgna*-*.so
1100 mv $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/lib*-*.so $RPM_BUILD_ROOT%{mainlibdirbi}/
1101 ln -sf %{mainlibdirbi}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
1102 ln -sf %{mainlibdirbi}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
1103 chmod a+x $RPM_BUILD_ROOT%{mainlibdirbi}/libgna*-*.so
1107 rm -f $RPM_BUILD_ROOT%{_prefix}/bin/c++%{binsuffix}
1109 # Remove some crap from the .la files:
1110 for l in `find $RPM_BUILD_ROOT -name '*.la'`; do
1112 # -e '/^dependency_libs/s|%{libsubdir}/\([^.]*\)\.la |%{_libdir}/\1\.la |g'
1113 sed -e '/^dependency_libs/s| -L%{_builddir}/[^ ]*||g' \
1114 -e '/^dependency_libs/s| -L/usr/%{GCCDIST}/bin||g' \
1115 -e '/^dependency_libs/s|-lm \(-lm \)*|-lm |' \
1116 -e '/^dependency_libs/s|-L[^ ]* ||g' \
1118 %if %{build_primary_64bit}
1119 -e '/^libdir/s|%{_libdir}/32|%{_prefix}/lib|' \
1120 -e '/^libdir/s|lib64/\.\./||' \
1122 -e '/^libdir/s|%{_libdir}/64|%{_prefix}/lib64|' \
1129 %if 0%{?run_tests:1}
1130 cp `find . -name "*.sum"` ../testresults/
1131 cp `find . -name "*.log" \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
1132 chmod 644 ../testresults/*
1135 # Find C++ and Java headers
1136 find $RPM_BUILD_ROOT%{_prefix}/include/c++ \
1137 -regex ".*/\(org\|gcj\|gnu\|java\|javax\)" -prune \
1138 -o \( -type d -printf "%%%%dir " , \
1139 -printf "%{_prefix}/include/c++/%%P\n" \) > ../c++-headers
1141 # Remove files that we do not need to clean up filelist
1142 rm -f $RPM_BUILD_ROOT%{_prefix}/bin/%{GCCDIST}-*
1143 rm -rf $RPM_BUILD_ROOT%{libsubdir}/install-tools
1144 #rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
1145 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/zutil.h
1146 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux/a.out.h
1147 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-generic/socket.h
1149 rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin
1150 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
1153 %if 0%{?building_libjava:1}
1154 # gcj -static doesn't work properly anyway, unless using --whole-archive
1155 # let's save the space instead.
1156 find $RPM_BUILD_ROOT -name libgcj.a \
1157 -o -name libgcj-tools.a \
1160 -o -name libgcj_bc.a \
1163 find $RPM_BUILD_ROOT -name libgcj.spec | xargs \
1164 sed -i -e 's/lib: /&%%{static:%%eJava programs cannot be linked statically}/'
1166 # security files have broken install locations, also they cause conflicts
1167 # between libgcj versions. Simply delete them here, libgcj will use its
1168 # defaults in this case (which is what these files contain anyway).
1169 rm -f $RPM_BUILD_ROOT%{libsubdir}/logging.properties
1170 rm -r $RPM_BUILD_ROOT%{libsubdir}/security
1173 %if 0%{?building_libffi:1}
1174 # Move libffi headers, remove empty libffi libtool file
1175 mkdir -p $RPM_BUILD_ROOT%{_prefix}/include
1176 mv $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h $RPM_BUILD_ROOT%{_prefix}/include/
1177 mv $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h $RPM_BUILD_ROOT%{_prefix}/include/
1178 rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.la
1180 rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.la
1182 # Generate a simple pkg-config file
1183 mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig
1184 echo -e 'Name: libffi\nVersion: 3.0.9\nDescription: libffi\nLibs: -lffi' > $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libffi.pc
1188 %if !%{build_libjava}
1189 rm $RPM_BUILD_ROOT%{_mandir}/man1/jv-convert%{binsuffix}.1
1190 rm $RPM_BUILD_ROOT%{_mandir}/man1/gcj-dbtool%{binsuffix}.1
1191 rm $RPM_BUILD_ROOT%{_mandir}/man1/gij%{binsuffix}.1
1192 rm $RPM_BUILD_ROOT%{_mandir}/man1/grmic%{binsuffix}.1
1193 rm $RPM_BUILD_ROOT%{_mandir}/man1/gc-analyze%{binsuffix}.1
1194 rm $RPM_BUILD_ROOT%{_mandir}/man1/aot-compile%{binsuffix}.1
1195 rm $RPM_BUILD_ROOT%{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1
1197 rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/aotcompile.py
1198 rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/classfile.py
1200 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
1201 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
1202 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
1203 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
1205 %if %{build_primary_64bit}
1206 rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libiberty.a
1208 rm -f $RPM_BUILD_ROOT%{_prefix}/lib64/libiberty.a
1211 rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.a
1212 rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.la
1214 # gccgo.info isn't properly versioned
1215 rm $RPM_BUILD_ROOT%{_infodir}/gccgo.info*
1218 %if 0%{?building_libjava:1}
1219 # For building libjava only we need to delete other info docs
1220 rm $RPM_BUILD_ROOT%{_infodir}/cp-tools.info*
1221 # Remove stale manpages for binaries we do not build
1222 rm $RPM_BUILD_ROOT%{_mandir}/man1/gjdoc%{binsuffix}.1
1223 # For building the java frontend we need to copy the ecj jar
1224 mkdir -p $RPM_BUILD_ROOT%{libsubdir}
1225 cp $RPM_SOURCE_DIR/ecj.jar $RPM_BUILD_ROOT%{libsubdir}
1227 # For regular build, some info files do not get renamed properly.
1229 mv $RPM_BUILD_ROOT%{_infodir}/libgomp.info $RPM_BUILD_ROOT%{_infodir}/libgomp%{binsuffix}.info
1231 mv $RPM_BUILD_ROOT%{_infodir}/libitm.info $RPM_BUILD_ROOT%{_infodir}/libitm%{binsuffix}.info
1233 %if %{build_fortran}
1234 %ifarch %quadmath_arch
1235 mv $RPM_BUILD_ROOT%{_infodir}/libquadmath.info $RPM_BUILD_ROOT%{_infodir}/libquadmath%{binsuffix}.info
1239 mv $RPM_BUILD_ROOT%{_infodir}/gnat-style.info $RPM_BUILD_ROOT%{_infodir}/gnat-style%{binsuffix}.info
1240 mv $RPM_BUILD_ROOT%{_infodir}/gnat_rm.info $RPM_BUILD_ROOT%{_infodir}/gnat_rm%{binsuffix}.info
1241 mv $RPM_BUILD_ROOT%{_infodir}/gnat_ugn.info $RPM_BUILD_ROOT%{_infodir}/gnat_ugn%{binsuffix}.info
1245 %ifnarch %quadmath_arch
1246 rm -vf $RPM_BUILD_ROOT%{_infodir}/libquadmath*.info*
1252 %if 0%{?building_libjava:1}
1253 %files -n gcc49-java
1254 %defattr(-,root,root)
1255 %{_prefix}/bin/gcj%{binsuffix}
1256 %{_prefix}/bin/gcjh%{binsuffix}
1257 %{_prefix}/bin/gcj-dbtool%{binsuffix}
1258 %{_prefix}/bin/jcf-dump%{binsuffix}
1259 %{_prefix}/bin/jv-convert%{binsuffix}
1260 %{_prefix}/bin/gc-analyze%{binsuffix}
1261 %{_prefix}/bin/aot-compile%{binsuffix}
1262 %{_prefix}/bin/rebuild-gcj-db%{binsuffix}
1264 %{libsubdir}/jvgenmain
1265 %{libsubdir}/ecj.jar
1267 %doc %{_mandir}/man1/gcj%{binsuffix}.1.gz
1268 %doc %{_mandir}/man1/gcjh%{binsuffix}.1.gz
1269 %doc %{_mandir}/man1/gcj-dbtool%{binsuffix}.1.gz
1270 %doc %{_mandir}/man1/jcf-dump%{binsuffix}.1.gz
1271 %doc %{_mandir}/man1/jv-convert%{binsuffix}.1.gz
1272 %doc %{_mandir}/man1/gc-analyze%{binsuffix}.1.gz
1273 %doc %{_mandir}/man1/aot-compile%{binsuffix}.1.gz
1274 %doc %{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1.gz
1279 %if %{build_libjava}
1281 %defattr(-,root,root)
1282 %dir %{libsubdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}
1284 %dir %{_libdir}/gcc/%{GCCDIST}
1286 %{libsubdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}/classmap.db
1287 # We usually do not multilib libjava
1288 %if %{biarch_libjava}
1289 %versbiarchlib libgcj.la
1290 %biarchlib libgcj.so.*
1291 %biarchlib libgij.so.*
1292 %biarchlib libgcj-tools.so.*
1294 %versmainlib libgcj.la
1295 %mainlib libgcj.so.*
1296 %mainlib libgij.so.*
1297 %mainlib libgcj-tools.so.*
1299 %{libsubdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}/libjvm.la
1300 %{libsubdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}/libjvm.so
1301 %{libsubdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}/libjavamath.la
1302 %{libsubdir}/gcj-%{gcc_dir_version}-%{libgcj_sover}/libjavamath.so
1304 %files -n libgcj_bc%{libgcj_bc_sover}%{libgcj_bc_suffix}
1305 %defattr(-,root,root)
1306 %if %{biarch_libjava}
1307 %biarchlib libgcj_bc.so.%{libgcj_bc_sover}*
1309 %mainlib libgcj_bc.so.%{libgcj_bc_sover}*
1312 %files -n libgcj49-jar
1313 %defattr(-,root,root)
1314 %{_prefix}/share/java/libgcj-%{gcc_dir_version}.jar
1315 %{_prefix}/share/java/libgcj-tools-%{gcc_dir_version}.jar
1317 %files -n libgcj49-devel
1318 %defattr(-,root,root)
1319 %dir %{_prefix}/include/c++
1321 %dir %{libsubdir}/include
1323 %{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
1324 %{libsubdir}/include/jawt.h
1325 %{libsubdir}/include/jawt_md.h
1326 %{libsubdir}/include/jni.h
1327 %{libsubdir}/include/jni_md.h
1328 %{libsubdir}/include/jvmpi.h
1335 %{libsubdir}/include/gcj
1336 %if %{biarch_libjava}
1337 %versbiarchlib libgcj.so
1338 %versbiarchlib libgcj.spec
1339 %versbiarchlib libgcj-tools.so
1340 %versbiarchlib libgij.so
1341 %versbiarchlib libgcj_bc.so
1343 %versmainlib libgcj.so
1344 %versmainlib libgcj.spec
1345 %versmainlib libgcj-tools.so
1346 %versmainlib libgij.so
1347 %versmainlib libgcj_bc.so
1351 %defattr(-,root,root)
1352 %{_prefix}/bin/gij%{binsuffix}
1353 %{_prefix}/bin/gappletviewer%{binsuffix}
1354 %{_prefix}/bin/gjar%{binsuffix}
1355 %{_prefix}/bin/gjarsigner%{binsuffix}
1356 %{_prefix}/bin/gjavah%{binsuffix}
1357 %{_prefix}/bin/gkeytool%{binsuffix}
1358 %{_prefix}/bin/gnative2ascii%{binsuffix}
1359 %{_prefix}/bin/gorbd%{binsuffix}
1360 %{_prefix}/bin/grmic%{binsuffix}
1361 %{_prefix}/bin/grmid%{binsuffix}
1362 %{_prefix}/bin/grmiregistry%{binsuffix}
1363 %{_prefix}/bin/gserialver%{binsuffix}
1364 %{_prefix}/bin/gtnameserv%{binsuffix}
1365 %doc %{_mandir}/man1/gij%{binsuffix}.1.gz
1366 %doc %{_mandir}/man1/gappletviewer%{binsuffix}.1.gz
1367 %doc %{_mandir}/man1/grmic%{binsuffix}.1.gz
1368 %doc %{_mandir}/man1/grmid%{binsuffix}.1.gz
1369 %doc %{_mandir}/man1/grmiregistry%{binsuffix}.1.gz
1370 %doc %{_mandir}/man1/gkeytool%{binsuffix}.1.gz
1371 %doc %{_mandir}/man1/gjar%{binsuffix}.1.gz
1372 %doc %{_mandir}/man1/gjarsigner%{binsuffix}.1.gz
1373 %doc %{_mandir}/man1/gjavah%{binsuffix}.1.gz
1374 %doc %{_mandir}/man1/gnative2ascii%{binsuffix}.1.gz
1375 %doc %{_mandir}/man1/gorbd%{binsuffix}.1.gz
1376 %doc %{_mandir}/man1/gserialver%{binsuffix}.1.gz
1377 %doc %{_mandir}/man1/gtnameserv%{binsuffix}.1.gz
1381 %if 0%{?building_libjava:1}
1382 %files -n libstdc++49-doc
1383 %defattr(-,root,root)
1384 %doc libstdc++-v3/doc/html
1388 %if 0%{?building_libffi:1}
1389 %files -n libffi%{libffi_sover}%{libffi_suffix}
1390 %defattr(-,root,root)
1391 %mainlib libffi.so.%{libffi_sover}*
1393 %if %{separate_biarch}
1394 %files -n libffi%{libffi_sover}%{libffi_suffix}%{separate_biarch_suffix}
1395 %defattr(-,root,root)
1396 %biarchlib libffi.so.%{libffi_sover}*
1399 %post -n libffi49-devel
1400 %install_info --info-dir=%{_infodir} %{_infodir}/libffi%{binsuffix}.info.gz
1401 %postun -n libffi49-devel
1402 %install_info_delete --info-dir=%{_infodir} %{_infodir}/libffi%{binsuffix}.info.gz
1404 %files -n libffi49-devel
1405 %defattr(-,root,root)
1406 %{_prefix}/include/ffi.h
1407 %{_prefix}/include/ffitarget.h
1410 %{_libdir}/pkgconfig/libffi.pc
1411 %doc %{_infodir}/libffi%{binsuffix}.info.gz
1412 %doc %{_mandir}/man3/ffi%{binsuffix}.3.gz
1413 %doc %{_mandir}/man3/ffi_call%{binsuffix}.3.gz
1414 %doc %{_mandir}/man3/ffi_prep_cif%{binsuffix}.3.gz
1415 %doc %{_mandir}/man3/ffi_prep_cif_var%{binsuffix}.3.gz
1417 %if %{separate_biarch}
1418 %files -n libffi49-devel%{separate_biarch_suffix}
1419 %defattr(-,root,root)
1420 %biarchlib libffi.so
1428 %{_prefix}/bin/gccgo%{binsuffix}
1430 %versmainlib libgo.a
1431 %versmainlib libgo.so
1432 %versmainlib libgobegin.a
1434 %dir %mainlibdir/go/%{gcc_dir_version}
1435 %mainlibdir/go/%{gcc_dir_version}/%{GCCDIST}
1436 %doc %{_mandir}/man1/gccgo%{binsuffix}.1.gz
1438 %if %{separate_biarch}
1439 %files go%{separate_biarch_suffix}
1440 %versbiarchlib libgo.a
1441 %versbiarchlib libgo.so
1442 %versbiarchlib libgobegin.a
1443 %dir %mainlibdirbi/go
1444 %dir %mainlibdirbi/go/%{gcc_dir_version}
1445 %mainlibdirbi/go/%{gcc_dir_version}/%{GCCDIST}
1448 %files -n libgo%{libgo_sover}%{libgo_suffix}
1449 %defattr(-,root,root)
1450 %mainlib libgo.so.%{libgo_sover}*
1452 %if %{separate_biarch}
1453 %files -n libgo%{libgo_sover}%{libgo_suffix}%{separate_biarch_suffix}
1454 %defattr(-,root,root)
1455 %biarchlib libgo.so.%{libgo_sover}*
1459 %if 0%{?run_tests:1}
1460 %files -n gcc49-testresults
1461 %defattr(-,root,root)
1462 %doc testresults/test_summary.txt
1463 %doc testresults/*.sum
1464 %doc testresults/*.log