PKGBUILDs/community/cross-arm-elf-gcc-base/PKGBUILD

50 lines
1.4 KiB
Bash
Raw Normal View History

2009-10-10 02:15:33 +00:00
# $Id: PKGBUILD 82 2009-07-17 19:56:55Z aaron $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgname=cross-arm-elf-gcc-base
pkgver=4.3.3
pkgrel=1
pkgdesc="The GNU Compiler Collection"
arch=(i686 x86_64)
license=('GPL' 'LGPL')
url="http://gcc.gnu.org"
depends=('cross-arm-elf-binutils>=2.18')
options=(!libtool !emptydirs zipman docs)
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-core-${pkgver}.tar.bz2)
md5sums=('1739288c2c7b1472796b33d641dbdbbd')
build() {
cd ${startdir}/src/gcc-$pkgver
export CFLAGS="-O2 -pipe"
export CXXFLAGS="-O2 -pipe"
rm -rf build
mkdir build
cd build
../configure --prefix=/usr \
--target=arm-elf \
--host=$CHOST \
--build=$CHOST \
--enable-shared --disable-nls --enable-languages=c --enable-multilib \
--with-local-prefix=/usr/lib/cross-arm \
--with-as=/usr/bin/arm-elf-as --with-ld=/usr/bin/arm-elf-ld \
--enable-softfloat \
--with-float=soft \
--with-newlib \
--with-sysroot=/usr/i686-pc-linux-gnu/arm-elf
make all-gcc all-target-libgcc || return 1
make DESTDIR=${startdir}/pkg install-gcc install-target-libgcc || return 1
cp -r $startdir/pkg/usr/libexec/* $startdir/pkg/usr/lib/ && \
rm -rf $startdir/pkg/usr/libexec && \
rm -f $startdir/pkg/usr/man/man7/fsf-funding.7* && \
rm -f $startdir/pkg/usr/man/man7/gfdl.7* && \
rm -f $startdir/pkg/usr/man/man7/gpl.7* && \
mkdir -p $pkgdir/usr/share && \
mv $pkgdir/usr/man $pkgdir/usr/share/ && \
rm -rf $pkgdir/usr/info
}