summaryrefslogtreecommitdiff
path: root/community/cross-arm-wince-cegcc-gcc-base/PKGBUILD
blob: 19dc96ccc333b65c8b5b91236b81fb236278ef6b (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
# $Id: PKGBUILD 50658 2011-06-29 11:37:38Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=cross-arm-wince-cegcc-gcc-base
pkgver=0.59.1
pkgrel=3
_prefix=/opt/cegcc
pkgdesc="CE GCC bundle - cross compilation tools for WinCE"
arch=(i686 x86_64)
license=(GPL)
options=(!libtool)
url="http://cegcc.sf.net"
depends=('glibc' 'mpfr' 'cloog')
makedepends=(cross-arm-wince-cegcc-binutils)
source=(http://arch.p5n.pp.ru/~sergej/dl/cegcc-$pkgver.tar.bz2)
md5sums=('5e3c1098abdf8e5db2a3518ee3578b4b')

build() {
  cd $srcdir/cegcc/src

  mkdir build-gcc-base || true
  cd build-gcc-base

  export PATH=$_prefix/bin:$PATH
  export TARGET=arm-wince-cegcc
  unset CFLAGS
  unset LDFLAGS
  unset MAKEFLAGS

  ../gcc-4.4.0/configure               \
	--with-gcc                     \
	--with-gnu-ld                  \
	--with-gnu-as                  \
	--target=arm-wince-cegcc       \
	--build=$CARCH		       \
	--host=$CARCH		       \
	--prefix=${_prefix}            \
	--disable-threads              \
	--disable-nls                  \
	--disable-shared               \
	--enable-languages=c           \
	--disable-win32-registry       \
	--disable-multilib             \
	--disable-interwork            \
	--without-headers              \
	--with-as=$_prefix/bin/arm-wince-cegcc-as \
	--with-ld=$_prefix/bin/arm-wince-cegcc-ld \
	--with-local-prefix=$_prefix \
	--enable-checking

  make all-gcc || (cd gcc && make) && make all-gcc || return 1
  make DESTDIR=$pkgdir install-gcc || return 1
  find $pkgdir/${_prefix} -type f -name \*.a -exec arm-wince-cegcc-ranlib {} \;
  cd $pkgdir/${_prefix} && ln -s arm-wince-cegcc arm-cegcc
}