[arch-commits] Commit in arm-none-eabi-newlib/trunk (PKGBUILD)

Anatol Pomozov anatolik at archlinux.org
Thu Nov 6 05:53:03 UTC 2014


    Date: Thursday, November 6, 2014 @ 06:53:03
  Author: anatolik
Revision: 122029

upgpkg: arm-none-eabi-newlib 2.1.0-2

Strip binaries
Use more agressive compiler optimizations (similar to what ARM toolchain does)

Modified:
  arm-none-eabi-newlib/trunk/PKGBUILD

----------+
 PKGBUILD |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-11-06 05:39:00 UTC (rev 122028)
+++ PKGBUILD	2014-11-06 05:53:03 UTC (rev 122029)
@@ -4,7 +4,7 @@
 _target=arm-none-eabi
 pkgname=$_target-newlib
 pkgver=2.1.0
-pkgrel=1
+pkgrel=2
 pkgdesc='A C standard library implementation intended for use on embedded systems (ARM bare metal)'
 arch=(any)
 url='http://www.sourceware.org/newlib/'
@@ -16,11 +16,10 @@
 sha1sums=('SKIP')
 
 build() {
-  export CFLAGS_FOR_TARGET='-g -O2 -ffunction-sections -fdata-sections'
-
   rm -rf build-{newlib,nano}
   mkdir build-{newlib,nano}
 
+  export CFLAGS_FOR_TARGET='-g -O2 -ffunction-sections -fdata-sections'
   cd "$srcdir"/build-newlib
   ../newlib/configure \
     --target=$_target \
@@ -31,6 +30,7 @@
     --enable-newlib-register-fini
   make
 
+  export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections'
   cd "$srcdir"/build-nano
   ../newlib/configure \
     --target=$_target \
@@ -56,6 +56,8 @@
   cd "$srcdir"/build-newlib
   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/



More information about the arch-commits mailing list