summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 684ffc2c03d28f886af0f59f844d66fd140b801c (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
# $Id$
# Maintainer: Timo Sarawinski <t.sarawinski@gmail.com>

_target=arm-none-eabi
pkgname=$_target-newlib-linaro-git
pkgver=3.1.0
pkgrel=1
_libname=newlib
_upstream_ver=snapshot-$pkgver
pkgdesc='A C standard library implementation intended for use on embedded systems (ARM bare metal) Linaro Git Version'
arch=(any)
url='http://www.sourceware.org/newlib/'
license=(BSD)
makedepends=($_target-gcc 'cloog')
options=(!emptydirs !strip)
provides=($_target-newlib)
conflicts=('arm-none-eabi-newlib-linaro')
source=("git+http://git.linaro.org/toolchain/newlib.git#tag=newlib-$pkgver")
sha1sums=('SKIP')


build() {

  cd "$srcdir/${_libname}"
  export CFLAGS_FOR_TARGET='-g -O3 -ffunction-sections -fdata-sections'
  ./configure \
    --target="$_target" \
    --prefix=/usr \
    --disable-newlib-supplied-syscalls \
    --disable-nls \
    --enable-newlib-io-long-long \
    --enable-newlib-register-fini \
    --enable-lto \
    --enable-gold=yes \
    --enable-ld=yes \
    --enable-newlib-reent-small           \
    --disable-newlib-fvwrite-in-streamio  \
    --disable-newlib-fseek-optimization   \
    --disable-newlib-wide-orient          \
    --enable-newlib-nano-malloc           \
    --disable-newlib-unbuf-stream-opt     \
    --enable-lite-exit                    \
    --enable-newlib-global-atexit         \
    --enable-newlib-nano-formatted-io
  make
}

check() {
  cd "$srcdir/${_libname}/"
  make -j5 check
}


package() {
  cd "$srcdir/${_libname}/"
  make DESTDIR="${pkgdir}" install -j1
}