diff options
author | Baltazár Radics | 2020-05-08 15:21:48 +0200 |
---|---|---|
committer | Baltazár Radics | 2020-05-08 15:21:48 +0200 |
commit | ea8d5215c9777e257d2d4284625db6826a0c78be (patch) | |
tree | 0ece7fdda72aee20dfb5093dccbaadb925c8dc86 | |
parent | 9f10be89adb3ed962ec1d38c543543f2015ee369 (diff) | |
download | aur-ea8d5215c9777e257d2d4284625db6826a0c78be.tar.gz |
Added xtensa-overlays
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 174 |
2 files changed, 93 insertions, 85 deletions
@@ -1,7 +1,7 @@ pkgbase = xtensa-esp32-elf-gcc pkgdesc = The GNU Compiler Collection - cross compiler for xtensa esp32 (bare-metal) target pkgver = 10.1.0 - pkgrel = 1 + pkgrel = 2 url = https://gcc.gnu.org/ arch = x86_64 license = GPL @@ -19,10 +19,12 @@ pkgbase = xtensa-esp32-elf-gcc source = https://ftp.gnu.org/gnu/gcc/gcc-10.1.0/gcc-10.1.0.tar.xz source = https://ftp.gnu.org/gnu/gcc/gcc-10.1.0/gcc-10.1.0.tar.xz.sig source = http://isl.gforge.inria.fr/isl-0.22.tar.bz2 + source = xtensa-overlays-fe9a594.tar.gz::https://codeload.github.com/espressif/xtensa-overlays/tar.gz/fe9a594 validpgpkeys = 33C235A34C46AA3FFB293709A328C3A2C3C45C06 sha256sums = b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2 sha256sums = SKIP sha256sums = b21d354acd613a91cb88328753ec3aaeb174d6af042d89c5fcf3bbcced370751 + sha256sums = 025a16d88ae7b17c013ed23beb02b8545b44673d2b8ecca748e63a79d5c1070d pkgname = xtensa-esp32-elf-gcc @@ -4,7 +4,8 @@ _target=xtensa-esp32-elf pkgname=$_target-gcc pkgver=10.1.0 _islver=0.22 -pkgrel=1 +_overlay_commit=fe9a594 +pkgrel=2 #_snapshot=8-20180427 pkgdesc='The GNU Compiler Collection - cross compiler for xtensa esp32 (bare-metal) target' arch=(x86_64) @@ -16,109 +17,114 @@ optdepends=("$_target-newlib: Standard C library optimized for embedded systems" options=(!emptydirs !strip) source=(https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz{,.sig} #ftp://gcc.gnu.org/pub/gcc/snapshots/$_snapshot/gcc-$_snapshot.tar.xz - http://isl.gforge.inria.fr/isl-$_islver.tar.bz2) + http://isl.gforge.inria.fr/isl-$_islver.tar.bz2 + xtensa-overlays-$_overlay_commit.tar.gz::https://codeload.github.com/espressif/xtensa-overlays/tar.gz/$_overlay_commit) sha256sums=('b6898a23844b656f1b68691c5c012036c2e694ac4b53a8918d4712ad876e7ea2' 'SKIP' - 'b21d354acd613a91cb88328753ec3aaeb174d6af042d89c5fcf3bbcced370751') + 'b21d354acd613a91cb88328753ec3aaeb174d6af042d89c5fcf3bbcced370751' + '025a16d88ae7b17c013ed23beb02b8545b44673d2b8ecca748e63a79d5c1070d') validpgpkeys=(33C235A34C46AA3FFB293709A328C3A2C3C45C06) # Jakub Jelinek <jakub@redhat.com> if [ -n "$_snapshot" ]; then - _basedir=gcc-$_snapshot + _basedir=gcc-$_snapshot else - _basedir=gcc-$pkgver + _basedir=gcc-$pkgver fi prepare() { - cd $_basedir + cd $_basedir - # link isl for in-tree builds - ln -s ../isl-$_islver isl + # link isl for in-tree builds + ln -s ../isl-$_islver isl - echo $pkgver > gcc/BASE-VER + echo $pkgver > gcc/BASE-VER - # hack! - some configure tests for header files using "$CPP $CPPFLAGS" - sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure + # hack! - some configure tests for header files using "$CPP $CPPFLAGS" + sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure + cp -r ../xtensa-overlays-$_overlay_commit/xtensa_esp32/gcc/* . - mkdir "$srcdir"/build-{gcc,gcc-nano} + mkdir "$srcdir"/build-{gcc,gcc-nano} } _build_gcc() { - "$srcdir"/$_basedir/configure \ - --target=$_target \ - --prefix=/usr \ - --with-sysroot=/usr/$_target \ - --with-native-system-header-dir=/include \ - --libexecdir=/usr/lib \ - --enable-languages=c,c++ \ - --enable-plugins \ - --disable-decimal-float \ - --disable-libffi \ - --disable-libgomp \ - --disable-libmudflap \ - --disable-libquadmath \ - --disable-libssp \ - --disable-libstdcxx-pch \ - --disable-nls \ - --disable-shared \ - --disable-threads \ - --disable-tls \ - --with-gnu-as \ - --with-gnu-ld \ - --with-system-zlib \ - --with-newlib \ - --with-headers=/usr/$_target/include \ - --with-python-dir=share/gcc-$_target \ - --with-gmp \ - --with-mpfr \ - --with-mpc \ - --with-isl \ - --with-libelf \ - --enable-gnu-indirect-function \ - --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' \ - --with-pkgversion='Arch Repository' \ - --with-bugurl='https://bugs.archlinux.org/' \ - --with-multilib-list=rmprofile - - make INHIBIT_LIBC_CFLAGS='-DUSE_TM_CLONE_REGISTRY=0' + "$srcdir"/$_basedir/configure \ + --target=$_target \ + --prefix=/usr \ + --with-sysroot=/usr/$_target \ + --with-native-system-header-dir=/include \ + --libexecdir=/usr/lib \ + --enable-languages=c,c++ \ + --enable-plugins \ + --disable-decimal-float \ + --disable-libffi \ + --disable-libgomp \ + --disable-libmudflap \ + --disable-libquadmath \ + --disable-libssp \ + --disable-libstdcxx-pch \ + --disable-nls \ + --disable-shared \ + --disable-threads \ + --disable-tls \ + --with-gnu-as \ + --with-gnu-ld \ + --with-system-zlib \ + --with-newlib \ + --with-headers=/usr/$_target/include \ + --with-python-dir=share/gcc-$_target \ + --with-gmp \ + --with-mpfr \ + --with-mpc \ + --with-isl \ + --with-libelf \ + --enable-gnu-indirect-function \ + --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' \ + --with-pkgversion='Arch Repository' \ + --with-bugurl='https://bugs.archlinux.org/' \ + --with-multilib-list=rmprofile + + make INHIBIT_LIBC_CFLAGS='-DUSE_TM_CLONE_REGISTRY=0' } build() { - cd "$srcdir"/build-gcc - export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections' - export CXXFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections' - _build_gcc - - # Build libstdc++ without exceptions support (the 'nano' variant) - cd "$srcdir"/build-gcc-nano - export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -fno-exceptions' - export CXXFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -fno-exceptions' - _build_gcc + cd "$srcdir"/build-gcc + export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections' + export CXXFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections' + _build_gcc + + # Build libstdc++ without exceptions support (the 'nano' variant) + cd "$srcdir"/build-gcc-nano + export CFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -fno-exceptions' + export CXXFLAGS_FOR_TARGET='-g -Os -ffunction-sections -fdata-sections -fno-exceptions' + _build_gcc } package() { - cd "$srcdir"/build-gcc - make DESTDIR="$pkgdir" install -j1 - - cd "$srcdir"/build-gcc-nano - make DESTDIR="$pkgdir.nano" install -j1 - # we need only libstdc nano files - multilibs=( $("$pkgdir"/usr/bin/$_target-gcc -print-multi-lib 2>/dev/null) ) - for multilib in "${multilibs[@]}"; do - dir="${multilib%%;*}" - from_dir="$pkgdir".nano/usr/$_target/lib/"$dir" - to_dir="$pkgdir"/usr/$_target/lib/"$dir" - cp -f "$from_dir"/libstdc++.a "$to_dir"/libstdc++_nano.a - cp -f "$from_dir"/libsupc++.a "$to_dir"/libsupc++_nano.a - done - - # strip target binaries - find "$pkgdir"/usr/lib/gcc/$_target/$pkgver "$pkgdir"/usr/$_target/lib -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/$pkgver -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 - rm "$pkgdir"/usr/lib/libcc1.* + cd "$srcdir"/build-gcc + make DESTDIR="$pkgdir" install -j1 + + cd "$srcdir"/build-gcc-nano + make DESTDIR="$pkgdir.nano" install -j1 + # we need only libstdc nano files + multilibs=( $("$pkgdir"/usr/bin/$_target-gcc -print-multi-lib 2>/dev/null) ) + for multilib in "${multilibs[@]}"; do + dir="${multilib%%;*}" + from_dir="$pkgdir".nano/usr/$_target/lib/"$dir" + to_dir="$pkgdir"/usr/$_target/lib/"$dir" + cp -f "$from_dir"/libstdc++.a "$to_dir"/libstdc++_nano.a + cp -f "$from_dir"/libsupc++.a "$to_dir"/libsupc++_nano.a + done + + # strip target binaries + find "$pkgdir"/usr/lib/gcc/$_target/$pkgver "$pkgdir"/usr/$_target/lib -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/$pkgver -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 + rm "$pkgdir"/usr/lib/libcc1.* } + +# vim: ts=2 sw=0 noet |