diff options
author | David P <megver83@parabola.nu> | 2018-05-04 20:34:33 -0300 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2018-05-04 20:35:01 -0300 |
commit | c12017aaa54fa5eed820343c6df2c8ab122749c4 (patch) | |
tree | 989e3c4f18254803bdb9ddf0fe5c76916d27901a /libre/xtensa-elf-gcc | |
parent | 88d5eda679c3030071ca52196cf8c1f849be4c68 (diff) | |
download | abslibre-c12017aaa54fa5eed820343c6df2c8ab122749c4.tar.gz abslibre-c12017aaa54fa5eed820343c6df2c8ab122749c4.tar.bz2 abslibre-c12017aaa54fa5eed820343c6df2c8ab122749c4.zip |
upgpkg: arm-linux-gnueabi-gcc, sh-elf-gcc; add xtensa-elf-{gcc,binutils}
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'libre/xtensa-elf-gcc')
-rw-r--r-- | libre/xtensa-elf-gcc/PKGBUILD | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/libre/xtensa-elf-gcc/PKGBUILD b/libre/xtensa-elf-gcc/PKGBUILD new file mode 100644 index 000000000..bf0696a61 --- /dev/null +++ b/libre/xtensa-elf-gcc/PKGBUILD @@ -0,0 +1,102 @@ +# Maintainer: David P. <megver83@parabola.nu> + +_target=xtensa-elf +pkgname=$_target-gcc +_pkgver=7.3.0 +pkgver=$_pkgver+20180426 +_islver=0.19 +pkgrel=1 +_snapshot=${pkgver:0:1}-${pkgver##$_pkgver+} +pkgdesc="The GNU Compiler Collection - cross compiler for Xtensa target" +arch=('x86_64' 'i686' 'armv7h') +url='http://gcc.gnu.org/' +license=(GPL LGPL FDL) +depends=($_target-binutils libmpc zlib) +makedepends=(gmp mpfr) +options=(!emptydirs !strip) +source=(#https://gcc.gnu.org/pub/gcc/releases/gcc-$_pkgver/gcc-$_pkgver.tar.bz2 + https://gcc.gnu.org/pub/gcc/snapshots/$_snapshot/gcc-$_snapshot.tar.xz + http://isl.gforge.inria.fr/isl-$_islver.tar.bz2 + https://raw.githubusercontent.com/qca/open-ath9k-htc-firmware/master/local/patches/gcc.patch) +sha512sums=('7b2c99e12b654b70d630499b00518121276b55673002f3eab02ffa79b24160170bcf0cac4aeee0c07101377fb48adb882d9c4a24ea479305aa10b8c7ab1642d7' + '08f4db964d9e02ec8aa9779378ed76e0ddf1d56f81f87664dbf787555ce496cdc87e836f8a51ae137f45e648c604870cce07ee45919eafb549e404afb8f27083' + '7637408259cef4b14a2f41690bbc769ad0dc6cf4d1c782405526aeb58f68193269af6882b23fb57c3521174e45709ed2d54f0af1f835646e70a3bfd9f626aad9') + +if [ -n "$_snapshot" ]; then + _basedir=gcc-$_snapshot +else + _basedir=gcc-$_pkgver +fi + +prepare() { + cd $_basedir + + # link isl for in-tree builds + ln -sf ../isl-$_islver isl + + echo $_pkgver > gcc/BASE-VER + + # hack! - some configure tests for header files using "$CPP $CPPFLAGS" + sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" "$srcdir"/$_basedir/{libiberty,gcc}/configure + + patch -p1 -i ../gcc.patch + + mkdir $srcdir/build-gcc +} + +build() { + cd build-gcc + + # using -pipe causes spurious test-suite failures + # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565 + CFLAGS=${CFLAGS/-pipe/} + CXXFLAGS=${CXXFLAGS/-pipe/} + + $srcdir/$_basedir/configure \ + --target=$_target \ + --prefix=/usr \ + --libexecdir=/usr/lib \ + --enable-languages=c,c++ \ + --enable-plugins \ + --enable-shared \ + --disable-decimal-float \ + --disable-libffi \ + --disable-libgomp \ + --disable-libmudflap \ + --disable-libquadmath \ + --disable-libssp \ + --disable-libstdcxx-pch \ + --disable-nls \ + --disable-threads \ + --disable-tls \ + --disable-multilib \ + --with-gnu-as \ + --with-gnu-ld \ + --with-system-zlib \ + --with-gmp \ + --with-mpfr \ + --with-mpc \ + --with-isl \ + --with-libelf \ + --enable-gnu-indirect-function \ + --with-pkgversion='Parabola Repository' \ + --with-bugurl='https://labs.parabola.nu/' + + make $MAKEFLAGS all-gcc +} + +package() { + cd build-gcc + + make DESTDIR="$pkgdir" install-gcc + + # strip target binaries + find "$pkgdir"/usr/lib/gcc/$_target/ -type f -and \( -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 '{}' \; + + # strip host binaries + find "$pkgdir"/usr/bin/ "$pkgdir"/usr/lib/gcc/$_target/ -type f -and \( -executable \) -exec strip '{}' \; + + # Remove files that conflict with host gcc package + rm -r "$pkgdir"/usr/share/man/man7 + rm -r "$pkgdir"/usr/share/info +} |