PKGBUILDs/core/gcc/PKGBUILD

68 lines
2.1 KiB
Bash

# Maintainer: Alexander Foremny <alexanderforemny@gmail.com>
pkgbase=gcc
pkgname=('gcc' 'gcc-libs')
pkgver=4.4.2
pkgrel=1
pkgdesc='The GNU Compiler Collection'
arch=(arm)
license=(GPL LGPL custom)
url='http://gcc.gnu.org'
makedepends=(flex 'gcc>=3.4' 'gawk>=3.1.5' 'make>=3.80')
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-{core,g++,fortran,objc}-$pkgver.tar.bz2)
md5sums=('d50ec5af20508974411d0c83c5f4e396'
'43b1e4879eb282dc4b05e4c016d356d7'
'184897e1b5e8c76760813c1955ee02c2'
'd8d26187d386a0591222a580b5a5b3d3')
options=('!libtool')
build() {
mkdir -p $srcdir/gcc-build
cd $srcdir/gcc-build
../gcc-$pkgver/configure --prefix=/usr \
--enable-languages=c,c++,fortran,objc,obj-c++ \
--disable-libstdcxx-pch \
--enable-__cxa_atexit \
--with-arch=armv5te \
--disable-multilib \
--enable-threads=posix || return 1
make || return 1
}
package_gcc() {
depends=("gcc-libs==$pkgver-$pkgrel" 'binutils>=2.19.1' 'mpfr>=2.4.1' 'cloog-ppl>=0.15.3')
groups=(base-devel)
license=(GPL)
cd $srcdir/gcc-build
make DESTDIR=$pkgdir install || return 1
ln -sf gcc $pkgdir/usr/bin/cc
ln -sf g++ $pkgdir/usr/bin/c++
# Remove libraries provided by gcc-libs.
rm -f $pkgdir/usr/lib/lib*
}
package_gcc-libs() {
depends=('glibc>=2.10.1')
groups=(base)
pkgdesc='Runtime libraries shipped by GCC for C and C++ languages'
license=(LGPL custom)
cd $srcdir/gcc-build
make DESTDIR=$pkgdir install-target-libgcc install-target-libmudflap install-target-libssp install-target-libstdc++-v3 install-target-libgomp install-target-libgfortran install-target-libobjc || return 1
# make target `install-target-libstdc++-v3' installs include files.
# Those are provided by gcc.
rm -rf $pkgdir/usr/include
# make target `install-target-libgomp' installs include files as well.
# Those, too, should be provided by gcc.
rm -rf $pkgdir/usr/lib/gcc
# Install Runtime Library Exception license.
install -Dm644 ../gcc-$pkgver/COPYING.RUNTIME \
$pkgdir/usr/share/licenses/$pkgname/RUNTIME.LIBRARY.EXCEPTION
}