summaryrefslogtreecommitdiff
path: root/community/cross-arm-wince-cegcc-libstdcppdll/PKGBUILD
blob: bbc8c0d6cf01a65ed4dd2351dc56bcf7ce87e1ec (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
61
62
63
64
65
66
67
68
69
70
71
# $Id: PKGBUILD 20984 2010-07-13 09:55:52Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=cross-arm-wince-cegcc-libstdcppdll
pkgver=0.59.1
pkgrel=1
_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')
groups=('cegcc')
source=(http://arch.pp.ru/~sergej/dl/cegcc-$pkgver.tar.bz2)
md5sums=('5e3c1098abdf8e5db2a3518ee3578b4b')

build() {
  export PATH=$_prefix/bin:$PATH
  export TARGET=arm-wince-cegcc
  unset CFLAGS
  unset CXXFLAGS
  unset LDFLAGS
  unset MAKEFLAGS

  cd $srcdir/cegcc/src/

  mkdir build-gcc || true
  cd build-gcc

if [ $NOEXTRACT -ne 1 ]; then
  ../gcc-4.4.0/configure \
	--prefix=${_prefix}      \
	--exec-prefix=${_prefix} \
	--bindir=${_prefix}/bin  \
	--target=arm-wince-cegcc \
	--build=$CARCH		 \
	--host=$CARCH		 \
	--disable-nls            \
	--includedir=${_prefix}/include \
	--with-gcc                     \
	--with-gnu-ld                  \
	--with-gnu-as                  \
	--enable-threads=win32         \
	--enable-languages=c,c++       \
	--disable-win32-registry       \
	--disable-multilib             \
	--disable-interwork            \
	--without-newlib               \
	--enable-checking              \
	--with-headers                 \
	--disable-libssp
fi

#  make || return 1

  #
  # libstdc++
  #
  cd $srcdir/cegcc/src/cegcc/libstdc++

  sed -i 's#.*unwind-sjlj_s.o#\t\t../../build-gcc/arm-wince-cegcc/libgcc/unwind-sjlj_s.o#' Makefile

  make || return 1

  mkdir -p $pkgdir${_prefix}/arm-wince-cegcc/lib && \
  make PREFIX=$pkgdir/${_prefix} install || return 1

  rm -f $pkgdir${_prefix}/arm-wince-cegcc/lib/device
  find $pkgdir/${_prefix} -type f -name \*.a -exec arm-wince-cegcc-ranlib {} \;
}