blob: 13d63059ae82c5f3cf125f1a0bdf3d0ef467305b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# $Id: PKGBUILD 68141 2012-03-18 17:28:57Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgname=arm-elf-gcc-base
pkgver=4.6.3
pkgrel=2
pkgdesc="The GNU Compiler Collection"
arch=(i686 x86_64)
license=('GPL' 'LGPL')
url="http://gcc.gnu.org"
depends=('arm-elf-binutils' 'libmpc' 'libelf')
options=(!libtool !emptydirs zipman docs !strip)
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-core-${pkgver}.tar.bz2)
md5sums=('766091220c6a14fcaa2c06dd573e3758')
build() {
cd $srcdir/gcc-$pkgver
export CFLAGS="-O2 -pipe"
export CXXFLAGS="-O2 -pipe"
[ $NOEXTRACT -eq 1 ] || rm -rf build
mkdir build
cd build
[ $NOEXTRACT -eq 1 ] || ../configure --prefix=/usr \
--target=arm-elf \
--host=$CHOST \
--build=$CHOST \
--enable-shared --disable-nls --enable-languages=c --enable-multilib \
--with-local-prefix=/usr/lib/arm-elf \
--with-as=/usr/bin/arm-elf-as --with-ld=/usr/bin/arm-elf-ld \
--enable-softfloat \
--with-float=soft \
--with-newlib \
--with-sysroot=/usr/$CHOST/arm-elf
make all-gcc all-target-libgcc
}
package() {
cd $srcdir/gcc-$pkgver/build
export CFLAGS="-O2 -pipe"
export CXXFLAGS="-O2 -pipe"
make DESTDIR=$pkgdir install-gcc install-target-libgcc
rm -f $pkgdir/usr/share/man/man7/fsf-funding.7*
rm -f $pkgdir/usr/share/man/man7/gfdl.7*
rm -f $pkgdir/usr/share/man/man7/gpl.7*
rm -rf $pkgdir/usr/share/info
cp -r $pkgdir/usr/libexec/* $pkgdir/usr/lib/
rm -rf $pkgdir/usr/libexec
# strip it manually
strip $pkgdir/usr/bin/* 2>/dev/null || true
find $pkgdir/usr/lib -type f -exec arm-elf-strip --strip-debug --strip-unneeded {} \; 2>/dev/null || true
}
|