URL
https://opencores.org/ocsvn/or1k_old/or1k_old/trunk
Subversion Repositories or1k_old
[/] [or1k_old/] [trunk/] [rtems-20020807/] [contrib/] [solaris/] [sparc-solaris-gcc.spec.in] - Rev 1765
Go to most recent revision | Compare with Previous | Blame | View Log
#
# spec file for building gcc for solaris
#
%define gcc_version @GCC_VERS@
%define gcc_rpmvers @GCC_RPMVERS@
Vendor: OAR Corporation
Distribution: Linux
Name: sparc-solaris-gcc
Summary: sparc-solaris gcc.
Requires: sparc-solaris-binutils
Requires: sparc-solaris-libs
Group: solaris
Release: @GCC_RPMREL@
License: gcc is GPL/LGPL
Prefix: /opt/solaris
Autoreqprov: on
Packager: joel@OARcorp.com
Version: %gcc_rpmvers
Source0: ftp://sourceware.cygnus.com/pub/solaris/latest/gcc/gcc-%{gcc_version}.tar.gz
NoSource: 0
BuildRoot: @RPM_BUILD_ROOT@
%description
Cross gcc for target solaris
%prep
# untar the sources inside sparc-solaris-gcc
%setup -c -n %{name} -a 0
test -d build || mkdir build
%build
cd build
../gcc-%{gcc_version}/configure --target=sparc-solaris \
--with-gnu-as --with-gnu-ld --without-newlib --verbose \
--disable-shared --disable-nls --enable-languages=c \
--prefix=%{prefix}
make all
# We don't want info files
make info
%install
cd build
# Bug in gcc-2.95.1: It doesn't build this installation directory
# If it doesn't find it, gcc doesn't install sparc-solaris/bin/gcc
../gcc-%{gcc_version}/mkinstalldirs \
$RPM_BUILD_ROOT%{prefix}/sparc-solaris/bin
make prefix=$RPM_BUILD_ROOT%{prefix} install
# cd back to build/
cd ..
# We don't want info files
rm -rf $RPM_BUILD_ROOT%{prefix}/info
# libiberty comes from solaris-libs or binutils
rm -f $RPM_BUILD_ROOT%{prefix}/sparc-solaris/lib/libiberty.a
rm -f $RPM_BUILD_ROOT%{prefix}/lib/libiberty.a
pwd
find $RPM_BUILD_ROOT%{prefix} ! -type d -print | sed -e "s,^$RPM_BUILD_ROOT,,g" >files.list
%clean
# let rpm --clean remove BuildRoot iff using the default BuildRoot
test "$RPM_BUILD_ROOT" = "@RPM_BUILD_ROOT@" && \
rm -rf $RPM_BUILD_ROOT
%files -f files.list
Go to most recent revision | Compare with Previous | Blame | View Log