# Automatically generated aport, do not edit! # Generator: pmbootstrap aportgen gcc-armv7 # Based on: main/gcc (from Alpine) CTARGET_ARCH=armv7 CTARGET="$(arch_to_hostspec ${CTARGET_ARCH})" LANG_D=false LANG_OBJC=false LANG_JAVA=false LANG_GO=false LANG_FORTRAN=false LANG_ADA=false options="!strip !tracedeps" # abuild doesn't try to tries to install "build-base-$CTARGET_ARCH" # when this variable matches "no*" BOOTSTRAP="nobuildbase" # abuild will only cross compile when this variable is set, but it # needs to find a valid package database in there for dependency # resolving, so we set it to /. CBUILDROOT="/" _cross_configure="--disable-bootstrap --with-sysroot=/usr/$CTARGET" pkgname=gcc-armv7 _pkgbase=11.2.1 pkgver=11.2.1_git20220106 [ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2" [ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross="" [ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target="" pkgname=gcc-armv7 pkgrel=0 pkgdesc="Stage2 cross-compiler for armv7" url="https://gcc.gnu.org" arch="x86_64" license="GPL-2.0-or-later LGPL-2.1-or-later" _gccrel=$pkgver-r$pkgrel depends="isl binutils-armv7 mpc1" makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev" makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-armv7 binutils-armv7" subpackages="g++-armv7:gpp" [ "$CHOST" = "$CTARGET" ] && subpackages="gcc-doc$_target" replaces="libstdc++ binutils" : "${LANG_CXX:=true}" : "${LANG_D:=true}" : "${LANG_OBJC:=true}" : "${LANG_GO:=true}" : "${LANG_FORTRAN:=true}" : "${LANG_ADA:=true}" : "${LANG_JIT:=true}" _libgomp=true _libgcc=true _libatomic=true _libitm=true if [ "$CHOST" != "$CTARGET" ]; then if [ "$BOOTSTRAP" = nolibc ]; then LANG_CXX=false LANG_ADA=false _libgcc=false _builddir="$srcdir/build-cross-pass2" else _builddir="$srcdir/build-cross-final" fi LANG_OBJC=false LANG_GO=false LANG_FORTRAN=false LANG_D=false LANG_JIT=false _libgomp=false _libatomic=false _libitm=false # reset target flags (should be set in crosscreate abuild) # fixup flags. seems gcc treats CPPFLAGS as global without # _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS. export CFLAGS="$CPPFLAGS $CFLAGS" export CXXFLAGS="$CPPFLAGS $CXXFLAGS" unset CPPFLAGS export CFLAGS_FOR_TARGET=" " export CXXFLAGS_FOR_TARGET=" " export LDFLAGS_FOR_TARGET=" " STRIP_FOR_TARGET="$CTARGET-strip" elif [ "$CBUILD" != "$CHOST" ]; then # fixup flags. seems gcc treats CPPFLAGS as global without # _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS. export CFLAGS="$CPPFLAGS $CFLAGS" export CXXFLAGS="$CPPFLAGS $CXXFLAGS" unset CPPFLAGS # reset flags and cc for build export CC_FOR_BUILD="gcc" export CXX_FOR_BUILD="g++" export CFLAGS_FOR_BUILD=" " export CXXFLAGS_FOR_BUILD=" " export LDFLAGS_FOR_BUILD=" " export CFLAGS_FOR_TARGET=" " export CXXFLAGS_FOR_TARGET=" " export LDFLAGS_FOR_TARGET=" " # Languages that do not need bootstrapping LANG_OBJC=false LANG_GO=false LANG_FORTRAN=false LANG_D=false LANG_JIT=false STRIP_FOR_TARGET=${CROSS_COMPILE}strip _builddir="$srcdir/build-cross-native" else STRIP_FOR_TARGET=${CROSS_COMPILE}strip _builddir="$srcdir/build" fi # GDC hasn't been ported to PowerPC # See libphobos/configure.tgt in GCC sources for supported targets # riscv fails with: error: static assert "unimplemented" case "$CARCH" in ppc64le|riscv64) LANG_D=false ;; esac # libitm has TEXTRELs in ARM build, so disable for now case "$CTARGET_ARCH" in arm*) _libitm=false ;; mips*) _libitm=false ;; riscv64) _libitm=false ;; esac # Internal libffi fails to build on MIPS at the moment, need to # investigate further. We disable LANG_GO on mips64 as it requires # the internal libffi. case "$CTARGET_ARCH" in mips*) LANG_GO=false ;; esac # Fortran uses libquadmath if toolchain has __float128 # currently on x86, x86_64 and ia64 _libquadmath=$LANG_FORTRAN case "$CTARGET_ARCH" in x86 | x86_64) _libquadmath=$LANG_FORTRAN ;; *) _libquadmath=false ;; esac # libatomic is a dependency for openvswitch $_libatomic && subpackages="$subpackages libatomic::$CTARGET_ARCH" $_libgcc && subpackages="$subpackages libgcc::$CTARGET_ARCH" $_libquadmath && subpackages="$subpackages libquadmath::$CTARGET_ARCH" if $_libgomp; then depends="$depends libgomp=$_gccrel" subpackages="$subpackages libgomp::$CTARGET_ARCH" fi case "$CARCH" in riscv64) LANG_ADA=false;; esac _languages=c if $LANG_CXX; then _languages="$_languages,c++" fi if $LANG_D; then subpackages="$subpackages libgphobos::$CTARGET_ARCH gcc-gdc$_target:gdc" _languages="$_languages,d" makedepends_build="$makedepends_build libucontext-dev" fi if $LANG_OBJC; then subpackages="$subpackages libobjc::$CTARGET_ARCH gcc-objc$_target:objc" _languages="$_languages,objc" fi if $LANG_GO; then subpackages="$subpackages libgo::$CTARGET_ARCH gcc-go$_target:go" _languages="$_languages,go" fi if $LANG_FORTRAN; then subpackages="$subpackages libgfortran::$CTARGET_ARCH gfortran$_target:gfortran" _languages="$_languages,fortran" fi if $LANG_ADA; then subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH gcc-gnat$_target:gnat" _languages="$_languages,ada" [ "$CBUILD" = "$CTARGET" ] && makedepends_build="$makedepends_build gcc-gnat-bootstrap" [ "$CBUILD" != "$CTARGET" ] && makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross" fi if $LANG_JIT; then subpackages="$subpackages libgccjit:jit libgccjit-dev:jitdev" _languages="$_languages,jit" fi makedepends="$makedepends_build $makedepends_host" # when using upstream releases, use this URI template # https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz # # right now, we are using a git snapshot. # # PLEASE submit all patches to gcc to https://gitlab.alpinelinux.org/kaniini/alpine-gcc-patches, # so that they can be properly tracked and easily rebased if needed. source="https://dev.alpinelinux.org/~nenolod/gcc-${pkgver}.tar.xz 0001-posix_memalign.patch 0002-gcc-poison-system-directories.patch 0003-specs-turn-on-Wl-z-now-by-default.patch 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch 0006-Enable-Wformat-and-Wformat-security-by-default.patch 0007-Enable-Wtrampolines-by-default.patch 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch 0011-libiberty-copy-PIC-objects-during-build-process.patch 0012-libitm-disable-FORTIFY.patch 0013-libgcc_s.patch 0014-nopie.patch 0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch 0016-dlang-update-zlib-binding.patch 0017-dlang-use-libucontext-on-mips64.patch 0018-dlang-libdruntime-define-fcntl.h-constants-for-mips6.patch 0019-ada-fix-shared-linking.patch 0020-build-fix-CXXFLAGS_FOR_BUILD-passing.patch 0021-add-fortify-headers-paths.patch 0022-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch 0023-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch 0024-mips64-disable-multilib-support.patch 0025-aarch64-disable-multilib-support.patch 0026-s390x-disable-multilib-support.patch 0027-ppc64-le-disable-multilib-support.patch 0028-x86_64-disable-multilib-support.patch 0029-riscv-disable-multilib-support.patch 0030-always-build-libgcc_eh.a.patch 0031-ada-libgnarl-compatibility-for-musl.patch 0032-ada-musl-support-fixes.patch 0033-gcc-go-Fix-handling-of-signal-34-on-musl.patch 0034-There-are-more-than-one-st_-a-m-c-tim-fields-in-stru.patch 0035-gcc-go-signal-34-is-special-on-musl-libc.patch 0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch 0037-gcc-go-link-to-libucontext.patch 0038-Use-generic-errstr.go-implementation-on-musl.patch 0039-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch 0040-configure-fix-detection-of-atomic-builtins-in-libato.patch 0041-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch 0042-Fix-attempt-to-use-poisoned-calloc-error-in-libgccji.patch 0043-stddef.h-add-support-for-musl-typedef-macro-guards.patch 0044-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch 0045-Disable-fsplit-stack-support-on-non-glibc-targets.patch 0046-libgo-include-asm-ptrace.h-for-pt_regs-definition-on.patch " # we build out-of-tree _gccdir="$srcdir"/gcc-$pkgver _gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}" _gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}" prepare() { cd "$_gccdir" _err= for i in $source; do case "$i" in *.patch) msg "Applying $i" patch -p1 -i "$srcdir"/$i || _err="$_err $i" ;; esac done if [ -n "$_err" ]; then error "The following patches failed:" for i in $_err; do echo " $i" done return 1 fi echo ${_pkgbase:-$pkgver} > gcc/BASE-VER } build() { local _arch_configure= local _libc_configure= local _bootstrap_configure= local _symvers= local _jit_configure= cd "$_gccdir" case "$CTARGET" in aarch64-*-*-*) _arch_configure="--with-arch=armv8-a --with-abi=lp64";; armv5-*-*-*eabi) _arch_configure="--with-arch=armv5te --with-tune=arm926ej-s --with-float=soft --with-abi=aapcs-linux";; armv6-*-*-*eabihf) _arch_configure="--with-arch=armv6zk --with-tune=arm1176jzf-s --with-fpu=vfp --with-float=hard --with-abi=aapcs-linux";; armv7-*-*-*eabihf) _arch_configure="--with-arch=armv7-a --with-tune=generic-armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-abi=aapcs-linux --with-mode=thumb";; mips-*-*-*) _arch_configure="--with-arch=mips32 --with-mips-plt --with-float=soft --with-abi=32";; mips64-*-*-*) _arch_configure="--with-arch=mips3 --with-tune=mips64 --with-mips-plt --with-float=soft --with-abi=64";; mips64el-*-*-*) _arch_configure="--with-arch=mips3 --with-tune=mips64 --with-mips-plt --with-float=soft --with-abi=64";; mipsel-*-*-*) _arch_configure="--with-arch=mips32 --with-mips-plt --with-float=soft --with-abi=32";; powerpc-*-*-*) _arch_configure="--enable-secureplt --enable-decimal-float=no";; powerpc64*-*-*-*) _arch_configure="--with-abi=elfv2 --enable-secureplt --enable-decimal-float=no --enable-targets=powerpcle-linux";; i486-*-*-*) _arch_configure="--with-arch=i486 --with-tune=generic --enable-cld";; i586-*-*-*) _arch_configure="--with-arch=i586 --with-tune=generic --enable-cld";; s390x-*-*-*) _arch_configure="--with-arch=z196 --with-tune=zEC12 --with-zarch --with-long-double-128 --enable-decimal-float";; riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";; esac case "$CTARGET_ARCH" in mips*) _hash_style_configure="--with-linker-hash-style=sysv" ;; *) _hash_style_configure="--with-linker-hash-style=gnu" ;; esac case "$CTARGET_LIBC" in musl) # musl does not support mudflap, or libsanitizer # libmpx uses secure_getenv and struct _libc_fpstate not present in musl # alpine musl provides libssp_nonshared.a, so we don't need libssp either _libc_configure="--disable-libssp --disable-libmpx --disable-libmudflap --disable-libsanitizer" _symvers="--disable-symvers" export libat_cv_have_ifunc=no ;; esac case "$BOOTSTRAP" in nolibc) _bootstrap_configure="--with-newlib --disable-shared --enable-threads=no" ;; *) _bootstrap_configure="--enable-shared --enable-threads --enable-tls" ;; esac $LANG_JIT && _jit_configure="--enable-host-shared" $_libgomp || _bootstrap_configure="$_bootstrap_configure --disable-libgomp" $_libatomic || _bootstrap_configure="$_bootstrap_configure --disable-libatomic" $_libitm || _bootstrap_configure="$_bootstrap_configure --disable-libitm" $_libquadmath || _arch_configure="$_arch_configure --disable-libquadmath" msg "Building the following:" echo "" echo " CBUILD=$CBUILD" echo " CHOST=$CHOST" echo " CTARGET=$CTARGET" echo " CTARGET_ARCH=$CTARGET_ARCH" echo " CTARGET_LIBC=$CTARGET_LIBC" echo " languages=$_languages" echo " arch_configure=$_arch_configure" echo " libc_configure=$_libc_configure" echo " cross_configure=$_cross_configure" echo " bootstrap_configure=$_bootstrap_configure" echo " hash_style_configure=$_hash_style_configure" echo "" export CFLAGS="$CFLAGS -O2" mkdir -p "$_builddir" cd "$_builddir" "$_gccdir"/configure --prefix=/usr \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --build=${CBUILD} \ --host=${CHOST} \ --target=${CTARGET} \ --with-pkgversion="Alpine $pkgver" \ --enable-checking=release \ --disable-fixed-point \ --disable-libstdcxx-pch \ --disable-multilib \ --disable-nls \ --disable-werror \ $_symvers \ --enable-__cxa_atexit \ --enable-default-pie \ --enable-default-ssp \ --enable-cloog-backend \ --enable-languages=$_languages \ $_arch_configure \ $_libc_configure \ $_cross_configure \ $_bootstrap_configure \ $_jit_configure \ --with-system-zlib \ $_hash_style_configure make } package() { cd "$_builddir" make -j1 DESTDIR="$pkgdir" install ln -s gcc "$pkgdir"/usr/bin/cc # we dont support gcj -static # and saving 35MB is not bad. find "$pkgdir" \( -name libgtkpeer.a \ -o -name libgjsmalsa.a \ -o -name libgij.a \) \ -delete # strip debug info from some static libs find "$pkgdir" \( -name libgfortran.a -o -name libobjc.a -o -name libgomp.a \ -o -name libgphobos.a -o -name libgdruntime.a \ -o -name libmudflap.a -o -name libmudflapth.a \ -o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a \ -o -name libitm.a -o -name libgo.a -o -name libcaf\*.a \ -o -name libatomic.a -o -name libasan.a -o -name libtsan.a \) \ -a -type f \ -exec ${STRIP_FOR_TARGET} -g {} + if $_libgomp; then mv "$pkgdir"/usr/lib/libgomp.spec "$pkgdir"/$_gcclibdir fi if $_libitm; then mv "$pkgdir"/usr/lib/libitm.spec "$pkgdir"/$_gcclibdir fi # remove ffi rm -f "$pkgdir"/usr/lib/libffi* "$pkgdir"/usr/share/man/man3/ffi* find "$pkgdir" -name 'ffi*.h' -delete local gdblib=${_target:+$CTARGET/}lib if [ -d "$pkgdir"/usr/$gdblib/ ]; then for i in $(find "$pkgdir"/usr/$gdblib/ -type f -maxdepth 1 -name "*-gdb.py"); do mkdir -p "$pkgdir"/usr/share/gdb/python/auto-load/usr/$gdblib mv "$i" "$pkgdir"/usr/share/gdb/python/auto-load/usr/$gdblib/ done fi # move ada runtime libs if $LANG_ADA; then for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.so"); do mv "$i" "$pkgdir"/usr/lib/ ln -s ../../../../${i##*/} $i done for i in $(find "$pkgdir"/$_gcclibdir/adalib/ -type f -maxdepth 1 -name "libgna*.a"); do mv "$i" "$pkgdir"/usr/lib/ ln -s ../../../../${i##*/} $i done fi if [ "$CHOST" != "$CTARGET" ]; then # cross-gcc: remove any files that would conflict with the # native gcc package rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share # libcc1 does not depend on target, don't ship it rm -rf "$pkgdir"/usr/lib/libcc1.so* # fixup gcc library symlinks to be linker scripts so # linker finds the libs from relocated sysroot for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do if [ -h "$so" ]; then local _real=$(basename "$(readlink "$so")") rm -f "$so" echo "GROUP ($_real)" > "$so" fi done else # add c89/c99 wrapper scripts cat >"$pkgdir"/usr/bin/c89 <<'EOF' #!/bin/sh _flavor="-std=c89" for opt; do case "$opt" in -ansi|-std=c89|-std=iso9899:1990) _flavor="";; -std=*) echo "$(basename $0) called with non ANSI/ISO C option $opt" >&2 exit 1;; esac done exec gcc $_flavor ${1+"$@"} EOF cat >"$pkgdir"/usr/bin/c99 <<'EOF' #!/bin/sh _flavor="-std=c99" for opt; do case "$opt" in -std=c99|-std=iso9899:1999) _flavor="";; -std=*) echo "$(basename $0) called with non ISO C99 option $opt" >&2 exit 1;; esac done exec gcc $_flavor ${1+"$@"} EOF chmod 755 "$pkgdir"/usr/bin/c?9 # install lto plugin so regular binutils may use it mkdir -p "$pkgdir"/usr/lib/bfd-plugins ln -s /$_gcclibexec/liblto_plugin.so "$pkgdir/usr/lib/bfd-plugins/" fi } libatomic() { pkgdesc="GCC Atomic library" depends= replaces="gcc" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/ } libcxx() { pkgdesc="GNU C++ standard runtime library" depends= if [ "$CHOST" = "$CTARGET" ]; then # verify that we are using clock_gettime rather than doing direct syscalls # so we dont break 32 bit arches due to time64. nm -D "$pkgdir"/usr/lib/libstdc++.so.* | grep clock_gettime fi mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/ } gpp() { pkgdesc="GNU C++ standard library and compiler" depends="libstdc++=$_gccrel gcc=$_gccrel libc-dev" mkdir -p "$subpkgdir/$_gcclibexec" \ "$subpkgdir"/usr/bin \ "$subpkgdir"/usr/${_target:+$CTARGET/}include \ "$subpkgdir"/usr/${_target:+$CTARGET/}lib \ mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/" mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/*++* "$subpkgdir"/usr/${_target:+$CTARGET/}lib/ mv "$pkgdir"/usr/${_target:+$CTARGET/}include/c++ "$subpkgdir"/usr/${_target:+$CTARGET/}include/ mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/ } jit() { pkgdesc="GCC JIT Library" depends= amove usr/lib/libgccjit.so* } jitdev() { pkgdesc="GCC JIT Library (development files)" depends="libgccjit" amove usr/include/libgccjit*.h } libobjc() { pkgdesc="GNU Objective-C runtime" replaces="objc" depends= mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/ } objc() { pkgdesc="GNU Objective-C" replaces="gcc" depends="libc-dev gcc=$_gccrel libobjc=$_gccrel" mkdir -p "$subpkgdir/$_gcclibexec" \ "$subpkgdir"/$_gcclibdir/include \ "$subpkgdir"/usr/lib mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/" mv "$pkgdir"/$_gcclibdir/include/objc "$subpkgdir"/$_gcclibdir/include/ mv "$pkgdir"/usr/lib/libobjc.so "$pkgdir"/usr/lib/libobjc.a \ "$subpkgdir"/usr/lib/ } libgcc() { pkgdesc="GNU C compiler runtime libraries" depends= mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/ } libgomp() { pkgdesc="GCC shared-memory parallel programming API library" depends= replaces="gcc" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/ } libgphobos() { pkgdesc="D programming language standard library for GCC" depends= mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libgdruntime.so.* "$subpkgdir"/usr/lib/ mv "$pkgdir"/usr/lib/libgphobos.so.* "$subpkgdir"/usr/lib/ } gdc() { pkgdesc="GCC-based D language compiler" depends="gcc=$_gccrel libgphobos=$_gccrel musl-dev" depends="$depends libucontext-dev" mkdir -p "$subpkgdir/$_gcclibexec" \ "$subpkgdir"/$_gcclibdir/include/d/ \ "$subpkgdir"/usr/lib \ "$subpkgdir"/usr/bin # Copy: The installed '.d' files, the static lib, the binary itself # The shared libs are part of 'libgphobos' so one can run program # without installing the compiler mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/" mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/ mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/ mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/ mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/ mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/ mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/ } libgo() { pkgdesc="Go runtime library for GCC" depends= mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/ } go() { pkgdesc="Go support for GCC" depends="gcc=$_gccrel libgo=$_gccrel !go" mkdir -p "$subpkgdir"/$_gcclibexec \ "$subpkgdir"/usr/lib \ "$subpkgdir"/usr/bin mv "$pkgdir"/usr/lib/go "$subpkgdir"/usr/lib/ mv "$pkgdir"/usr/bin/*gccgo "$subpkgdir"/usr/bin/ mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/ mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/ mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/ mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/ mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/ mv "$pkgdir"/usr/lib/libgo.a \ "$pkgdir"/usr/lib/libgo.so \ "$pkgdir"/usr/lib/libgobegin.a \ "$pkgdir"/usr/lib/libgolibbegin.a \ "$subpkgdir"/usr/lib/ } libgfortran() { pkgdesc="Fortran runtime library for GCC" depends= mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/ } libquadmath() { replaces="gcc" pkgdesc="128-bit math library for GCC" depends= mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/ } gfortran() { pkgdesc="GNU Fortran Compiler" depends="gcc=$_gccrel libgfortran=$_gccrel" $_libquadmath && depends="$depends libquadmath=$_gccrel" replaces="gcc" mkdir -p "$subpkgdir"/$_gcclibexec \ "$subpkgdir"/$_gcclibdir \ "$subpkgdir"/usr/lib \ "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/*gfortran "$subpkgdir"/usr/bin/ mv "$pkgdir"/usr/lib/libgfortran.a \ "$pkgdir"/usr/lib/libgfortran.so \ "$subpkgdir"/usr/lib/ if $_libquadmath; then mv "$pkgdir"/usr/lib/libquadmath.a \ "$pkgdir"/usr/lib/libquadmath.so \ "$subpkgdir"/usr/lib/ fi mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/ mv "$pkgdir"/$_gcclibexec/f951 "$subpkgdir"/$_gcclibexec mv "$pkgdir"/usr/lib/libgfortran.spec "$subpkgdir"/$_gcclibdir } libgnat() { pkgdesc="GNU Ada runtime shared libraries" depends= mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/ } libgnatstatic() { pkgdesc="GNU Ada static libraries" depends= mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/ } gnat() { pkgdesc="Ada support for GCC" depends="gcc=$_gccrel" provides="$pkgname-gnat-bootstrap" [ "$CHOST" = "$CTARGET" ] && depends="$depends libgnat=$_gccrel" mkdir -p "$subpkgdir"/$_gcclibexec \ "$subpkgdir"/$_gcclibdir \ "$subpkgdir"/usr/bin mv "$pkgdir"/$_gcclibexec/*gnat* "$subpkgdir"/$_gcclibexec/ mv "$pkgdir"/$_gcclibdir/*ada* "$subpkgdir"/$_gcclibdir/ mv "$pkgdir"/usr/bin/*gnat* "$subpkgdir"/usr/bin/ } sha512sums=" f0f073a05ec9bf93e4d85707282f0b75b8e783f86c16b5ed118444e7b362be2122a10233baa822efcb52c7bc353c6ca06951db0e93c030372275baa922939c3f gcc-11.2.1_git20220106.tar.xz c81a5ddd7699320129813529c12afb81744491a2df32922ee9816413d5fcb2857abf7641381ecb5e5748ac8335ab8e2ac27e7c56262e82c42f57adbb655328a1 0001-posix_memalign.patch 3adf23e255343ef1ead10b0312f506e722aab6218b35b1f92a855b3e5a1e63cddb45fb568f19d2e2443e1dad647f6d9429830004b45371a07e7098d430e1cecf 0002-gcc-poison-system-directories.patch f1de78496e0caeefe7441be04a8c78e83fada8adcdaa4abda607b7b83ca51ecb6f3cdbb9290c38a3fefe32f7980c47779687726ad9f557471978313eea1f99d3 0003-specs-turn-on-Wl-z-now-by-default.patch 3959ebad795264ddd00640a2ff7ce511d69adc5683e25760d4741fbc99f56a7243545ccfce29578a3790138afa1e6ea6b232faf39f7904a17d7f3aeaa8080b61 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch 4cabe468a1b138fed597d6bb946200da77e127022032fb5adb0955d64c6aad34ed1861aee11563b6555bd9d48721ac762b4a1e5c1d604274146ce8f989beee24 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch a686ac11781236bfbc793e124fe842a1c4311884b9aec39e79673ef6d65fc8f36aacdbe6410b9a80ca9245a3bc49ee71babd1ffcde1b816cb385ff771175fd7c 0006-Enable-Wformat-and-Wformat-security-by-default.patch 83b2d4dcad924cbddc8d8a2569d6e5ca59b63b8b5a30fef176acac48622eaf8237ba649f55bc23327456508df3d3a1f2aad20536eb151d831c6b1cfeb3b33f76 0007-Enable-Wtrampolines-by-default.patch 69ba40c718458f466f43e7f4450c1c774f27a7ac36bb794ee653e7aabc2f21de7596a5d410efbe093ff1416951c547fa73b92980677b04fa7f371390281109f6 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch 2adef312e5b89764176451b3d184f85f309f8f8bfadc1ed7a3c43a27ca5032de39e10d2881284f49ee0d1e719782542cd008bf11504122b96987e3fd45ca022c 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch a3952e27b39c737563daedba609960f4e7237e52988d1cec757526e4ed3887aee563cfc87925e6840619182c1c9876cd483ee3cc83747015f758c2421b3f1ba4 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch 46b073319937bdaaffe6a97a935a4b328f5fcbc10f91f88de20d7b1ffc7bd6321671c34fdcfb0ec59ca01033249f607715cfc154b57e195a55cea7ea6950c54d 0011-libiberty-copy-PIC-objects-during-build-process.patch c56526a61daa35dc72447aa9d947987f2ed124c6cf3b2cd82981f934cd4b032555402306a87a2667359f6670e9a4531e98c7b48ca4b0ecbfb019c551c87b24ee 0012-libitm-disable-FORTIFY.patch 5b2f39fee095947827625480994abe929cea90f95eda7849a3d7802990bc8dab501543d3f15b1d987bed10f69f868b15cd4af7cf3e1c4fc2d2495a2e3adfbd1d 0013-libgcc_s.patch 4a1043e95a14e95d7f6081f82e7004c9ad11165be67d20c7e03d0eb46e2aebe2b8d65cf95a29945463bd51fbc233ad322784f19804bd47e7425ec59a17314e45 0014-nopie.patch bdba6d04f9e77a00e407a70393aec0d668087be3bf6bd2db7e18b1ce20eae640346958a108ed65087bcf0d4250be168034ccfc72115afbe2dec9b2968218926c 0015-libffi-use-__linux__-instead-of-__gnu_linux__-for-mu.patch b5703c0a200a10bb84226fafc8d0fc3bdefecfd705d87b115368265aef4664b8cf158a21e59f1f32c842b3c665c3a009bb25b2b0003eb08914f0e0be81cec733 0016-dlang-update-zlib-binding.patch 925641f72bccc471f092108699cd9c4610430e7f829c65d800e592d47ae6ddbe57581a91e94ccd6b3fb5c481048a697d0c72826903fedd03780368519fab70d3 0017-dlang-use-libucontext-on-mips64.patch 363b166776e8f756e07554146fc4f33bad0f906bd57dfc794bb816c6bfb9bb9cc1d5950f53a03c11ccabab3528398d9df79e88cc02aa39e94809675540ab967f 0018-dlang-libdruntime-define-fcntl.h-constants-for-mips6.patch 2431ec336ed1c353f210be336fd3ce7e5ab11ed2e76bd87a32bc46fc7845c5accb6483fd7b37fd703a83449859622ab3ed7598ef9442f9e7a34b5f9aa7a5e00e 0019-ada-fix-shared-linking.patch b1bb85a34bab62b3fd1a8aef744bb48234bb6ec18454fed8ae068434fd820ddceaf27a372df90af53f95c8a86aec2fd6d49278e85d062c6e7bf96a64352b626b 0020-build-fix-CXXFLAGS_FOR_BUILD-passing.patch 8174615ddeb4300799e8fb29db1a38ff48ae62cecd50359af238c16f0b17ea0b642f0efa6c5898c06a0d019723438beb3cc252de95c26739da3e99ad6299be22 0021-add-fortify-headers-paths.patch a46ed9e4e4b96e7912b2fd4a2cf94bac8eaed68b64bc8bd86914176aa0107eee83a0a5e330ab0524c7f838cdd660a52fcf206033373fc4ff3b3af3a95801efa8 0022-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch 751eb9a4caa32232d9d0916465b5932cae2b05ab989c7019eb4bdc3fdadcec0103b5a6fca789c1886ea76c179a2568ea47de44931b1af4d9f13692c0617a1b48 0023-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch c9af403da0068f8d93eb74e345d06a43ac103ffd28514fb16ab31517e5172e5ed13451b8b20e87e80adf21b0ce3daca37e335a309d88c403f68377d75ff30a64 0024-mips64-disable-multilib-support.patch 7504757907b95e474d283876eaef08a4d03ad3308470d9130a7ac221ad1cc204de03520a5fa7ec42f9035af6edf84cb09b2f5b134d2ac744494f4cf385c70ae7 0025-aarch64-disable-multilib-support.patch 10106ccaa20a6c04c718cdf242c1ba16210d2ffd75febef0a4488023c9aa8d1086fad9c96416a82bf104188ab7542c925b2bbe277935f5c34967321fd358c022 0026-s390x-disable-multilib-support.patch 1152d020a3da61fd697fad6fc5cf6eeadb1225ebc8d8d9e81b9f63f34073876451b90e93d3fd334eeb68f6702498e335076e35a8020c2cd2443236e222cc73fe 0027-ppc64-le-disable-multilib-support.patch 1adc2daacbdb0a38ed2aaacc7864cfb38841fba16640af1053892fb63fcc2b56711a6ee3722e45cd17239b5793f612514130d24bc6588d4f884a353f70da3076 0028-x86_64-disable-multilib-support.patch cbebee40ad722be52e359853afaf4667e52fbf62e24b6f1b8a96b7b82984bf05a67903122dd5c19f90d477aed7daacdbc409f79a5981493f2457f0f16bef370f 0029-riscv-disable-multilib-support.patch 46c3089eaf48897de801849744e7094f829f521051345a6465e3a433e6f383298b0b2b4004a9d8277e7108a3e5be274d8aad01ab1ac23e76d3a8d07d396c2e10 0030-always-build-libgcc_eh.a.patch 1ee9524247041e3cd5d87868431156b9fee4429519508e2d05109c5dd8ba881d2964fe667dd4752cc98575b35a485e2a66b00a8fe2c75a86cd182ff0d706afd5 0031-ada-libgnarl-compatibility-for-musl.patch e6ae6f63ead4890ac3761f6d14383f5c5a995cca62d5432e2e12f5dda46d93dadd7298be98010c674533b2793415b0f0c37b54daabd74ef6f5e9f93cadb084b3 0032-ada-musl-support-fixes.patch bca91a9369e0a32bb824eff9ee92d7a9bf50273fd304784c04e9ee3d06382a821e6485d180d477c5a2c447ee6c1efe3f7e22014b30c5e3299af923a5c1471091 0033-gcc-go-Fix-handling-of-signal-34-on-musl.patch 4dd546fbdc73a276e15b0ca27db735ff0145240cf8bf627b267c77ee45d119e29c5346acba83335e0344a01ea9e730a28c5038666a35bfa886332cc63975c1af 0034-There-are-more-than-one-st_-a-m-c-tim-fields-in-stru.patch de8b5368f83988526f00c58f81fcb796baf1e2e6823fb70977092236225e859abcccee08373c59bfb944076af2791a549d94da47c4f4816216f6f708706b9f2b 0035-gcc-go-signal-34-is-special-on-musl-libc.patch 9c87c2f82ce9ab67b8ff4aa2cd5722badfd432292443c7901141479282ff29596ded3dc3508bfd3172544d1c160a6f32de61c801d831ff950236553727c7db19 0036-gcc-go-undef-SETCONTEXT_CLOBBERS_TLS-in-proc.c.patch c091bc56ced7fc3c5f9a879f42237cb60fbc3da8a2d9742ff0e4e93a3f97f20a620a8f16af23183ed3d14ddaeaf1207e1840fd015a622acb79959dd766aba9bc 0037-gcc-go-link-to-libucontext.patch 0694338a2fc12a903b979d45e9b4a92dc9e441e9c377e63b36cd900a0cc664e0f0493c797ea4c45478e60a3d70da5ff971e10460a3cbf64c2a940a4327fd87a6 0038-Use-generic-errstr.go-implementation-on-musl.patch 49c30829a80acf386fd5c14c630f9f0e5161264c1504121da749ae3e06fb54c36280e81b9760378edc3627cb29965da01f8d03c9d473a854d6294200b372da28 0039-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch ec78df0cd34fe838d9364fdfe3f3d9a068c256b7a507fea9d315c92dc21b0af3675210586e57be93aa096ed7c08645cdc6eb2184e6b18ab0dd900b98847acda5 0040-configure-fix-detection-of-atomic-builtins-in-libato.patch 0cdfcf11234be520a3b8ddcd0ed2efb9b4606da7135cea918e68a7655ebf43edb01eb291b9b226a0a44cf15f52c714f80884c0128b9d13771df3a6da991f2cbe 0041-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch c2a67dc1853682e0c72d721572e29dae93560b2c7d1fa932e4ee38f420b9bc21f187128498e094f7aaf6520f64b707f50c9aa6c260c269abb8e6f00c39be87c3 0042-Fix-attempt-to-use-poisoned-calloc-error-in-libgccji.patch 9a419b4b0cc3c80871b3b852f5d5fbd37d3e377ddcdf35273c4c543544d575f59762f0dcffa24ec2c74de29aaf07e4e8339474733e7b39558dc1481ad1f2b3ca 0043-stddef.h-add-support-for-musl-typedef-macro-guards.patch 801cf2e3f08fc6e0d1bd615361d7bb7541d468282ddf4357f9e276336bc4d4151a6cfdd413503dd7576d9c50191e60a8da9f38daa605c48f5f5d047360e882d4 0044-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch bc05c96a2cfa57ab9c12ef834cf5158991b4dd63baf98ea1558060b966fb959865ce659ea9095307df8c59136f999b7d6ebeb72a4bc1235a458849e227ead900 0045-Disable-fsplit-stack-support-on-non-glibc-targets.patch a2c3821998a5e457b6241f88a7015199c7d7abce698ab888ea7df2970866121b02393a70b79cb5862469a5286e9ad91a18fa113e308612baa62a52b839e8eea9 0046-libgo-include-asm-ptrace.h-for-pt_regs-definition-on.patch "