1 %define building_libjava 1
4 # Ada currently fails to build on a few platforms, enable it only
6 # Note that AdaCore only supports %ix86, x86_64 and ia64
8 %define build_ada !0%{?building_libjava:1}%{?building_libffi:1}
13 %define quadmath_arch %ix86 x86_64
15 # We don't want to build java
17 %define build_libjava 0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
20 %define build_fortran 1
22 %define build_objcp !0%{?building_libjava:1}%{?building_libffi:1}
23 %define build_with_mudflap 0
34 # For optional compilers only build C, C++ and Fortran
35 ##%if 0%{?build_optional_compiler:1}%{?build_optional_compiler_languages:1}
36 %if 0%{!?building_libffi:1}
39 %define build_libjava 0
48 BuildRequires: gettext-tools
49 BuildRequires: makeinfo
50 BuildRequires: glibc-devel-32bit
51 BuildRequires: mpc-devel
52 BuildRequires: mpfr-devel
54 BuildRequires: texinfo
55 BuildRequires: zlib-devel
56 %ifarch %ix86 x86_64 %arm
57 BuildRequires: cloog-devel
58 BuildRequires: ppl-devel
61 %define hostsuffix -4.7
62 BuildRequires: gcc47-ada
64 %if 0%{?building_libjava:1}%{?building_testsuite:1}
65 BuildRequires: fastjar
68 %if 0%{?building_libffi:1}
69 BuildRequires: pkg-config
72 BuildRequires: dejagnu
77 # Define version number of libgcc_s
81 %define separate_bi32 0
82 %define separate_bi64 0
84 %define separate_bi32 1
87 # Define two macros to trigger -32bit or -64bit package variants
88 %define separate_biarch 0
90 %define separate_biarch 1
91 %define separate_biarch_suffix -32bit
94 %define separate_biarch 1
95 %define separate_biarch_suffix -64bit
99 # 64-bit is primary build target
100 %define build_primary_64bit 1
102 %define build_primary_64bit 0
105 %define biarch_libjava 0
108 %define biarch_targets x86_64
110 URL: http://gcc.gnu.org/
113 %define gcc_version %(echo %version | sed 's/_.*//')
114 %define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
115 %define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
116 %define binsuffix -4.7
119 %if !0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
120 Requires: binutils glibc-devel
121 Requires: cpp47 = %{version}-%{release}
122 %if 0%{!?build_optional_compiler:1}
123 Requires: libgcc%{libgcc_s} >= %{version}-%{release}
124 Requires: libgomp1 >= %{version}-%{release}
125 %if %{build_with_mudflap}
126 Requires: libmudflap0 >= %{version}-%{release}
127 Requires: libmudflapth0 >= %{version}-%{release}
130 Requires: libgcc47 = %{version}-%{release}
131 Requires: libgomp47 = %{version}-%{release}
136 BuildRoot: %{_tmppath}/%{name}-%{version}-build
137 #Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2
138 Source: gcc-%{version}.tar.bz2
141 Source2: libgcj47-rpmlintrc
142 Source3: gcc47-rpmlintrc
144 Source6: baselibs.conf
145 # Patches auto-generated by git-buildpackage:
146 Patch0: 0001-dir-version.patch
147 Patch1: 0002-textdomain.patch
148 Patch2: 0003-rename-info-files.patch
149 Patch3: 0004-ARM-linker.patch
151 # GCC-TESTSUITE-DELETE-BEGIN
152 # LIBFFI-DELETE-BEGIN
153 Summary: Java Runtime Library for gcc
154 License: GPL-2.0-with-classpath-exception
155 Group: System/Libraries
157 Provides: libgcj%{gcj_sover} = %{version}-%{release}
158 Conflicts: libgcj%{gcj_sover} < %{version}-%{release}
159 Provides: libgij%{gcj_sover} = %{version}-%{release}
160 Conflicts: libgij%{gcj_sover} < %{version}-%{release}
161 Provides: libgcj-tools%{gcj_sover} = %{version}-%{release}
162 Conflicts: libgcj-tools%{gcj_sover} < %{version}-%{release}
165 This library is needed if you want to use the GNU Java compiler, gcj.
166 Source code for this package is in gcc.
175 %package -n gcc47-java
176 Summary: The GNU Java Compiler
178 Group: Development/Languages
179 Requires: gcc47 = %{version}
180 Requires: libgcj47-devel = %{version}-%{release}
182 %description -n gcc47-java
183 The Java compiler from the GCC-tools-suite.
186 %package -n libgcj_bc47
187 Summary: Fake library for BC-ABI compatibility.
188 License: GPL-2.0-with-classpath-exception
189 Group: Development/Libraries
190 Provides: libgcj_bc1 = %{version}-%{release}
191 Conflicts: libgcj_bc1 < %{version}-%{release}
192 # libgcj_bc is special in that it just contains a symlink to
193 # a proper libgcj version. So require that library and add
194 # provides for the shlib version as created at link time
195 Requires: libgcj%{gcj_sover}
197 Provides: libgcj_bc.so.1()(64bit)
199 Provides: libgcj_bc.so.1
203 %description -n libgcj_bc47
204 A fake library that is used at link time only. It ensures that
205 binaries built with the BC-ABI link against a constant SONAME.
206 This way, BC-ABI binaries continue to work if the SONAME underlying
210 %package -n libgcj47-jar
211 Summary: Java runtime library (jar files).
212 License: GPL-2.0-with-classpath-exception
213 Group: Development/Libraries/Java
215 %description -n libgcj47-jar
216 These are the jar files that go along with the gcj front end to gcc.
219 %package -n libgcj47-devel
220 Summary: Include Files and Libraries mandatory for Development.
221 License: GPL-2.0-with-classpath-exception
222 Group: Development/Libraries
223 Requires: libstdc++47-devel = %{version}
224 Requires: libgcj%{gcj_sover} >= %{version}-%{release}
225 Requires: libgcj_bc1 >= %{version}-%{release}
226 Requires: libgcj47-jar = %{version}-%{release}
228 Requires: libart_lgpl-devel
229 Requires: glibc-devel
232 %description -n libgcj47-devel
233 This package contains all necessary include files and libraries needed
234 to develop applications that require these.
237 %package -n gcc47-gij
238 Summary: Java Bytecode Interpreter for gcc
239 License: GPL-2.0-with-classpath-exception
240 Group: Development/Libraries
241 Requires: libgcj%{gcj_sover} >= %{version}-%{release}
243 %description -n gcc47-gij
244 This package contains the java bytecode interpreter gij and related tools.
250 Summary: Foreign Function Interface library
251 License: BSD-3-Clause
252 Group: Base/Libraries
253 Provides: g-wrap:/usr/lib/libffi.so.4
254 Provides: libffi4 = %{version}-%{release}
255 Conflicts: libffi4 < %{version}-%{release}
257 %description -n libffi47
258 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.
268 %package -n libffi47-32bit
269 Summary: Foreign Function Interface library
270 License: BSD-3-Clause
271 Group: Base/Libraries
272 Provides: g-wrap:/usr/lib/libffi.so.4
273 Provides: libffi4-32bit = %{version}-%{release}
274 Conflicts: libffi4-32bit < %{version}-%{release}
276 %description -n libffi47-32bit
277 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.
279 %post -n libffi47-32bit
282 %postun -n libffi47-32bit
287 %package -n libffi47-64bit
288 Summary: Foreign Function Interface library
289 License: BSD-3-Clause
290 Group: Base/Libraries
291 Provides: g-wrap:/usr/lib/libffi.so.4
292 Provides: libffi4-64bit = %{version}-%{release}
293 Conflicts: libffi4-64bit < %{version}-%{release}
295 %description -n libffi47-64bit
296 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.
298 %post -n libffi47-64bit
301 %postun -n libffi47-64bit
307 %package -n libffi47-devel
308 Summary: Foreign Function Interface library development files
309 License: BSD 3-Clause
310 Group: Development/Toolchain
311 Requires: libffi4 >= %{version}-%{release}
312 Provides: libffi-devel = %{version}-%{release}
313 Conflicts: libffi-devel < %{version}-%{release}
315 %description -n libffi47-devel
316 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.
320 %package -n libffi47-devel-32bit
321 Summary: Foreign Function Interface library development files
322 License: BSD 3-Clause
323 Group: Development/Toolchain
324 Requires: libffi4-32bit >= %{version}-%{release}
325 Provides: libffi-devel-32bit = %{version}-%{release}
326 Conflicts: libffi-devel-32bit < %{version}-%{release}
328 %description -n libffi47-devel-32bit
329 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.
333 %package -n libffi47-devel-64bit
334 Summary: Foreign Function Interface library development files
335 License: BSD 3-Clause
336 Group: Development/Toolchain
337 Requires: libffi4-64bit >= %{version}-%{release}
338 Provides: libffi-devel-64bit = %{version}-%{release}
339 Conflicts: libffi-devel-64bit < %{version}-%{release}
341 %description -n libffi47-devel-64bit
342 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.
345 %package -n gcc47-testresults
346 # GCC-TESTSUITE-DELETE-END
347 Summary: Testsuite results
348 License: Public-Domain
349 Group: Development/Toolchain
351 %description -n gcc47-testresults
352 Results from running the gcc and target library testsuites.
357 # Define the canonical target and host architecture
358 # %gcc_target_arch is supposed to be the full target triple
359 # %TARGET_ARCH is the canonicalized CPU part
360 # %CONFIGURE_TARGET is the target triple used for --target=
361 %if 0%{?gcc_target_arch:1}
362 %define CONFIGURE_TARGET %{gcc_target_arch}
363 %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/;")
364 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "i586"
365 %define CONFIGURE_TARGET i586-tizen-linux
367 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7l"
368 %define CONFIGURE_TARGET armv7l-tizen-linux-gnueabi
370 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7hl"
371 %define CONFIGURE_TARGET armv7hl-tizen-linux-gnueabi
373 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv7el"
374 %define CONFIGURE_TARGET armv7el-tizen-linux-gnueabi
376 %if 0%{?gcc_icecream:1} && %{TARGET_ARCH} == "armv5el"
377 %define CONFIGURE_TARGET armv5el-tizen-linux-gnueabi
380 %define TARGET_ARCH %(echo %{_target_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
382 %define HOST_ARCH %(echo %{_host_cpu} | sed -e "s/i.86/i586/;s/ppc/powerpc/;s/sparc64.*/sparc64/;s/sparcv.*/sparc/;")
384 %define biarch %(case " %{biarch_targets} " in (*" %{TARGET_ARCH} "*) echo 1;; (*) echo 0;; esac)
387 %define GCCDIST %{HOST_ARCH}-tizen-linux-gnueabi
389 %define GCCDIST %{HOST_ARCH}-tizen-linux
392 %define libsubdir %{_libdir}/gcc/%{GCCDIST}/%{gcc_dir_version}
393 %define gxxinclude %{_prefix}/include/c++/%{gcc_dir_version}
397 # Versionspecific directories
398 %define versmainlibdir %{libsubdir}
399 %define versmainlibdirbi32 %{libsubdir}/32
400 %define versmainlibdirbi64 %{libsubdir}/64
401 %if %{build_primary_64bit}
402 %define versmainlibdirbi %{versmainlibdirbi32}
404 %define versmainlibdirbi %{versmainlibdirbi64}
407 %if 0%{?build_optional_compiler:1}
408 %define mainlibdir %{versmainlibdir}
409 %define mainlibdirbi32 %{versmainlibdirbi32}
410 %define mainlibdirbi64 %{versmainlibdirbi64}
411 %define noflibdir %{versnoflibdir}
412 %define mainlibdirbi %{versmainlibdirbi}
414 %define mainlibdir %{_libdir}
415 %define mainlibdirbi32 %{_prefix}/lib
416 %define mainlibdirbi64 %{_prefix}/lib64
417 %define noflibdir %{_prefix}/lib/nof
418 %if %{build_primary_64bit}
419 %define mainlibdirbi %{mainlibdirbi32}
421 %define mainlibdirbi %{mainlibdirbi64}
426 # Now define a few macros that make it easy to package libs and
427 # related files just to the right package, without caring for the
428 # exact path the files are in.
429 # %mainlib package X from all dirs that belong to the main package
430 # %biarchlib package X from all dirs that belong to the -32/64bit package
431 # by default, nof libs go where the 32bit libs go.
433 %define mainlib() %{mainlibdir}/%1\
437 %define mainlib() %{mainlibdir}/%1\
440 %define biarchlib() %{nil}
442 %if !%{separate_biarch}
444 %define mainlib() %{mainlibdir}/%1\
449 %define mainlib() %{mainlibdir}/%1\
455 %define biarchlib() %{mainlibdirbi}/%1\
458 %define mainlib() %{mainlibdir}/%1\
461 %define biarchlib() %{mainlibdirbi}/%1\
468 %define versmainlib() %{versmainlibdir}/%1\
472 %define versmainlib() %{versmainlibdir}/%1\
475 %define versbiarchlib() %{nil}
477 %if !%{separate_biarch}
479 %define versmainlib() %{versmainlibdir}/%1\
480 %{versmainlibdirbi}/%1\
484 %define versmainlib() %{versmainlibdir}/%1\
485 %{versmainlibdirbi}/%1\
490 %define versbiarchlib() %{versmainlibdirbi}/%1\
493 %define versmainlib() %{versmainlibdir}/%1\
496 %define versbiarchlib() %{versmainlibdirbi}/%1\
506 #%setup -q -n gcc-%{gcc_version}%{snapshot_date}
507 %setup -q -n gcc-%{version}
508 # 0001-dir-version.patch
515 # Avoid rebuilding of generated files
516 contrib/gcc_update --touch
517 # Avoid fucking up testsuite results with Java and indirect dispatch
518 export LD_AS_NEEDED=0
519 # Split version file into version used for directories (X.Y) and
520 # version to report with --version (X.Y.Z).
521 # See also gcc-dir-version.patch.
522 # Also decrement the patchlevel version by one
523 if test `cat gcc/DEV-PHASE` == "prerelease"; then
524 ( 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
526 mv gcc/BASE-VER gcc/FULL-VER
528 cat gcc/FULL-VER | cut -d '.' -f 1-2 > gcc/BASE-VER
530 rm -rf obj-%{GCCDIST}
533 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -U_FORTIFY_SOURCE"
534 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'`
536 # -mcpu is superceded by -mtune but -mtune is not supported by
537 # our bootstrap compiler. -mcpu gives a warning that stops
538 # the build process, so remove it for now. Also remove all other
539 # -march and -mtune flags. They are superseeded by proper
540 # default compiler settings now.
541 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'`
543 %if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
544 # Kill all -march/tune/cpu because that screws building the target libs
545 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-m\(arch\|tune\|cpu\)=[^ ]*//g'`
547 # Replace 2 spaces by one finally
548 RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/ / /g'`
552 languages=$languages,c++
555 languages=$languages,objc
558 languages=$languages,fortran
561 languages=$languages,obj-c++
564 languages=$languages,java
567 languages=$languages,ada
571 if test -z "$J"; then
572 J=$(getconf _NPROCESSORS_CONF)
575 test 1 -gt "$J" && J=1
576 JL=$(($(getconf _NPROCESSORS_CONF)*2))
578 if test "$J" == "0"; then
581 if test "$JL" == "0"; then
584 PARALLEL="-j$J -l$JL"
586 # we don't want some miscompiles in the testsuite, or some fault in
587 # the compiler to kill the machine. Hence we limit the amount of memory
588 # by the physical RAM plus half of swap
589 #MEM=$(free -m | awk '/^Mem:/ {print $2}')
590 #SWAP=$(free -m | awk '/^Swap:/ {print $2}')
591 #ulimit -v $(((MEM + SWAP/2)*1024))
593 # In general we want to ship release checking enabled compilers
594 # and run BETA with checking enabled.
595 #ENABLE_CHECKING="--enable-checking=yes"
596 ENABLE_CHECKING="--enable-checking=release"
598 # Work around tail/head -1 changes
599 export _POSIX2_VERSION=199209
601 # configure tries to parse include/features.h to detect
602 # if glibc supports SSP. When cross compiling we would need
603 # to install a cross glibc, which we don't, or make the whole
604 # thing point to the native glibc, which is in /, hence the
608 # Using the host gnatmake like
609 # CC="gcc%{hostsuffix}" GNATBIND="gnatbind%{hostsuffix}"
610 # GNATMAKE="gnatmake%{hostsuffix}"
611 # doesn't work due to PR33857, so an un-suffixed gnatmake has to be
613 mkdir -p host-tools/bin
614 cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake
615 cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink
616 cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind
617 cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc
618 ln -sf /usr/%{_lib} host-tools/%{_lib}
619 export PATH="`pwd`/host-tools/bin:$PATH"
621 #%if 0%{?gcc_target_arch:1} && 0%{!?gcc_icecream:1}
623 # --enable-threads=posix \
626 CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \
627 TCFLAGS="$RPM_OPT_FLAGS" GCJFLAGS="$RPM_OPT_FLAGS" \
629 --prefix=%{_prefix} \
630 --infodir=%{_infodir} \
631 --mandir=%{_mandir} \
632 --libdir=%{_libdir} \
633 --libexecdir=%{_libdir} \
634 --enable-languages=$languages \
636 --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \
641 --disable-bootstrap \
644 --with-bugurl="http://bugs.tizen.org/" \
645 --with-pkgversion="Tizen Linux" \
646 %if !%{build_libjava}
649 --with-java-home=%{_libdir}/jvm/java-1.5.0-gcj%{binsuffix}-1.5.0.0/jre \
650 --with-ecj-jar=%{libsubdir}/ecj.jar \
652 %if !%{biarch_libjava}
653 --disable-libjava-multilib \
656 %if !%{build_with_mudflap}
657 --disable-libmudflap \
659 --with-slibdir=/%{_lib} \
661 --enable-__cxa_atexit \
662 --enable-libstdcxx-allocator=new \
663 --disable-libstdcxx-pch \
664 --enable-version-specific-runtime-libs \
665 --enable-linker-build-id \
666 %if 0%{?gcc_target_arch:1}
667 %if 0%{?gcc_icecream:1}
668 --with-build-sysroot=/ \
669 --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
670 --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
671 --enable-linux-futex \
673 %if 0%{?canonical_target:1}
674 --with-build-time-tools=/usr/%{canonical_target}-tizen-linux%{?canonical_target_abi:%canonical_target_abi}/bin \
676 %if 0%{?build_static:1}
679 %if "%{TARGET_ARCH}" == "spu"
680 --with-sysroot=/usr/spu \
681 --with-gxx-include-dir=%{_prefix}/spu/include/c++/%{gcc_dir_version} \
685 --target=%{CONFIGURE_TARGET} \
687 --program-suffix=%{binsuffix} \
688 --enable-linux-futex \
689 --without-system-libunwind \
691 %if "%{TARGET_ARCH}" == "armv5tel"
692 --with-arch=armv5te \
695 --with-abi=aapcs-linux \
696 --disable-sjlj-exceptions \
698 %if "%{TARGET_ARCH}" == "armv7el"
699 --with-arch=armv7-a \
700 --with-tune=cortex-a9 \
704 --disable-sjlj-exceptions \
706 %if "%{TARGET_ARCH}" == "armv7l" || "%{TARGET_ARCH}" == "armv7hl"
707 --with-arch=armv7-a \
708 --with-tune=cortex-a9 \
710 --with-abi=aapcs-linux \
711 --with-fpu=vfpv3-d16 \
712 --disable-sjlj-exceptions \
714 %if "%{TARGET_ARCH}" == "i586"
715 --with-arch-32=i586 \
716 --with-tune=generic \
718 %if "%{TARGET_ARCH}" == "x86_64"
719 --with-arch-32=i586 \
720 --with-tune=generic \
726 %if 0%{?building_libffi:1}
727 make stage1-bubble $PARALLEL
728 make all-target-libffi $PARALLEL
730 # Only run profiled bootstrap on archs where it works
731 #%ifarch %ix86 x86_64
732 #make profiledbootstrap-lean STAGE1_CFLAGS="-O -g" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
739 #make bootstrap-lean STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
740 make STAGE1_CFLAGS="$STAGE1_FLAGS" BOOT_CFLAGS="$RPM_OPT_FLAGS" $PARALLEL
746 (make -C %{GCCDIST}/libstdc++-v3 check-abi || true)
747 mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.log %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.log
748 mv %{GCCDIST}/libstdc++-v3/testsuite/libstdc++.sum %{GCCDIST}/libstdc++-v3/testsuite/libstdc++-abi.sum
749 make -k check $PARALLEL || true
751 ../contrib/test_summary | tee ../testresults/test_summary.txt
756 export NO_BRP_CHECK_BYTECODE_VERSION=true
758 # GCC-TESTSUITE-DELETE-BEGIN
759 # Work around tail/head -1 changes
760 export _POSIX2_VERSION=199209
761 export LIBRARY_PATH=$RPM_BUILD_ROOT%{libsubdir}:$RPM_BUILD_ROOT%{mainlibdirbi}
762 %if 0%{?building_libffi:1}
763 make -C %{GCCDIST}/libffi install DESTDIR=$RPM_BUILD_ROOT
765 %if 0%{?building_libjava:1}
766 make -C %{GCCDIST}/libjava install DESTDIR=$RPM_BUILD_ROOT
767 make -C gcc java.install-man DESTDIR=$RPM_BUILD_ROOT
768 make -C gcc java.install-common DESTDIR=$RPM_BUILD_ROOT
769 make -C gcc install-common DESTDIR=$RPM_BUILD_ROOT COMPILERS='jc1$(exeext) jvgenmain$(exeext)'
770 # install-common also installs collect2, gcov and the g++ and gfortran driver
772 rm $RPM_BUILD_ROOT%{_prefix}/bin/g++%{binsuffix}
775 rm $RPM_BUILD_ROOT%{_prefix}/bin/gfortran%{binsuffix}
777 rm $RPM_BUILD_ROOT%{_prefix}/bin/gcov%{binsuffix}
778 rm $RPM_BUILD_ROOT%{libsubdir}/collect2
780 make install DESTDIR=$RPM_BUILD_ROOT
782 make -C gcc java.uninstall DESTDIR=$RPM_BUILD_ROOT
783 make -C gcc java.install-info DESTDIR=$RPM_BUILD_ROOT
784 rm $RPM_BUILD_ROOT%{_prefix}/bin/jcf-dump%{binsuffix}
785 rm $RPM_BUILD_ROOT%{_mandir}/man1/jcf-dump%{binsuffix}.1
786 rm $RPM_BUILD_ROOT%{libsubdir}/jc1
787 rm $RPM_BUILD_ROOT%{libsubdir}/jvgenmain
792 # Remove libffi installed files if we did not want to build it
793 %if !0%{?building_libffi:1}
794 rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.*
796 rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.*
798 rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h
799 rm -f $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h
800 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi%{binsuffix}.3*
801 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_call%{binsuffix}.3*
802 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/ffi_prep_cif%{binsuffix}.3*
805 # Remove some useless .la files
806 for lib in libobjc libgfortran libgfortranbegin libquadmath libcaf_single \
807 libmudflap libmudflapth libgomp libstdc++ libsupc++ libgcj-tools libgij; do
808 rm -f $RPM_BUILD_ROOT%{versmainlibdir}/$lib.la
810 rm -f $RPM_BUILD_ROOT%{versmainlibdirbi}/$lib.la
814 mkdir -p $RPM_BUILD_ROOT%{_libdir}
816 %if %{build_primary_64bit}
817 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib
819 mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib64
823 # LIBFFI-DELETE-BEGIN
825 %if 0%{!?build_optional_compiler:1}
826 # move shared libs from versionspecific dir to main libdir
828 %if 0%{?building_libjava:1}
829 libgcj libgij libgcj-tools \
833 %ifarch %quadmath_arch
844 %if %{build_with_mudflap}
845 libmudflap libmudflapth \
849 for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name $libname.so.*`; do
850 mv $lib $RPM_BUILD_ROOT%{mainlibdir}/
852 ln -sf %{mainlibdir}/`readlink $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \
853 $RPM_BUILD_ROOT%{versmainlibdir}/$libname.so
855 if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then
856 for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name "$libname.so.*"`; do
857 mv $lib $RPM_BUILD_ROOT%{mainlibdirbi}/
859 ln -sf %{mainlibdirbi}/`readlink $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so | sed -e 's/\(.*\.so\.[^\.]*\).*/\1/'` \
860 $RPM_BUILD_ROOT%{versmainlibdirbi}/$libname.so
865 %if !0%{?building_libjava:1}
866 # And we want to move the shlib gdb pretty printers to a more sane
867 # place so ldconfig does not complain
868 mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}
869 mv $RPM_BUILD_ROOT%{mainlibdir}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/
870 sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdir}/libstdc++.so.*-gdb.py
872 if test -d $RPM_BUILD_ROOT%{versmainlibdirbi}; then
873 mkdir -p $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}
874 mv $RPM_BUILD_ROOT%{mainlibdirbi}/libstdc++.so.*-gdb.py $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/
875 sed -i -e '/^libdir/s/\/gcc\/%{GCCDIST}\/%{gcc_dir_version}//g' $RPM_BUILD_ROOT%{_datadir}/gdb/auto-load%{mainlibdirbi}/libstdc++.so.*-gdb.py
880 %if 0%{?building_libjava:1}
881 # libgcj_bc is special as the .so file is actually a different
882 # library as the library refered to by the SONAME which should
883 # be a simple link to our libgcj.
884 for lib in `find $RPM_BUILD_ROOT%{versmainlibdir} -maxdepth 1 -name libgcj_bc.so.*`; do
887 ln -s libgcj.so.%{gcj_sover} $RPM_BUILD_ROOT%{mainlibdir}/libgcj_bc.so.1
888 %if %{biarch_libjava}
889 for lib in `find $RPM_BUILD_ROOT%{versmainlibdirbi} -maxdepth 1 -name libgcj_bc.so.*`; do
892 ln -s libgcj.so.%{gcj_sover} $RPM_BUILD_ROOT%{mainlibdirbi}/libgcj_bc.so.1
900 mv $RPM_BUILD_ROOT%{libsubdir}/adalib/lib*-*.so $RPM_BUILD_ROOT%{_libdir}
901 ln -sf %{_libdir}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnarl.so
902 ln -sf %{_libdir}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{libsubdir}/adalib/libgnat.so
903 chmod a+x $RPM_BUILD_ROOT%{_libdir}/libgna*-*.so
905 mv $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/lib*-*.so $RPM_BUILD_ROOT%{mainlibdirbi}/
906 ln -sf %{mainlibdirbi}/libgnarl%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
907 ln -sf %{mainlibdirbi}/libgnat%{binsuffix}.so $RPM_BUILD_ROOT%{versmainlibdirbi}/adalib/libgnarl.so
908 chmod a+x $RPM_BUILD_ROOT%{mainlibdirbi}/libgna*-*.so
912 rm -f $RPM_BUILD_ROOT%{_prefix}/bin/c++%{binsuffix}
914 # Remove some crap from the .la files:
915 for l in `find $RPM_BUILD_ROOT -name '*.la'`; do
917 # -e '/^dependency_libs/s|%{libsubdir}/\([^.]*\)\.la |%{_libdir}/\1\.la |g'
918 sed -e '/^dependency_libs/s| -L%{_builddir}/[^ ]*||g' \
919 -e '/^dependency_libs/s| -L/usr/%{GCCDIST}/bin||g' \
920 -e '/^dependency_libs/s|-lm \(-lm \)*|-lm |' \
921 -e '/^dependency_libs/s|-L[^ ]* ||g' \
923 %if %{build_primary_64bit}
924 -e '/^libdir/s|%{_libdir}/32|%{_prefix}/lib|' \
925 -e '/^libdir/s|lib64/\.\./||' \
927 -e '/^libdir/s|%{_libdir}/64|%{_prefix}/lib64|' \
934 # GCC-TESTSUITE-DELETE-END
936 cp `find . -name "*.sum"` ../testresults/
937 cp `find . -name "*.log" \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
938 chmod 644 ../testresults/*
940 # GCC-TESTSUITE-DELETE-BEGIN
941 # LIBFFI-DELETE-BEGIN
943 # Find C++ and Java headers
944 find $RPM_BUILD_ROOT%{_prefix}/include/c++ \
945 -regex ".*/\(org\|gcj\|gnu\|java\|javax\)" -prune \
946 -o \( -type d -printf "%%%%dir " , \
947 -printf "%{_prefix}/include/c++/%%P\n" \) > ../c++-headers
950 # Remove files that we do not need to clean up filelist
951 rm -f $RPM_BUILD_ROOT%{_prefix}/bin/%{GCCDIST}-*
952 rm -rf $RPM_BUILD_ROOT%{libsubdir}/install-tools
953 #rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
954 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/root
955 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/curses.h
956 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/asm-*
957 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/linux
958 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sound
959 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/features.h
960 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/ncurses.h
961 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/stdio.h
962 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/zutil.h
963 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/X11
964 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits
965 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/obstack.h
966 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/spe.h
967 rm -f $RPM_BUILD_ROOT%{libsubdir}/include-fixed/tgmath.h
968 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/bits
969 rm -rf $RPM_BUILD_ROOT%{libsubdir}/include-fixed/sys
971 rm -rf $RPM_BUILD_ROOT%{libsubdir}/plugin
972 rm -f $RPM_BUILD_ROOT%{_infodir}/dir
973 rm -f $RPM_BUILD_ROOT%{_prefix}/bin/gccbug%{binsuffix}
975 %if !0%{?building_libjava:1}%{?building_libffi:1}
976 # delete compile flag tracking from crt files
977 crt_list=$RPM_BUILD_ROOT%{versmainlibdir}/crt*.o
979 %if %{build_primary_64bit}
980 crt32_list=$RPM_BUILD_ROOT%{versmainlibdirbi32}/crt*.o
982 crt64_list=$RPM_BUILD_ROOT%{versmainlibdirbi64}/crt*.o
987 %if 0%{?building_libjava:1}
988 # gcj -static doesn't work properly anyway, unless using --whole-archive
989 # let's save the space instead.
990 find $RPM_BUILD_ROOT -name libgcj.a \
991 -o -name libgcj-tools.a \
994 -o -name libgcj_bc.a \
997 find $RPM_BUILD_ROOT -name libgcj.spec | xargs \
998 sed -i -e 's/lib: /&%%{static:%%eJava programs cannot be linked statically}/'
1000 # security files have broken install locations, also they cause conflicts
1001 # between libgcj versions. Simply delete them here, libgcj will use its
1002 # defaults in this case (which is what these files contain anyway).
1003 rm $RPM_BUILD_ROOT%{_libdir}/logging.properties
1004 rm -r $RPM_BUILD_ROOT%{_libdir}/security
1007 %if 0%{?building_libffi:1}
1008 # Move libffi headers, remove empty libffi libtool file
1009 mkdir -p $RPM_BUILD_ROOT%{_prefix}/include
1010 mv $RPM_BUILD_ROOT%{libsubdir}/include/ffitarget.h $RPM_BUILD_ROOT%{_prefix}/include/
1011 mv $RPM_BUILD_ROOT%{libsubdir}/include/ffi.h $RPM_BUILD_ROOT%{_prefix}/include/
1012 rm -f $RPM_BUILD_ROOT%{mainlibdir}/libffi.la
1014 rm -f $RPM_BUILD_ROOT%{mainlibdirbi}/libffi.la
1016 # Generate a simple pkg-config file
1017 mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig
1018 echo -e 'Name: libffi\nVersion: 3.0.9\nDescription: libffi\nLibs: -lffi' > $RPM_BUILD_ROOT%{_libdir}/pkgconfig/libffi.pc
1022 %if !%{build_libjava}
1023 rm $RPM_BUILD_ROOT%{_mandir}/man1/jv-convert%{binsuffix}.1
1024 rm $RPM_BUILD_ROOT%{_mandir}/man1/gcj-dbtool%{binsuffix}.1
1025 rm $RPM_BUILD_ROOT%{_mandir}/man1/gij%{binsuffix}.1
1026 rm $RPM_BUILD_ROOT%{_mandir}/man1/grmic%{binsuffix}.1
1027 rm $RPM_BUILD_ROOT%{_mandir}/man1/gc-analyze%{binsuffix}.1
1028 rm $RPM_BUILD_ROOT%{_mandir}/man1/aot-compile%{binsuffix}.1
1029 rm $RPM_BUILD_ROOT%{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1
1031 rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/aotcompile.py
1032 rm -f $RPM_BUILD_ROOT%{_datadir}/gcc%{binsuffix}/python/libjava/classfile.py
1034 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
1035 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
1036 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
1037 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
1039 rm -f $RPM_BUILD_ROOT%{_prefix}/lib/nof/libiberty.a
1042 %if %{build_primary_64bit}
1043 rm -f $RPM_BUILD_ROOT%{_prefix}/lib/libiberty.a
1045 rm -f $RPM_BUILD_ROOT%{_prefix}/lib64/libiberty.a
1048 rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.a
1049 rm -f $RPM_BUILD_ROOT%{libsubdir}/liblto_plugin.la
1051 # LIBFFI-DELETE-BEGIN
1052 %if 0%{?building_libjava:1}
1053 # For building libjava only we need to delete other info docs
1054 rm $RPM_BUILD_ROOT%{_infodir}/cp-tools.info*
1055 # Remove stale manpages for binaries we do not build
1056 rm $RPM_BUILD_ROOT%{_mandir}/man1/gjdoc%{binsuffix}.1
1057 # For building the java frontend we need to copy the ecj jar
1058 mkdir -p $RPM_BUILD_ROOT%{libsubdir}
1059 cp $RPM_SOURCE_DIR/ecj.jar $RPM_BUILD_ROOT%{libsubdir}
1061 # For regular build, some info files do not get renamed properly.
1063 mv $RPM_BUILD_ROOT%{_infodir}/libgomp.info $RPM_BUILD_ROOT%{_infodir}/libgomp%{binsuffix}.info
1064 %if %{build_fortran}
1065 %ifarch %quadmath_arch
1066 mv $RPM_BUILD_ROOT%{_infodir}/libquadmath.info $RPM_BUILD_ROOT%{_infodir}/libquadmath%{binsuffix}.info
1070 mv $RPM_BUILD_ROOT%{_infodir}/gnat-style.info $RPM_BUILD_ROOT%{_infodir}/gnat-style%{binsuffix}.info
1071 mv $RPM_BUILD_ROOT%{_infodir}/gnat_rm.info $RPM_BUILD_ROOT%{_infodir}/gnat_rm%{binsuffix}.info
1072 mv $RPM_BUILD_ROOT%{_infodir}/gnat_ugn.info $RPM_BUILD_ROOT%{_infodir}/gnat_ugn%{binsuffix}.info
1079 %if 0%{?building_libjava:1}
1080 %files -n gcc47-java
1081 %defattr(-,root,root)
1082 %{_prefix}/bin/gcj%{binsuffix}
1083 %{_prefix}/bin/gcjh%{binsuffix}
1084 %{_prefix}/bin/gcj-dbtool%{binsuffix}
1085 %{_prefix}/bin/jcf-dump%{binsuffix}
1086 %{_prefix}/bin/jv-convert%{binsuffix}
1087 %{_prefix}/bin/gc-analyze%{binsuffix}
1088 %{_prefix}/bin/aot-compile%{binsuffix}
1089 %{_prefix}/bin/rebuild-gcj-db%{binsuffix}
1091 %{libsubdir}/jvgenmain
1092 %{libsubdir}/ecj.jar
1094 %doc %{_mandir}/man1/gcj%{binsuffix}.1.gz
1095 %doc %{_mandir}/man1/gcjh%{binsuffix}.1.gz
1096 %doc %{_mandir}/man1/gcj-dbtool%{binsuffix}.1.gz
1097 %doc %{_mandir}/man1/jcf-dump%{binsuffix}.1.gz
1098 %doc %{_mandir}/man1/jv-convert%{binsuffix}.1.gz
1099 %doc %{_mandir}/man1/gc-analyze%{binsuffix}.1.gz
1100 %doc %{_mandir}/man1/aot-compile%{binsuffix}.1.gz
1101 %doc %{_mandir}/man1/rebuild-gcj-db%{binsuffix}.1.gz
1106 %if %{build_libjava}
1108 %defattr(-,root,root)
1109 %dir %{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}
1111 %dir %{_libdir}/gcc/%{GCCDIST}
1113 %{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/classmap.db
1114 # We usually do not multilib libjava
1115 %if %{biarch_libjava}
1116 %versbiarchlib libgcj.la
1117 %biarchlib libgcj.so.*
1118 %biarchlib libgij.so.*
1119 %biarchlib libgcj-tools.so.*
1121 %versmainlib libgcj.la
1122 %mainlib libgcj.so.*
1123 %mainlib libgij.so.*
1124 %mainlib libgcj-tools.so.*
1126 %{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjvm.la
1127 %{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjvm.so
1128 %{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjavamath.la
1129 %{_libdir}/gcj-%{gcc_dir_version}-%{gcj_sover}/libjavamath.so
1131 %files -n libgcj_bc47
1132 %defattr(-,root,root)
1133 %if %{biarch_libjava}
1134 %biarchlib libgcj_bc.so.*
1136 %mainlib libgcj_bc.so.*
1139 %files -n libgcj47-jar
1140 %defattr(-,root,root)
1141 %{_prefix}/share/java/libgcj-%{gcc_dir_version}.jar
1142 %{_prefix}/share/java/libgcj-tools-%{gcc_dir_version}.jar
1144 %files -n libgcj47-devel
1145 %defattr(-,root,root)
1146 %dir %{_prefix}/include/c++
1148 %dir %{libsubdir}/include
1150 %{_libdir}/pkgconfig/libgcj%{binsuffix}.pc
1151 %{libsubdir}/include/jawt.h
1152 %{libsubdir}/include/jawt_md.h
1153 %{libsubdir}/include/jni.h
1154 %{libsubdir}/include/jni_md.h
1155 %{libsubdir}/include/jvmpi.h
1162 %{libsubdir}/include/gcj
1163 %if %{biarch_libjava}
1164 %versbiarchlib libgcj.so
1165 %versbiarchlib libgcj.spec
1166 %versbiarchlib libgcj-tools.so
1167 %versbiarchlib libgij.so
1168 %versbiarchlib libgcj_bc.so
1170 %versmainlib libgcj.so
1171 %versmainlib libgcj.spec
1172 %versmainlib libgcj-tools.so
1173 %versmainlib libgij.so
1174 %versmainlib libgcj_bc.so
1178 %defattr(-,root,root)
1179 %{_prefix}/bin/gij%{binsuffix}
1180 %{_prefix}/bin/gappletviewer%{binsuffix}
1181 %{_prefix}/bin/gjar%{binsuffix}
1182 %{_prefix}/bin/gjarsigner%{binsuffix}
1183 %{_prefix}/bin/gjavah%{binsuffix}
1184 %{_prefix}/bin/gkeytool%{binsuffix}
1185 %{_prefix}/bin/gnative2ascii%{binsuffix}
1186 %{_prefix}/bin/gorbd%{binsuffix}
1187 %{_prefix}/bin/grmic%{binsuffix}
1188 %{_prefix}/bin/grmid%{binsuffix}
1189 %{_prefix}/bin/grmiregistry%{binsuffix}
1190 %{_prefix}/bin/gserialver%{binsuffix}
1191 %{_prefix}/bin/gtnameserv%{binsuffix}
1192 %doc %{_mandir}/man1/gij%{binsuffix}.1.gz
1193 %doc %{_mandir}/man1/gappletviewer%{binsuffix}.1.gz
1194 %doc %{_mandir}/man1/grmic%{binsuffix}.1.gz
1195 %doc %{_mandir}/man1/grmid%{binsuffix}.1.gz
1196 %doc %{_mandir}/man1/grmiregistry%{binsuffix}.1.gz
1197 %doc %{_mandir}/man1/gkeytool%{binsuffix}.1.gz
1198 %doc %{_mandir}/man1/gjar%{binsuffix}.1.gz
1199 %doc %{_mandir}/man1/gjarsigner%{binsuffix}.1.gz
1200 %doc %{_mandir}/man1/gjavah%{binsuffix}.1.gz
1201 %doc %{_mandir}/man1/gnative2ascii%{binsuffix}.1.gz
1202 %doc %{_mandir}/man1/gorbd%{binsuffix}.1.gz
1203 %doc %{_mandir}/man1/gserialver%{binsuffix}.1.gz
1204 %doc %{_mandir}/man1/gtnameserv%{binsuffix}.1.gz
1210 %if 0%{?building_libffi:1}
1212 %defattr(-,root,root)
1213 %mainlib libffi.so.*
1215 %if %{separate_biarch}
1216 %files -n libffi47%{separate_biarch_suffix}
1217 %defattr(-,root,root)
1218 %biarchlib libffi.so.*
1221 %files -n libffi47-devel
1222 %defattr(-,root,root)
1223 %{_prefix}/include/ffi.h
1224 %{_prefix}/include/ffitarget.h
1227 %{_libdir}/pkgconfig/libffi.pc
1228 %doc %{_mandir}/man3/ffi%{binsuffix}.3.gz
1229 %doc %{_mandir}/man3/ffi_call%{binsuffix}.3.gz
1230 %doc %{_mandir}/man3/ffi_prep_cif%{binsuffix}.3.gz
1232 %if %{separate_biarch}
1233 %files -n libffi47-devel%{separate_biarch_suffix}
1234 %defattr(-,root,root)
1235 %biarchlib libffi.so
1240 # GCC-TESTSUITE-DELETE-END
1242 %if 0%{?run_tests:1}
1243 %files -n gcc47-testresults
1244 %defattr(-,root,root)
1245 %doc testresults/test_summary.txt
1246 %doc testresults/*.sum
1247 %doc testresults/*.log