From 3007cd3f19f4081a8965091419716d94d203fc41 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Sat, 13 Mar 2021 07:19:13 +0100 Subject: community/gcc-cross-embedded-stage1: moved from testing --- community/gcc-cross-embedded-stage1/APKBUILD | 156 +++++++++++++++++++++++++++ testing/gcc-cross-embedded-stage1/APKBUILD | 156 --------------------------- 2 files changed, 156 insertions(+), 156 deletions(-) create mode 100644 community/gcc-cross-embedded-stage1/APKBUILD delete mode 100644 testing/gcc-cross-embedded-stage1/APKBUILD diff --git a/community/gcc-cross-embedded-stage1/APKBUILD b/community/gcc-cross-embedded-stage1/APKBUILD new file mode 100644 index 00000000000..d3e5ded0c47 --- /dev/null +++ b/community/gcc-cross-embedded-stage1/APKBUILD @@ -0,0 +1,156 @@ +# Maintainer: Marian Buschsieweke +# Based upon Alpine's avr-gcc and Arch Linux's arm-none-eabi-gcc, to which +# the following people contributed: +# Contributor: Pedro Filipe +# Contributor: Stefan Wagner +# Contributor: Anatol Pomozov +# Contributor: Martin Schmölzer +_pkgbase=gcc +_targets=" + arm-none-eabi + mips-mti-elf + msp430-elf + riscv-none-elf + aarch64-none-elf + " +# or1k-elf fails to build on 32-bit architectures +case "$CARCH" in + x86_64|aarch64|ppc64le|mips64) _targets="$_targets or1k-elf" +esac +pkgname=gcc-cross-embedded-stage1 +pkgver=10.2.0 +pkgrel=2 +pkgdesc="The GNU Compiler Collection for embedded targets" +url="http://gcc.gnu.org" +depends="gcc" +makedepends="bash linux-headers gmp-dev mpfr-dev mpc1-dev zlib-dev isl-dev" +arch="all" +license="GPL-3.0-or-later" +for target in $_targets; do + targetnorm="${target//-/_}" + subpackages="gcc-$target-stage1:$targetnorm $subpackages" + makedepends="$makedepends binutils-$target" +done + +source="https://mirrors.kernel.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz" +options="!check" + +builddir="$srcdir/gcc-$pkgver" + +prepare() { + default_prepare + + # hack! - some configure tests for header files using "$CPP $CPPFLAGS" + for dir in libiberty gcc; do + sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" $dir/configure + done +} + +_build_gcc() { + "$builddir"/configure \ + --target=$target \ + --prefix=/usr \ + --with-sysroot=/usr/$target \ + --with-native-system-header-dir=/include \ + --with-headers=/usr/$target/include \ + --with-python-dir=share/gcc-$target \ + --libexecdir=/usr/lib \ + --infodir=/deleteme/info \ + --htmldir=/deleteme/html \ + --pdfdir=/deleteme/pdf \ + --mandir=/deleteme/man \ + --enable-languages=c \ + --enable-plugins \ + --enable-gnu-indirect-function \ + --disable-decimal-float \ + --disable-libffi \ + --disable-libgomp \ + --disable-libmudflap \ + --disable-libquadmath \ + --disable-libssp \ + --disable-libstdcxx-pch \ + --disable-multilib \ + --disable-nls \ + --disable-shared \ + --disable-threads \ + --disable-tls \ + --disable-werror \ + --with-gmp \ + --with-gnu-as \ + --with-gnu-ld \ + --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' \ + --with-isl \ + --with-libelf \ + --with-mpc \ + --with-mpfr \ + --with-newlib \ + --with-system-zlib \ + --with-pkgversion='Alpine Linux' \ + --without-headers + make INHIBIT_LIBC_CFLAGS='-DUSE_TM_CLONE_REGISTRY=0' -j8 +} + +build() { + for target in $_targets; do + workingdir="$srcdir/build-$target" + mkdir "$workingdir" + cd "$workingdir" + export CFLAGS_FOR_TARGET='-pipe -Os -ffunction-sections -fdata-sections' + export CXXFLAGS_FOR_TARGET='-pipe -Os -ffunction-sections -fdata-sections' + _build_gcc + done +} + +package() { + for target in $_targets; do + depends="$depends $_pkgbase-$target" + done + mkdir -p "$pkgdir" +} + +_install_subpkg() { + target="${subpkgname#$_pkgbase-}" + target="${target%-stage1}" + pkgdesc="The GNU Compiler Collection for $target targets" + depends="$depends binutils-$target" + workingdir="$srcdir/build-$target" + cd "$workingdir" + make install DESTDIR="$subpkgdir" -j1 + + # Delete documentation. (The user can use the host GCC doc instead) + rm -rf "$subpkgdir"/deleteme + # Delete libcc1.so*, which is already part of the host's gcc + rm -f "$subpkgdir"/usr/lib/libcc1.so* + + # Strip libs using target binutils + find "$subpkgdir"/usr/lib -type f -name "*.a" -exec /usr/bin/$target-strip --strip-debug '{}' \; + + # Strip executables using host binutils + find "$subpkgdir"/usr/bin -type f -executable -exec strip '{}' \; +} + +arm_none_eabi() { + _install_subpkg +} + +mips_mti_elf() { + _install_subpkg +} + +msp430_elf() { + _install_subpkg +} + +or1k_elf() { + _install_subpkg +} + +riscv_none_elf() { + _install_subpkg +} + +aarch64_none_elf() { + _install_subpkg +} + +sha512sums="42ae38928bd2e8183af445da34220964eb690b675b1892bbeb7cd5bb62be499011ec9a93397dba5e2fb681afadfc6f2767d03b9035b44ba9be807187ae6dc65e gcc-10.2.0.tar.xz" diff --git a/testing/gcc-cross-embedded-stage1/APKBUILD b/testing/gcc-cross-embedded-stage1/APKBUILD deleted file mode 100644 index d3e5ded0c47..00000000000 --- a/testing/gcc-cross-embedded-stage1/APKBUILD +++ /dev/null @@ -1,156 +0,0 @@ -# Maintainer: Marian Buschsieweke -# Based upon Alpine's avr-gcc and Arch Linux's arm-none-eabi-gcc, to which -# the following people contributed: -# Contributor: Pedro Filipe -# Contributor: Stefan Wagner -# Contributor: Anatol Pomozov -# Contributor: Martin Schmölzer -_pkgbase=gcc -_targets=" - arm-none-eabi - mips-mti-elf - msp430-elf - riscv-none-elf - aarch64-none-elf - " -# or1k-elf fails to build on 32-bit architectures -case "$CARCH" in - x86_64|aarch64|ppc64le|mips64) _targets="$_targets or1k-elf" -esac -pkgname=gcc-cross-embedded-stage1 -pkgver=10.2.0 -pkgrel=2 -pkgdesc="The GNU Compiler Collection for embedded targets" -url="http://gcc.gnu.org" -depends="gcc" -makedepends="bash linux-headers gmp-dev mpfr-dev mpc1-dev zlib-dev isl-dev" -arch="all" -license="GPL-3.0-or-later" -for target in $_targets; do - targetnorm="${target//-/_}" - subpackages="gcc-$target-stage1:$targetnorm $subpackages" - makedepends="$makedepends binutils-$target" -done - -source="https://mirrors.kernel.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz" -options="!check" - -builddir="$srcdir/gcc-$pkgver" - -prepare() { - default_prepare - - # hack! - some configure tests for header files using "$CPP $CPPFLAGS" - for dir in libiberty gcc; do - sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" $dir/configure - done -} - -_build_gcc() { - "$builddir"/configure \ - --target=$target \ - --prefix=/usr \ - --with-sysroot=/usr/$target \ - --with-native-system-header-dir=/include \ - --with-headers=/usr/$target/include \ - --with-python-dir=share/gcc-$target \ - --libexecdir=/usr/lib \ - --infodir=/deleteme/info \ - --htmldir=/deleteme/html \ - --pdfdir=/deleteme/pdf \ - --mandir=/deleteme/man \ - --enable-languages=c \ - --enable-plugins \ - --enable-gnu-indirect-function \ - --disable-decimal-float \ - --disable-libffi \ - --disable-libgomp \ - --disable-libmudflap \ - --disable-libquadmath \ - --disable-libssp \ - --disable-libstdcxx-pch \ - --disable-multilib \ - --disable-nls \ - --disable-shared \ - --disable-threads \ - --disable-tls \ - --disable-werror \ - --with-gmp \ - --with-gnu-as \ - --with-gnu-ld \ - --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' \ - --with-isl \ - --with-libelf \ - --with-mpc \ - --with-mpfr \ - --with-newlib \ - --with-system-zlib \ - --with-pkgversion='Alpine Linux' \ - --without-headers - make INHIBIT_LIBC_CFLAGS='-DUSE_TM_CLONE_REGISTRY=0' -j8 -} - -build() { - for target in $_targets; do - workingdir="$srcdir/build-$target" - mkdir "$workingdir" - cd "$workingdir" - export CFLAGS_FOR_TARGET='-pipe -Os -ffunction-sections -fdata-sections' - export CXXFLAGS_FOR_TARGET='-pipe -Os -ffunction-sections -fdata-sections' - _build_gcc - done -} - -package() { - for target in $_targets; do - depends="$depends $_pkgbase-$target" - done - mkdir -p "$pkgdir" -} - -_install_subpkg() { - target="${subpkgname#$_pkgbase-}" - target="${target%-stage1}" - pkgdesc="The GNU Compiler Collection for $target targets" - depends="$depends binutils-$target" - workingdir="$srcdir/build-$target" - cd "$workingdir" - make install DESTDIR="$subpkgdir" -j1 - - # Delete documentation. (The user can use the host GCC doc instead) - rm -rf "$subpkgdir"/deleteme - # Delete libcc1.so*, which is already part of the host's gcc - rm -f "$subpkgdir"/usr/lib/libcc1.so* - - # Strip libs using target binutils - find "$subpkgdir"/usr/lib -type f -name "*.a" -exec /usr/bin/$target-strip --strip-debug '{}' \; - - # Strip executables using host binutils - find "$subpkgdir"/usr/bin -type f -executable -exec strip '{}' \; -} - -arm_none_eabi() { - _install_subpkg -} - -mips_mti_elf() { - _install_subpkg -} - -msp430_elf() { - _install_subpkg -} - -or1k_elf() { - _install_subpkg -} - -riscv_none_elf() { - _install_subpkg -} - -aarch64_none_elf() { - _install_subpkg -} - -sha512sums="42ae38928bd2e8183af445da34220964eb690b675b1892bbeb7cd5bb62be499011ec9a93397dba5e2fb681afadfc6f2767d03b9035b44ba9be807187ae6dc65e gcc-10.2.0.tar.xz" -- cgit v1.2.3