4 # call this via pre_checkin.sh
6 # 2005-05-09, jw@suse.de
8 test -z "$cross_arch" && echo 1>&2 "Error: $0 needs environment variable 'cross_arch'"
9 test -z "$outfile" && echo 1>&2 "Error: $0 needs environment variable 'outfile'"
10 cross_arch_cpu=`echo $cross_arch | sed -e 's/\([^-]*\)-\?.*/\1/'`
14 # spec file for package gcc (Version 4.0.1)
16 # Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
17 # This file and all modifications and additions to the pristine
18 # package are under the same license as the package itself.
20 # Please submit bugfixes or comments via http://www.suse.de/feedback/
28 %define build_libjava 0
29 %define build_fortran 0
33 %define build_with_mudflap 0
34 %define gcc_target_arch $cross_arch
36 %if "$cross_arch" == "spu"
37 %define build_fortran 1
40 %if 0%{?build_static:1}
41 %define build_fortran 0
44 Name: cross-$cross_arch-gcc$base_ver$name_suffix
47 BuildRequires: gettext-devel
48 BuildRequires: glibc-devel-32bit
49 BuildRequires: mpc-devel
50 BuildRequires: mpfr-devel
52 BuildRequires: zlib-devel
53 %ifarch %ix86 x86_64 ppc ppc64 s390 s390x ia64 %sparc hppa %arm
54 BuildRequires: cloog-devel
55 BuildRequires: ppl-devel
57 BuildRequires: cross-$cross_arch_cpu-binutils
58 %if "$cross_arch" == "spu"
59 %if 0%{?build_static:1}
60 BuildRequires: cross-$cross_arch_cpu-newlib-headers
62 BuildRequires: cross-$cross_arch_cpu-newlib
64 Requires: cross-$cross_arch_cpu-newlib
66 Requires: cross-$cross_arch_cpu-binutils
67 # Suffixed gcc conflicts with unsuffixed gcc
68 %if "$name_suffix" == ""
70 Conflicts: cross-$cross_arch_cpu-gcc$base_ver
73 %define _prefix /opt/cross
76 sed -n -e '/COMMON-BEGIN/,/COMMON-END/p' $outfile | sed -n -e '1,/%description/p'
78 This compiler supports the C language on $cross_arch microprocessors.
79 Also install cross-$cross_arch-binutils and $cross_arch-libc.
83 sed -n -e '/%description/,$p' $outfile | sed -n -e '/COMMON-BEGIN/,/COMMON-END/p'
91 make install DESTDIR=\$RPM_BUILD_ROOT
92 rm -rf \$RPM_BUILD_ROOT%{_prefix}/share
93 rm -f \$RPM_BUILD_ROOT%{_prefix}/bin/*-gccbug
94 find \$RPM_BUILD_ROOT -name libiberty.a | xargs rm
97 rm -rf \$RPM_BUILD_ROOT
100 %defattr(-,root,root)