File of Package gcc43

#! /bin/sh

# call this via
# 2005-05-09,

test -z "$cross_arch" && echo 1>&2 "Error: $0 needs environment variable 'cross_arch'"
test -z "$outfile" && echo 1>&2 "Error: $0 needs environment variable 'outfile'"
cross_arch_cpu=`echo $cross_arch | sed -e 's/\([^-]*\)-\?.*/\1/'`

cat << EOF
# spec file for package gcc (Version 4.0.1)
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
# Please submit bugfixes or comments via

# norootforbuild

%define build_cp 1
%define build_ada 0
%define build_java 0
%define build_libjava 0
%define build_fortran 0
%define build_objc 0
%define build_objcp 0
%define build_nof 0
%define build_with_mudflap 0
%define gcc_for_opt 0
%define gcc_target_arch $cross_arch

%if "$cross_arch" == "spu"
%define build_fortran 1

%if 0%{?build_static:1}
%define build_fortran 0

Name: cross-$cross_arch-gcc$name_suffix
BuildRequires: bison flex mpfr-devel
BuildRequires: cross-$cross_arch_cpu-binutils
%if "$cross_arch$name_suffix" == "spu-static"
BuildRequires: cross-$cross_arch_cpu-newlib-headers
%if "$cross_arch$name_suffix" == "spu"
BuildRequires: cross-$cross_arch_cpu-newlib
Requires: cross-$cross_arch_cpu-newlib
Requires: cross-$cross_arch_cpu-binutils
# Suffixed gcc conflicts with unsuffixed gcc
%if "$name_suffix" == ""
Conflicts: cross-$cross_arch_cpu-gcc

%define _prefix /opt/cross

sed -n -e '/COMMON-BEGIN/,/COMMON-END/p' $outfile | sed -n -e '1,/%description/p' 
cat << EOF
This compiler supports the C language on $cross_arch microprocessors.
Also install cross-$cross_arch-binutils and $cross_arch-libc.

sed -n -e '/%description/,$p' $outfile | sed -n -e '/COMMON-BEGIN/,/COMMON-END/p'

cat << EOF

make %{?jobs:-j%jobs} 

cd obj-%{GCCDIST}
rm -rf \$RPM_BUILD_ROOT%{_prefix}/share
rm -f \$RPM_BUILD_ROOT%{_prefix}/bin/*-gccbug
find \$RPM_BUILD_ROOT -name libiberty.a | xargs rm



openSUSE Build Service is sponsored by