summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Eriksson2015-12-30 00:18:59 +0100
committerSimon Eriksson2015-12-30 00:20:33 +0100
commit46c426a3fcaafd22cdb24ff6623ec7e33d9f7129 (patch)
tree803759534d6b74043a9300866a00628b5008c8e6
downloadaur-46c426a3fcaafd22cdb24ff6623ec7e33d9f7129.tar.gz
Initial commit
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD48
2 files changed, 63 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..b0b612c0586
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = mips64-elf-newlib
+ pkgdesc = A C library intended for use on embedded systems (mips64-elf)
+ pkgver = 2.2.0
+ pkgrel = 1
+ url = http://sourceware.org/newlib/
+ arch = any
+ license = BSD
+ makedepends = mips64-elf-gcc-stage1
+ options = !strip
+ options = !emptydirs
+ source = ftp://sources.redhat.com/pub/newlib/newlib-2.2.0.tar.gz
+ sha256sums = f8add263b0737591aff451b12a00c262c2efac4fa87d741fa1c318fc3bb335be
+
+pkgname = mips64-elf-newlib
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..0222572cca7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,48 @@
+#Maintainer: Simon Eriksson <simon.eriksson.1187+aur AT gmail.com>
+
+_target=mips64-elf
+pkgname=${_target}-newlib
+pkgver=2.2.0
+pkgrel=1
+pkgdesc="A C library intended for use on embedded systems (${_target})"
+arch=('any')
+url='http://sourceware.org/newlib/'
+license=('BSD')
+makedepends=("${_target}-gcc-stage1")
+options=( '!strip' '!emptydirs')
+source=("ftp://sources.redhat.com/pub/newlib/newlib-$pkgver.tar.gz")
+sha256sums=('f8add263b0737591aff451b12a00c262c2efac4fa87d741fa1c318fc3bb335be')
+
+build()
+{
+ rm -rf build
+ mkdir build && cd build
+
+ export CFLAGS_FOR_TARGET='-G0 -O2 -ffunction-sections -fdata-sections'
+
+ ../newlib-${pkgver}/configure \
+ --prefix=/usr \
+ --target=${_target} \
+ --enable-lto \
+ --disable-libssp \
+ --disable-nls \
+ --disable-shared \
+ --disable-threads \
+ --disable-werror \
+
+ make
+}
+
+package()
+{
+ cd build
+ make DESTDIR="${pkgdir}" install -j1
+
+ find "$pkgdir"/usr/$_target/lib \( -name "*.a" -or -name "*.o" \) -exec $_target-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc '{}' \;
+
+ rm "$pkgdir"/usr/share/info/*.info
+
+ install -d "$pkgdir"/usr/share/licenses/$pkgname/
+ install -m644 -t "$pkgdir"/usr/share/licenses/$pkgname/ "$srcdir"/newlib-$pkgver/COPYING*
+}
+