blob: 4d292dde3f0ed7f06d1524903e16c5aa1b0717e2 (
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
|
# Maintainer: Orlando Arias <orlandoarias at gmail <dot> com>
_target=msp430-elf
pkgname=${_target}-newlib
pkgver=4.4.0.20231231
pkgrel=1
pkgdesc="C library for bare metal systems for the ${_target} target."
arch=(any)
url="https://sourceware.org/newlib/"
license=('BSD')
groups=(devel)
depends=("${_target}-gcc-stage1" "${_target}-binutils")
options=('!makeflags' '!strip' 'staticlibs' '!libtool')
source=("ftp://sourceware.org/pub/newlib/newlib-${pkgver}.tar.gz")
sha256sums=('0c166a39e1bf0951dfafcd68949fe0e4b6d3658081d6282f39aeefc6310f2f13')
prepare() {
cd "${srcdir}/newlib-${pkgver}"
[[ -d newlib-build ]] && rm -rf newlib-build
mkdir newlib-build
}
build() {
cd "${srcdir}/newlib-${pkgver}/newlib-build"
export CFLAGS_FOR_TARGET="-Os -g -ffunction-sections -fdata-sections"
../configure \
--prefix=/usr \
--target=${_target} \
--disable-newlib-supplied-syscalls \
--enable-newlib-reent-small \
--disable-newlib-fseek-optimization \
--disable-newlib-wide-orient \
--enable-newlib-nano-formatted-io \
--disable-newlib-io-float \
--enable-newlib-nano-malloc \
--disable-newlib-unbuf-stream-opt \
--enable-lite-exit \
--enable-newlib-global-atexit \
--disable-nls
make -j1
}
package() {
cd "${srcdir}/newlib-${pkgver}/newlib-build"
make DESTDIR="${pkgdir}/" install
rm -rf "${pkgdir}/usr/share"
install -d -m755 "${pkgdir}/usr/${_target}/usr"
cd "${pkgdir}/usr/${_target}/usr"
ln -s ../lib .
ln -s ../include .
}
# vim:set ts=2 sw=2 et:
|