summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorvonPalitroque2015-09-19 14:30:27 -0400
committervonPalitroque2015-09-19 14:30:27 -0400
commit58bf741d39a96fe51377657de759fd5d86a0faf8 (patch)
tree3ef6cedebe7af5af04b1b7c0e409fe38548efc58
downloadaur-58bf741d39a96fe51377657de759fd5d86a0faf8.tar.gz
initial import
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD56
2 files changed, 73 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5873b379fb43
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = msp430-elf-newlib
+ pkgdesc = C library for bare metal systems msp430-elf target.
+ pkgver = 2.2.0.20150824
+ pkgrel = 1
+ url = https://sourceware.org/newlib/
+ arch = any
+ groups = devel
+ license = GPL
+ depends = msp430-elf-gcc-stage1
+ depends = msp430-elf-binutils
+ options = !strip
+ options = staticlibs
+ source = ftp://sourceware.org/pub/newlib/newlib-2.2.0.20150824.tar.gz
+ sha256sums = 05c4a82974f30487ded7965465acdd3f726ea487e1398f118e52c516b4aad093
+
+pkgname = msp430-elf-newlib
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..360478ef562d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,56 @@
+# Maintainer: Orlando Arias <orlandoarias at gmail <dot> com>
+
+_target=msp430-elf
+pkgname=${_target}-newlib
+pkgver=2.2.0.20150824
+pkgrel=1
+pkgdesc="C library for bare metal systems ${_target} target."
+arch=(any)
+url="https://sourceware.org/newlib/"
+license=('GPL')
+groups=(devel)
+depends=("${_target}-gcc-stage1" "${_target}-binutils")
+options=('!strip' 'staticlibs')
+source=("ftp://sourceware.org/pub/newlib/newlib-${pkgver}.tar.gz")
+sha256sums=('05c4a82974f30487ded7965465acdd3f726ea487e1398f118e52c516b4aad093')
+
+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 -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
+}
+
+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: