forked from Imagelibrary/rtems
* setup.def, sparc-solaris-gcc.spec.in: Update and enable gnat. You must build and install a C only toolset first though.
82 lines
2.0 KiB
RPMSpec
82 lines
2.0 KiB
RPMSpec
#
|
|
# 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
|
|
touch gcc-%{gcc_version}/gcc/ada/treeprs.ads
|
|
touch gcc-%{gcc_version}/gcc/ada/[es]info.h
|
|
touch gcc-%{gcc_version}/gcc/ada/nmake.ad[bs]
|
|
|
|
|
|
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,ada \
|
|
--prefix=%{prefix}
|
|
|
|
make all
|
|
|
|
make -C gcc cross-gnattools
|
|
make -C gcc ada.all.cross
|
|
|
|
# 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
|