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

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


    Date: Thursday, November 6, 2014 @ 06:53:30
  Author: anatolik
Revision: 122030

upgpkg: arm-none-eabi-gcc 4.9.2-2

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

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

----------+
 PKGBUILD |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2014-11-06 05:53:03 UTC (rev 122029)
+++ PKGBUILD	2014-11-06 05:53:30 UTC (rev 122030)
@@ -6,7 +6,7 @@
 pkgver=4.9.2
 _islver=0.12.2
 _cloogver=0.18.1
-pkgrel=1
+pkgrel=2
 #_snapshot=4.9-20140903
 pkgdesc='The GNU Compiler Collection - cross compiler for ARM EABI (bare-metal) target'
 arch=(i686 x86_64)
@@ -14,7 +14,7 @@
 license=(GPL LGPL FDL)
 depends=($_target-binutils $_target-newlib  zlib libmpc)
 makedepends=(gmp mpfr)
-options=(!emptydirs !strip staticlibs)
+options=(!emptydirs staticlibs)
 source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2
         #ftp://gcc.gnu.org/pub/gcc/snapshots/$_snapshot/gcc-$_snapshot.tar.bz2
         http://isl.gforge.inria.fr/isl-$_islver.tar.bz2
@@ -51,9 +51,8 @@
 build() {
   cd gcc-build
 
-  export CFLAGS_FOR_TARGET='-O2 -g -pipe'
-  export CXXFLAGS_FOR_TARGET='-O2 -g -pipe'
-
+  export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -fno-exceptions'
+  export CXXFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -fno-exceptions'
   $srcdir/$_basedir/configure \
     --target=$_target \
     --prefix=/usr \
@@ -99,8 +98,7 @@
 
   make DESTDIR="$pkgdir" install -j1
 
-  # Strip host objects but do not touch target one
-  find "$pkgdir"/usr/{bin,lib} -executable -type f -exec /usr/bin/strip --strip-debug '{}' \;
+  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 '{}' \;
 
   # Remove files that conflict with host gcc package
   rm -r "$pkgdir"/usr/share/man/man7



More information about the arch-commits mailing list