Date: Sunday, August 21, 2022 @ 01:10:43 Author: anatolik Revision: 1271493
archrelease: copy trunk to community-x86_64 Added: arm-none-eabi-gcc/repos/community-x86_64/PKGBUILD (from rev 1271492, arm-none-eabi-gcc/trunk/PKGBUILD) arm-none-eabi-gcc/repos/community-x86_64/keys/ Deleted: arm-none-eabi-gcc/repos/community-x86_64/PKGBUILD ----------+ PKGBUILD | 248 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 124 insertions(+), 124 deletions(-) Deleted: PKGBUILD =================================================================== --- PKGBUILD 2022-08-21 01:10:17 UTC (rev 1271492) +++ PKGBUILD 2022-08-21 01:10:43 UTC (rev 1271493) @@ -1,124 +0,0 @@ -# Maintainer: Anatol Pomozov <anatol.pomo...@gmail.com> -# Contributor: Martin Schmölzer <mschmoel...@gmail.com> - -_target=arm-none-eabi -pkgname=$_target-gcc -pkgver=12.1.0 -pkgrel=1 -#_snapshot=8-20180427 -pkgdesc='The GNU Compiler Collection - cross compiler for ARM EABI (bare-metal) target' -arch=(x86_64) -url='https://gcc.gnu.org/' -license=(GPL LGPL FDL) -depends=($_target-binutils zlib libmpc libisl zstd) -makedepends=(gmp mpfr $_target-newlib) -optdepends=('arm-none-eabi-newlib: Standard C library optimized for embedded systems') -options=(!emptydirs !strip !lto) -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 -sha256sums=('62fd634889f31c02b64af2c468f064b47ad1ca78411c45abe6ac4b5f8dd19c7b' - 'SKIP') -validpgpkeys=(33C235A34C46AA3FFB293709A328C3A2C3C45C06 # Jakub Jelinek <ja...@redhat.com> - D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62 # Jakub Jelinek <ja...@redhat.com> - 13975A70E63C361C73AE69EF6EEB81F8981C74C7) # Richard Guenther <richard.guent...@gmail.com> - -if [ -n "$_snapshot" ]; then - _basedir=gcc-$_snapshot -else - _basedir=gcc-$pkgver -fi - -prepare() { - cd $_basedir - - echo $pkgver > gcc/BASE-VER - - 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-arm-none-eabi \ - --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() { - # Credits @allanmcrae - # https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/gcc/PKGBUILD - # TODO: properly deal with the build issues resulting from this - CFLAGS=${CFLAGS/-Werror=format-security/} - CXXFLAGS=${CXXFLAGS/-Werror=format-security/} - - 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.* -} Copied: arm-none-eabi-gcc/repos/community-x86_64/PKGBUILD (from rev 1271492, arm-none-eabi-gcc/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2022-08-21 01:10:43 UTC (rev 1271493) @@ -0,0 +1,124 @@ +# Maintainer: Anatol Pomozov <anatol.pomo...@gmail.com> +# Contributor: Martin Schmölzer <mschmoel...@gmail.com> + +_target=arm-none-eabi +pkgname=$_target-gcc +pkgver=12.2.0 +pkgrel=1 +#_snapshot=8-20180427 +pkgdesc='The GNU Compiler Collection - cross compiler for ARM EABI (bare-metal) target' +arch=(x86_64) +url='https://gcc.gnu.org/' +license=(GPL LGPL FDL) +depends=($_target-binutils zlib libmpc libisl zstd) +makedepends=(gmp mpfr $_target-newlib) +optdepends=('arm-none-eabi-newlib: Standard C library optimized for embedded systems') +options=(!emptydirs !strip !lto) +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 +sha256sums=('e549cf9cf3594a00e27b6589d4322d70e0720cdd213f39beb4181e06926230ff' + 'SKIP') +validpgpkeys=(33C235A34C46AA3FFB293709A328C3A2C3C45C06 # Jakub Jelinek <ja...@redhat.com> + D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62 # Jakub Jelinek <ja...@redhat.com> + 13975A70E63C361C73AE69EF6EEB81F8981C74C7) # Richard Guenther <richard.guent...@gmail.com> + +if [ -n "$_snapshot" ]; then + _basedir=gcc-$_snapshot +else + _basedir=gcc-$pkgver +fi + +prepare() { + cd $_basedir + + echo $pkgver > gcc/BASE-VER + + 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-arm-none-eabi \ + --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() { + # Credits @allanmcrae + # https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/gcc/PKGBUILD + # TODO: properly deal with the build issues resulting from this + CFLAGS=${CFLAGS/-Werror=format-security/} + CXXFLAGS=${CXXFLAGS/-Werror=format-security/} + + 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.* +}