2018-12-12 17:14:55 +00:00
|
|
|
# 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})"
|
2019-12-26 13:51:16 +00:00
|
|
|
LANG_D=false
|
2018-12-12 17:14:55 +00:00
|
|
|
LANG_OBJC=false
|
|
|
|
LANG_JAVA=false
|
|
|
|
LANG_GO=false
|
|
|
|
LANG_FORTRAN=false
|
|
|
|
LANG_ADA=false
|
2022-11-02 14:27:11 +00:00
|
|
|
options="!strip"
|
2018-12-12 17:14:55 +00:00
|
|
|
|
|
|
|
# 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"
|
|
|
|
|
2020-07-14 16:05:19 +00:00
|
|
|
pkgname=gcc-armv7
|
2022-10-01 00:30:53 +00:00
|
|
|
_pkgbase=12.2.1 # must match gcc/BASE-VER
|
|
|
|
_pkgsnap=20220924
|
2023-01-08 11:03:22 +00:00
|
|
|
pkgver=${_pkgbase}_git$_pkgsnap
|
2018-12-12 17:14:55 +00:00
|
|
|
[ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2"
|
|
|
|
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
|
|
|
|
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
|
|
|
|
2020-07-14 16:05:19 +00:00
|
|
|
pkgname=gcc-armv7
|
2023-01-09 14:42:20 +00:00
|
|
|
pkgrel=8
|
2018-12-12 17:14:55 +00:00
|
|
|
pkgdesc="Stage2 cross-compiler for armv7"
|
2019-12-26 13:51:16 +00:00
|
|
|
url="https://gcc.gnu.org"
|
2018-12-12 17:14:55 +00:00
|
|
|
arch="x86_64"
|
2020-01-14 20:43:21 +00:00
|
|
|
license="GPL-2.0-or-later LGPL-2.1-or-later"
|
2018-12-12 17:14:55 +00:00
|
|
|
_gccrel=$pkgver-r$pkgrel
|
2022-09-11 12:30:43 +00:00
|
|
|
depends="binutils-armv7 mpc1"
|
2021-08-09 22:44:06 +00:00
|
|
|
makedepends_build="gcc g++ bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev"
|
2018-12-12 17:14:55 +00:00
|
|
|
makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev musl-dev-armv7 binutils-armv7"
|
2022-09-25 07:04:25 +00:00
|
|
|
subpackages="g++-armv7:gpp libstdc++-dev-armv7:libcxx_dev"
|
2018-12-12 17:14:55 +00:00
|
|
|
[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-doc$_target"
|
|
|
|
replaces="libstdc++ binutils"
|
|
|
|
|
2020-01-14 20:43:21 +00:00
|
|
|
: "${LANG_CXX:=true}"
|
|
|
|
: "${LANG_D:=true}"
|
|
|
|
: "${LANG_OBJC:=true}"
|
2021-11-25 23:47:19 +00:00
|
|
|
: "${LANG_GO:=true}"
|
2020-01-14 20:43:21 +00:00
|
|
|
: "${LANG_FORTRAN:=true}"
|
|
|
|
: "${LANG_ADA:=true}"
|
2021-12-05 02:06:27 +00:00
|
|
|
: "${LANG_JIT:=true}"
|
2018-12-12 17:14:55 +00:00
|
|
|
|
2020-01-14 20:43:21 +00:00
|
|
|
_libgomp=true
|
2022-09-25 07:04:25 +00:00
|
|
|
_libgcc=false
|
2020-01-14 20:43:21 +00:00
|
|
|
_libatomic=true
|
|
|
|
_libitm=true
|
2018-12-12 17:14:55 +00:00
|
|
|
|
|
|
|
if [ "$CHOST" != "$CTARGET" ]; then
|
|
|
|
if [ "$BOOTSTRAP" = nolibc ]; then
|
|
|
|
LANG_CXX=false
|
|
|
|
LANG_ADA=false
|
2020-01-14 20:43:21 +00:00
|
|
|
_libgcc=false
|
2018-12-12 17:14:55 +00:00
|
|
|
_builddir="$srcdir/build-cross-pass2"
|
|
|
|
else
|
|
|
|
_builddir="$srcdir/build-cross-final"
|
|
|
|
fi
|
|
|
|
LANG_OBJC=false
|
|
|
|
LANG_GO=false
|
|
|
|
LANG_FORTRAN=false
|
2020-03-27 14:07:52 +00:00
|
|
|
LANG_D=false
|
2021-12-05 02:06:27 +00:00
|
|
|
LANG_JIT=false
|
2020-01-14 20:43:21 +00:00
|
|
|
_libgomp=false
|
|
|
|
_libatomic=false
|
|
|
|
_libitm=false
|
2018-12-12 17:14:55 +00:00
|
|
|
|
|
|
|
# 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
|
2020-03-27 14:07:52 +00:00
|
|
|
LANG_D=false
|
2021-12-05 02:06:27 +00:00
|
|
|
LANG_JIT=false
|
2018-12-12 17:14:55 +00:00
|
|
|
|
|
|
|
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
|
|
|
_builddir="$srcdir/build-cross-native"
|
|
|
|
else
|
|
|
|
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
|
|
|
_builddir="$srcdir/build"
|
|
|
|
fi
|
|
|
|
|
2022-08-13 15:17:36 +00:00
|
|
|
case "$CARCH" in
|
2019-12-26 13:51:16 +00:00
|
|
|
# GDC hasn't been ported to PowerPC
|
|
|
|
# See libphobos/configure.tgt in GCC sources for supported targets
|
2021-06-11 19:05:24 +00:00
|
|
|
# riscv fails with: error: static assert "unimplemented"
|
|
|
|
ppc64le|riscv64) LANG_D=false ;;
|
2022-08-13 15:17:36 +00:00
|
|
|
# GDC does currently not work on 32-bit musl architectures.
|
|
|
|
# This is a known upstream issue.
|
|
|
|
# See: https://github.com/dlang/druntime/pull/3383
|
|
|
|
armhf|armv7|x86) LANG_D=false ;;
|
2021-06-11 19:05:24 +00:00
|
|
|
esac
|
2019-12-26 13:51:16 +00:00
|
|
|
|
2018-12-12 17:14:55 +00:00
|
|
|
# libitm has TEXTRELs in ARM build, so disable for now
|
|
|
|
case "$CTARGET_ARCH" in
|
2020-01-14 20:43:21 +00:00
|
|
|
arm*) _libitm=false ;;
|
|
|
|
mips*) _libitm=false ;;
|
2021-06-11 19:05:24 +00:00
|
|
|
riscv64) _libitm=false ;;
|
2018-12-12 17:14:55 +00:00
|
|
|
esac
|
|
|
|
|
2020-11-17 15:10:31 +00:00
|
|
|
# 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
|
|
|
|
|
2018-12-12 17:14:55 +00:00
|
|
|
# Fortran uses libquadmath if toolchain has __float128
|
|
|
|
# currently on x86, x86_64 and ia64
|
2020-01-14 20:43:21 +00:00
|
|
|
_libquadmath=$LANG_FORTRAN
|
2018-12-12 17:14:55 +00:00
|
|
|
case "$CTARGET_ARCH" in
|
2020-01-14 20:43:21 +00:00
|
|
|
x86 | x86_64) _libquadmath=$LANG_FORTRAN ;;
|
|
|
|
*) _libquadmath=false ;;
|
2018-12-12 17:14:55 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
# libatomic is a dependency for openvswitch
|
2020-01-14 20:43:21 +00:00
|
|
|
$_libatomic && subpackages="$subpackages libatomic::$CTARGET_ARCH"
|
|
|
|
$_libgcc && subpackages="$subpackages libgcc::$CTARGET_ARCH"
|
|
|
|
$_libquadmath && subpackages="$subpackages libquadmath::$CTARGET_ARCH"
|
|
|
|
if $_libgomp; then
|
2018-12-12 17:14:55 +00:00
|
|
|
depends="$depends libgomp=$_gccrel"
|
|
|
|
subpackages="$subpackages libgomp::$CTARGET_ARCH"
|
|
|
|
fi
|
|
|
|
|
2021-06-11 19:05:24 +00:00
|
|
|
case "$CARCH" in
|
|
|
|
riscv64)
|
|
|
|
LANG_ADA=false;;
|
|
|
|
esac
|
|
|
|
|
2018-12-12 17:14:55 +00:00
|
|
|
_languages=c
|
|
|
|
if $LANG_CXX; then
|
|
|
|
_languages="$_languages,c++"
|
|
|
|
fi
|
2019-12-26 13:51:16 +00:00
|
|
|
if $LANG_D; then
|
|
|
|
subpackages="$subpackages libgphobos::$CTARGET_ARCH gcc-gdc$_target:gdc"
|
|
|
|
_languages="$_languages,d"
|
2022-08-13 15:17:36 +00:00
|
|
|
makedepends_build="$makedepends_build libucontext-dev gcc-gdc-bootstrap"
|
2019-12-26 13:51:16 +00:00
|
|
|
fi
|
2018-12-12 17:14:55 +00:00
|
|
|
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
|
2022-07-19 16:41:55 +00:00
|
|
|
subpackages="$subpackages gcc-gnat$_target:gnat"
|
2018-12-12 17:14:55 +00:00
|
|
|
_languages="$_languages,ada"
|
2022-07-19 16:41:55 +00:00
|
|
|
if [ "$CBUILD" = "$CTARGET" ]; then
|
|
|
|
makedepends_build="$makedepends_build gcc-gnat-bootstrap"
|
|
|
|
subpackages="$subpackages libgnat-static:libgnatstatic:$CTARGET_ARCH libgnat::$CTARGET_ARCH"
|
|
|
|
else
|
|
|
|
subpackages="$subpackages libgnat::$CTARGET_ARCH"
|
|
|
|
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
|
|
|
fi
|
2018-12-12 17:14:55 +00:00
|
|
|
fi
|
2021-12-05 02:06:27 +00:00
|
|
|
if $LANG_JIT; then
|
|
|
|
subpackages="$subpackages libgccjit:jit libgccjit-dev:jitdev"
|
|
|
|
fi
|
2018-12-12 17:14:55 +00:00
|
|
|
makedepends="$makedepends_build $makedepends_host"
|
|
|
|
|
2020-11-13 10:30:52 +00:00
|
|
|
# when using upstream releases, use this URI template
|
|
|
|
# https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
|
|
|
#
|
2022-10-01 00:30:53 +00:00
|
|
|
# right now, we are using a git snapshot. snapshots are taken from gcc.gnu.org/pub/gcc/snapshots.
|
|
|
|
# However, since they are periodically deleted from the GCC mirrors the utilized snapshots are
|
|
|
|
# mirrored on dev.alpinelinux.org. Please ensure that the snapshot Git commit (as stated in the
|
|
|
|
# README) matches the base commit on the version-specific branch in the Git repository below.
|
2020-12-03 23:13:25 +00:00
|
|
|
#
|
|
|
|
# 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.
|
2023-01-08 11:03:22 +00:00
|
|
|
source="https://dev.alpinelinux.org/archive/gcc/${_pkgbase%%.*}-$_pkgsnap/gcc-${_pkgbase%%.*}-$_pkgsnap.tar.xz
|
2020-08-21 10:18:02 +00:00
|
|
|
0001-posix_memalign.patch
|
|
|
|
0002-gcc-poison-system-directories.patch
|
2022-01-06 15:11:38 +00:00
|
|
|
0003-specs-turn-on-Wl-z-now-by-default.patch
|
2020-08-21 10:18:02 +00:00
|
|
|
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
|
2022-08-13 15:17:36 +00:00
|
|
|
0015-dlang-use-libucontext-on-mips64.patch
|
|
|
|
0016-ada-fix-shared-linking.patch
|
|
|
|
0017-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
|
|
|
0018-add-fortify-headers-paths.patch
|
|
|
|
0019-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
|
|
|
0020-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
|
|
|
0021-mips64-disable-multilib-support.patch
|
|
|
|
0022-aarch64-disable-multilib-support.patch
|
|
|
|
0023-s390x-disable-multilib-support.patch
|
|
|
|
0024-ppc64-le-disable-multilib-support.patch
|
|
|
|
0025-x86_64-disable-multilib-support.patch
|
|
|
|
0026-riscv-disable-multilib-support.patch
|
|
|
|
0027-always-build-libgcc_eh.a.patch
|
|
|
|
0028-ada-libgnarl-compatibility-for-musl.patch
|
|
|
|
0029-ada-musl-support-fixes.patch
|
|
|
|
0033-gcc-go-link-to-libucontext.patch
|
|
|
|
0034-Use-generic-errstr.go-implementation-on-musl.patch
|
|
|
|
0035-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
|
|
|
0036-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
|
|
|
0037-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch
|
|
|
|
0039-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
|
|
|
|
0041-go-gospec-forcibly-disable-fsplit-stack-support.patch
|
|
|
|
0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch
|
|
|
|
0043-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
|
|
|
0044-gdc-unconditionally-link-libgphobos-against-libucont.patch
|
|
|
|
0045-druntime-link-against-libucontext-on-all-platforms.patch
|
|
|
|
0049-libgo-adjust-name-of-union-in-sigevent-struct.patch
|
|
|
|
0050-libphobos-don-t-define-__mode_t-twice-on-musl-target.patch
|
|
|
|
0051-libgo-Explicitly-define-SYS_timer_settime-for-32-bit.patch
|
|
|
|
0052-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
|
|
|
0053-libgo-make-match.sh-POSIX-shell-compatible.patch
|
2022-11-02 14:27:11 +00:00
|
|
|
0054-libphobos-fix-undefined-reference-to-__cmsg_nxthdr-w.patch
|
2018-12-12 17:14:55 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
# we build out-of-tree
|
2023-01-08 11:03:22 +00:00
|
|
|
_gccdir="$srcdir"/gcc-${_pkgbase%%.*}-$_pkgsnap
|
2020-11-13 10:30:52 +00:00
|
|
|
_gcclibdir="/usr/lib/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
|
|
|
_gcclibexec="/usr/libexec/gcc/$CTARGET/${_pkgbase:-$pkgver}"
|
2018-12-12 17:14:55 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-11-13 10:30:52 +00:00
|
|
|
echo ${_pkgbase:-$pkgver} > gcc/BASE-VER
|
2018-12-12 17:14:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
local _arch_configure=
|
|
|
|
local _libc_configure=
|
|
|
|
local _bootstrap_configure=
|
|
|
|
local _symvers=
|
2021-12-05 02:06:27 +00:00
|
|
|
local _jit_configure=
|
2018-12-12 17:14:55 +00:00
|
|
|
|
|
|
|
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";;
|
2021-06-12 23:03:06 +00:00
|
|
|
riscv64-*-*-*) _arch_configure="--with-arch=rv64gc --with-abi=lp64d --enable-autolink-libatomic";;
|
2018-12-12 17:14:55 +00:00
|
|
|
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)
|
2022-10-15 16:11:21 +00:00
|
|
|
# musl does not support libsanitizer
|
2018-12-12 17:14:55 +00:00
|
|
|
# alpine musl provides libssp_nonshared.a, so we don't need libssp either
|
2022-10-15 16:11:21 +00:00
|
|
|
_libc_configure="--disable-libssp --disable-libsanitizer"
|
2018-12-12 17:14:55 +00:00
|
|
|
_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
|
|
|
|
|
2020-01-14 20:43:21 +00:00
|
|
|
$_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"
|
2018-12-12 17:14:55 +00:00
|
|
|
|
|
|
|
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"
|
2022-09-11 12:30:43 +00:00
|
|
|
echo " hash_style_configure=$_hash_style_configure"
|
2018-12-12 17:14:55 +00:00
|
|
|
echo ""
|
|
|
|
|
2020-08-21 10:18:02 +00:00
|
|
|
export CFLAGS="$CFLAGS -O2"
|
2022-08-13 15:17:36 +00:00
|
|
|
export CXXFLAGS="$CXXFLAGS -O2"
|
|
|
|
export CPPFLAGS="$CPPFLAGS -O2"
|
2020-08-21 10:18:02 +00:00
|
|
|
|
2022-09-11 12:30:43 +00:00
|
|
|
local version="Alpine $pkgver-r$pkgrel"
|
|
|
|
local gccconfiguration="
|
|
|
|
--prefix=/usr
|
|
|
|
--mandir=/usr/share/man
|
|
|
|
--infodir=/usr/share/info
|
2023-01-08 11:03:22 +00:00
|
|
|
--build=$CBUILD
|
|
|
|
--host=$CHOST
|
|
|
|
--target=$CTARGET
|
2022-09-11 12:30:43 +00:00
|
|
|
--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-languages=$_languages
|
|
|
|
$_arch_configure
|
|
|
|
$_libc_configure
|
|
|
|
$_cross_configure
|
|
|
|
$_bootstrap_configure
|
|
|
|
--with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues
|
|
|
|
--with-system-zlib
|
|
|
|
$_hash_style_configure
|
|
|
|
"
|
|
|
|
|
2018-12-12 17:14:55 +00:00
|
|
|
mkdir -p "$_builddir"
|
|
|
|
cd "$_builddir"
|
2022-09-11 12:30:43 +00:00
|
|
|
"$_gccdir"/configure $gccconfiguration \
|
|
|
|
--with-pkgversion="$version"
|
|
|
|
|
|
|
|
msg "building gcc"
|
2018-12-12 17:14:55 +00:00
|
|
|
make
|
2022-09-11 12:30:43 +00:00
|
|
|
|
|
|
|
# we build gccjit separate to not build all of gcc with --enable-host-shared
|
|
|
|
# as doing so slows it down a few %, so for some quick if's here we gain
|
|
|
|
# free performance
|
|
|
|
if $LANG_JIT; then
|
|
|
|
mkdir -p "$_builddir"/libgccjit-build
|
|
|
|
cd "$_builddir"/libgccjit-build
|
|
|
|
"$_gccdir"/configure $gccconfiguration \
|
|
|
|
--disable-bootstrap \
|
|
|
|
--enable-host-shared \
|
|
|
|
--enable-languages=jit \
|
|
|
|
--with-pkgversion="$version"
|
|
|
|
|
|
|
|
msg "building libgccjit"
|
|
|
|
make all-gcc
|
|
|
|
fi
|
2018-12-12 17:14:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd "$_builddir"
|
2022-09-11 12:30:43 +00:00
|
|
|
make DESTDIR="$pkgdir" install
|
2018-12-12 17:14:55 +00:00
|
|
|
|
|
|
|
ln -s gcc "$pkgdir"/usr/bin/cc
|
|
|
|
|
2022-09-11 12:30:43 +00:00
|
|
|
if $LANG_JIT; then
|
|
|
|
make -C "$_builddir"/libgccjit-build/gcc DESTDIR="$pkgdir" jit.install-common
|
|
|
|
fi
|
|
|
|
|
2018-12-12 17:14:55 +00:00
|
|
|
# we dont support gcj -static
|
|
|
|
# and saving 35MB is not bad.
|
2020-01-14 20:43:21 +00:00
|
|
|
find "$pkgdir" \( -name libgtkpeer.a \
|
2019-10-01 07:57:30 +00:00
|
|
|
-o -name libgjsmalsa.a \
|
2020-01-14 20:43:21 +00:00
|
|
|
-o -name libgij.a \) \
|
|
|
|
-delete
|
2018-12-12 17:14:55 +00:00
|
|
|
|
|
|
|
# strip debug info from some static libs
|
2020-01-14 20:43:21 +00:00
|
|
|
find "$pkgdir" \( -name libgfortran.a -o -name libobjc.a -o -name libgomp.a \
|
|
|
|
-o -name libgphobos.a -o -name libgdruntime.a \
|
2018-12-12 17:14:55 +00:00
|
|
|
-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 \) \
|
2020-01-14 20:43:21 +00:00
|
|
|
-a -type f \
|
2023-01-08 11:03:22 +00:00
|
|
|
-exec $STRIP_FOR_TARGET -g {} +
|
2018-12-12 17:14:55 +00:00
|
|
|
|
2020-01-14 20:43:21 +00:00
|
|
|
if $_libgomp; then
|
2018-12-12 17:14:55 +00:00
|
|
|
mv "$pkgdir"/usr/lib/libgomp.spec "$pkgdir"/$_gcclibdir
|
|
|
|
fi
|
2020-01-14 20:43:21 +00:00
|
|
|
if $_libitm; then
|
2018-12-12 17:14:55 +00:00
|
|
|
mv "$pkgdir"/usr/lib/libitm.spec "$pkgdir"/$_gcclibdir
|
|
|
|
fi
|
|
|
|
|
|
|
|
# remove ffi
|
|
|
|
rm -f "$pkgdir"/usr/lib/libffi* "$pkgdir"/usr/share/man/man3/ffi*
|
2020-01-14 20:43:21 +00:00
|
|
|
find "$pkgdir" -name 'ffi*.h' -delete
|
2018-12-12 17:14:55 +00:00
|
|
|
|
|
|
|
local gdblib=${_target:+$CTARGET/}lib
|
2019-10-01 07:57:30 +00:00
|
|
|
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
|
2018-12-12 17:14:55 +00:00
|
|
|
|
|
|
|
# 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
|
2022-07-19 16:41:55 +00:00
|
|
|
if [ "$CHOST" = "$CTARGET" ]; then
|
|
|
|
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
|
2018-12-12 17:14:55 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$CHOST" != "$CTARGET" ]; then
|
|
|
|
# cross-gcc: remove any files that would conflict with the
|
|
|
|
# native gcc package
|
2020-01-14 20:43:21 +00:00
|
|
|
rm -rf "$pkgdir"/usr/bin/cc "$pkgdir"/usr/include "${pkgdir:?}"/usr/share
|
2018-12-12 17:14:55 +00:00
|
|
|
# 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
|
2020-01-14 20:43:21 +00:00
|
|
|
for so in "$pkgdir"/usr/"$CTARGET"/lib/*.so; do
|
2018-12-12 17:14:55 +00:00
|
|
|
if [ -h "$so" ]; then
|
2020-03-27 14:07:52 +00:00
|
|
|
local _real=$(basename "$(readlink "$so")")
|
2018-12-12 17:14:55 +00:00
|
|
|
rm -f "$so"
|
|
|
|
echo "GROUP ($_real)" > "$so"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
else
|
|
|
|
# add c89/c99 wrapper scripts
|
|
|
|
cat >"$pkgdir"/usr/bin/c89 <<'EOF'
|
|
|
|
#!/bin/sh
|
2020-01-14 20:43:21 +00:00
|
|
|
_flavor="-std=c89"
|
2018-12-12 17:14:55 +00:00
|
|
|
for opt; do
|
|
|
|
case "$opt" in
|
2020-01-14 20:43:21 +00:00
|
|
|
-ansi|-std=c89|-std=iso9899:1990) _flavor="";;
|
2018-12-12 17:14:55 +00:00
|
|
|
-std=*) echo "$(basename $0) called with non ANSI/ISO C option $opt" >&2
|
|
|
|
exit 1;;
|
|
|
|
esac
|
|
|
|
done
|
2020-01-14 20:43:21 +00:00
|
|
|
exec gcc $_flavor ${1+"$@"}
|
2018-12-12 17:14:55 +00:00
|
|
|
EOF
|
|
|
|
cat >"$pkgdir"/usr/bin/c99 <<'EOF'
|
|
|
|
#!/bin/sh
|
2020-01-14 20:43:21 +00:00
|
|
|
_flavor="-std=c99"
|
2018-12-12 17:14:55 +00:00
|
|
|
for opt; do
|
|
|
|
case "$opt" in
|
2020-01-14 20:43:21 +00:00
|
|
|
-std=c99|-std=iso9899:1999) _flavor="";;
|
2018-12-12 17:14:55 +00:00
|
|
|
-std=*) echo "$(basename $0) called with non ISO C99 option $opt" >&2
|
|
|
|
exit 1;;
|
|
|
|
esac
|
|
|
|
done
|
2020-01-14 20:43:21 +00:00
|
|
|
exec gcc $_flavor ${1+"$@"}
|
2018-12-12 17:14:55 +00:00
|
|
|
EOF
|
|
|
|
chmod 755 "$pkgdir"/usr/bin/c?9
|
2020-05-18 15:05:24 +00:00
|
|
|
|
|
|
|
# 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/"
|
2018-12-12 17:14:55 +00:00
|
|
|
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=
|
|
|
|
|
2020-07-14 16:05:19 +00:00
|
|
|
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
|
2020-06-10 17:12:49 +00:00
|
|
|
|
2018-12-12 17:14:55 +00:00
|
|
|
mkdir -p "$subpkgdir"/usr/lib
|
|
|
|
mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/
|
|
|
|
}
|
|
|
|
|
2022-09-11 12:30:43 +00:00
|
|
|
libcxx_dev() {
|
|
|
|
pkgdesc="GNU C++ standard runtime library (development files)"
|
|
|
|
depends=
|
|
|
|
replaces="g++"
|
|
|
|
|
2022-09-25 07:04:25 +00:00
|
|
|
amove usr/${_target:+$CTARGET/}lib/libstdc++.a \
|
|
|
|
usr/${_target:+$CTARGET/}lib/libstdc++.so \
|
|
|
|
usr/${_target:+$CTARGET/}lib/libstdc++fs.a \
|
|
|
|
usr/${_target:+$CTARGET/}lib/libsupc++.a \
|
|
|
|
usr/${_target:+$CTARGET/}include/c++
|
2022-09-11 12:30:43 +00:00
|
|
|
}
|
|
|
|
|
2018-12-12 17:14:55 +00:00
|
|
|
gpp() {
|
|
|
|
pkgdesc="GNU C++ standard library and compiler"
|
2022-09-25 07:04:25 +00:00
|
|
|
depends="libstdc++=$_gccrel libstdc++-dev$_target=$_gccrel gcc$_target=$_gccrel libc-dev"
|
2018-12-12 17:14:55 +00:00
|
|
|
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/bin/*++ "$subpkgdir"/usr/bin/
|
2021-12-05 02:06:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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
|
2018-12-12 17:14:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
2020-07-14 16:05:19 +00:00
|
|
|
mkdir -p "$subpkgdir/$_gcclibexec" \
|
|
|
|
"$subpkgdir"/$_gcclibdir/include \
|
2018-12-12 17:14:55 +00:00
|
|
|
"$subpkgdir"/usr/lib
|
2020-07-14 16:05:19 +00:00
|
|
|
mv "$pkgdir/$_gcclibexec/cc1obj" "$subpkgdir/$_gcclibexec/"
|
2018-12-12 17:14:55 +00:00
|
|
|
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/
|
|
|
|
}
|
|
|
|
|
2020-01-14 20:43:21 +00:00
|
|
|
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"
|
2020-03-31 13:37:54 +00:00
|
|
|
depends="$depends libucontext-dev"
|
2022-06-30 22:39:20 +00:00
|
|
|
provides="gcc-gdc-bootstrap=$_gccrel"
|
2020-01-14 20:43:21 +00:00
|
|
|
|
2020-07-14 16:05:19 +00:00
|
|
|
mkdir -p "$subpkgdir/$_gcclibexec" \
|
|
|
|
"$subpkgdir"/$_gcclibdir/include/d/ \
|
2020-01-14 20:43:21 +00:00
|
|
|
"$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
|
2020-07-14 16:05:19 +00:00
|
|
|
mv "$pkgdir/$_gcclibexec/d21" "$subpkgdir/$_gcclibexec/"
|
2020-01-14 20:43:21 +00:00
|
|
|
mv "$pkgdir"/$_gcclibdir/include/d/* "$subpkgdir"/$_gcclibdir/include/d/
|
|
|
|
mv "$pkgdir"/usr/lib/libgdruntime.a "$subpkgdir"/usr/lib/
|
2022-02-21 16:53:02 +00:00
|
|
|
mv "$pkgdir"/usr/lib/libgdruntime.so "$subpkgdir"/usr/lib/
|
2020-01-14 20:43:21 +00:00
|
|
|
mv "$pkgdir"/usr/lib/libgphobos.a "$subpkgdir"/usr/lib/
|
2022-02-21 16:53:02 +00:00
|
|
|
mv "$pkgdir"/usr/lib/libgphobos.so "$subpkgdir"/usr/lib/
|
2020-07-14 16:05:19 +00:00
|
|
|
mv "$pkgdir"/usr/lib/libgphobos.spec "$subpkgdir"/usr/lib/
|
|
|
|
mv "$pkgdir"/usr/bin/$CTARGET-gdc "$subpkgdir"/usr/bin/
|
2020-01-14 20:43:21 +00:00
|
|
|
mv "$pkgdir"/usr/bin/gdc "$subpkgdir"/usr/bin/
|
|
|
|
}
|
|
|
|
|
2018-12-12 17:14:55 +00:00
|
|
|
libgo() {
|
|
|
|
pkgdesc="Go runtime library for GCC"
|
|
|
|
depends=
|
|
|
|
|
|
|
|
mkdir -p "$subpkgdir"/usr/lib
|
|
|
|
mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/
|
|
|
|
}
|
|
|
|
|
|
|
|
go() {
|
2022-10-15 16:11:21 +00:00
|
|
|
pkgdesc="GCC Go frontend (intended for bootstrapping community/go)"
|
2020-09-05 20:31:51 +00:00
|
|
|
depends="gcc=$_gccrel libgo=$_gccrel !go"
|
2022-10-15 16:11:21 +00:00
|
|
|
install="$pkgname-go.post-install"
|
2018-12-12 17:14:55 +00:00
|
|
|
|
2022-10-03 10:09:39 +00:00
|
|
|
# See https://lists.alpinelinux.org/~alpine/devel/%3C33KG0XO61I4IL.2Z7RTAZ5J3SY6%408pit.net%3E
|
|
|
|
provides="go-bootstrap"
|
|
|
|
provider_priority=1 # lowest, see community/go
|
|
|
|
|
2018-12-12 17:14:55 +00:00
|
|
|
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/
|
2020-09-05 20:31:51 +00:00
|
|
|
mv "$pkgdir"/usr/bin/*go "$subpkgdir"/usr/bin
|
|
|
|
mv "$pkgdir"/usr/bin/*gofmt "$subpkgdir"/usr/bin
|
2018-12-12 17:14:55 +00:00
|
|
|
mv "$pkgdir"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
2020-09-05 20:31:51 +00:00
|
|
|
mv "$pkgdir"/$_gcclibexec/cgo "$subpkgdir"/$_gcclibexec/
|
|
|
|
mv "$pkgdir"/$_gcclibexec/buildid "$subpkgdir"/$_gcclibexec/
|
|
|
|
mv "$pkgdir"/$_gcclibexec/test2json "$subpkgdir"/$_gcclibexec/
|
|
|
|
mv "$pkgdir"/$_gcclibexec/vet "$subpkgdir"/$_gcclibexec/
|
2018-12-12 17:14:55 +00:00
|
|
|
mv "$pkgdir"/usr/lib/libgo.a \
|
|
|
|
"$pkgdir"/usr/lib/libgo.so \
|
|
|
|
"$pkgdir"/usr/lib/libgobegin.a \
|
2020-09-05 20:31:51 +00:00
|
|
|
"$pkgdir"/usr/lib/libgolibbegin.a \
|
2018-12-12 17:14:55 +00:00
|
|
|
"$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"
|
2020-01-14 20:43:21 +00:00
|
|
|
$_libquadmath && depends="$depends libquadmath=$_gccrel"
|
2018-12-12 17:14:55 +00:00
|
|
|
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/
|
2020-01-14 20:43:21 +00:00
|
|
|
if $_libquadmath; then
|
2018-12-12 17:14:55 +00:00
|
|
|
mv "$pkgdir"/usr/lib/libquadmath.a \
|
|
|
|
"$pkgdir"/usr/lib/libquadmath.so \
|
|
|
|
"$subpkgdir"/usr/lib/
|
|
|
|
fi
|
2020-07-14 16:05:19 +00:00
|
|
|
mv "$pkgdir"/$_gcclibdir/finclude "$subpkgdir"/$_gcclibdir/
|
2018-12-12 17:14:55 +00:00
|
|
|
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/
|
|
|
|
}
|
|
|
|
|
2021-03-07 15:33:26 +00:00
|
|
|
libgnatstatic() {
|
|
|
|
pkgdesc="GNU Ada static libraries"
|
|
|
|
depends=
|
|
|
|
|
|
|
|
mkdir -p "$subpkgdir"/usr/lib
|
|
|
|
mv "$pkgdir"/usr/lib/libgna*.a "$subpkgdir"/usr/lib/
|
|
|
|
}
|
|
|
|
|
2018-12-12 17:14:55 +00:00
|
|
|
gnat() {
|
|
|
|
pkgdesc="Ada support for GCC"
|
|
|
|
depends="gcc=$_gccrel"
|
2022-06-30 22:39:20 +00:00
|
|
|
provides="$pkgname-gnat-bootstrap=$_gccrel"
|
2018-12-12 17:14:55 +00:00
|
|
|
[ "$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/
|
|
|
|
}
|
|
|
|
|
2021-06-25 14:39:45 +00:00
|
|
|
sha512sums="
|
2022-10-01 00:30:53 +00:00
|
|
|
ba4d9e73d108088da26fbefe18d9b245b76771ffe752c2b4b31bdf38a2d0b638fbc115c377526c27311d4d7ffd4e0d236a5af5016bd364ccaa11a4989d1401e8 gcc-12-20220924.tar.xz
|
2022-08-13 15:17:36 +00:00
|
|
|
41cbb4d69218006cf9e0cdb6c86212ef451f8decd52a50a7dbb4d34726009da7a4e0261c852b46cb584db253a4bae2f31dc485c506cb545e64a7d26e0ba6c2b6 0001-posix_memalign.patch
|
|
|
|
531155055cda7f119bcac6479bcae73af9201cd596af9cf1616850bbcf4393b91c5de9f2fbbc1cde6e158fb4df7237b033146f662dff5fa0ea12151cc514adb8 0002-gcc-poison-system-directories.patch
|
|
|
|
c1275d77b5269386a2ec683933570810f5a2ba1208c161ed887797eb9aee3cb82ef08a8964635902614e6a6e83f3065ba0801c9355d85dd8d60cb1fa20bdf687 0003-specs-turn-on-Wl-z-now-by-default.patch
|
|
|
|
a54e45bff4484a35d3826435a414d909281453f5605f4081cf3be1f15336cceed93a1d8a54e92e2fa97188623e3030ca1323d7749141e228a7db73795230d86a 0004-Turn-on-D_FORTIFY_SOURCE-2-by-default-for-C-C-ObjC-O.patch
|
|
|
|
ad132ddbd0c33a3983e3de4f74d8fdb8cb1ddf53ef54de0a5c12efb49e42014ed117165d43f396bcf3455ecfe2c8620e0326e73b4160a370a4cc92d213329c34 0005-On-linux-targets-pass-as-needed-by-default-to-the-li.patch
|
|
|
|
0b9ce0f130a7b797770f3d58a5200575f20e5663c86c0c5710718b7bffd3416cc2f05861613d9c258428e9541c6e0b9837d01f0c99d383e2c3de0503a988e861 0006-Enable-Wformat-and-Wformat-security-by-default.patch
|
|
|
|
e7813acc7ead61373c212cefbe53eb020b4c5bd8f0f35ee972e0524060713f911624f5a1a871feada642e1f3f5e48c8508125ca2da09de351d544bedf1d44ada 0007-Enable-Wtrampolines-by-default.patch
|
|
|
|
d0d0566a11e4828bdd6f53346a9a6b9841f3066d3f4a05ee2b6fe97aeb4552654170e7662318ea18fc777c3e75c88a067097478fc4e880a3f9c134b8a3af2277 0008-Disable-ssp-on-nostdlib-nodefaultlibs-and-ffreestand.patch
|
|
|
|
f75e63d9d933874f18fb7f55b135c60dfa0377abafa8e0edb91b85d5f00f4f072d0a338ba5d9baec18494211dbbda8068782830dbafbb37068936f76aede270f 0009-Ensure-that-msgfmt-doesn-t-encounter-problems-during.patch
|
|
|
|
afa4daba222a19569588736a8276dc7c12223a7c222f3dd3795dc3f1cd90f40b90518971ae27b358020354f89562c9680ec8b8e24e85e6d4f8e54e79d185359b 0010-Don-t-declare-asprintf-if-defined-as-a-macro.patch
|
|
|
|
79dac82249fb573ec477e1451a33883302eb63a5110853faed117f5021221f2153e2ec845dd5a0043b1bf9f0e5736ef0c89743ff2d771774a281c8b24542803a 0011-libiberty-copy-PIC-objects-during-build-process.patch
|
|
|
|
b035f85c1703b45d15c1d1ffe7d23400e01625e5d403504911cc92f740b02586447de2a9d66a9f80f12b9c227bc193e2a43942c8af2bdb42cdeff8272bbe6068 0012-libitm-disable-FORTIFY.patch
|
|
|
|
9fb4d396a9493d2d68fe829ce075ba4c5df148b1d6aaab315a6f8ccbdd70d0e052a5dc50369adc2dab005b4a3becd1504b182faed6e82c86accb95f5bc2b9f50 0013-libgcc_s.patch
|
|
|
|
f82ac22961d842c9f8e731a601bb255918cc160969888363ad2d83e2ccf08b19114a200d46bcf99d097bf530f470c2b1e71e46828bc1b9fff5469ff945f541d8 0014-nopie.patch
|
|
|
|
6527dc9d250db48d56cf01e9299461bf22a838ffda96c40d448e18f457b206cec2322275d2d5abbbaf3c6573c5e7eba12724c9691b601f118ff7520e19726373 0015-dlang-use-libucontext-on-mips64.patch
|
|
|
|
6c3ce0ccd68b19e2c76172d8f24b0747ee0af2b8de7af692f2f699848267d7fc42fec8e5c303102fe05be7e934b56f21eea17ce47c8aca20570590830d88e9b0 0016-ada-fix-shared-linking.patch
|
|
|
|
7089a96aaec8e0b222cb3fa7301d71bb2e328a24dec33e15ea9e3e7695bcae919308249b9a3be5ea2f3b1f069f9fd1739066f31d12317fcdab0596dba9ca54a4 0017-build-fix-CXXFLAGS_FOR_BUILD-passing.patch
|
|
|
|
b7ebdeee0b143052fdd6e3efa070ea8621d4fb729312cbc787d618e666b593990a20cd9044a786265970d8e09ec13da03b797009543d0b657b0fe924f2dcaa68 0018-add-fortify-headers-paths.patch
|
|
|
|
8e682893d6367732ab8c490b915112a68d98855deec3bd8db91dc0d9bf486b8c044b13ee2b95c4806da7ac17c41034e081b7a66861018274cb33fdb2fd6df04a 0019-Alpine-musl-package-provides-libssp_nonshared.a.-We-.patch
|
|
|
|
a14c5f98ade5af8cd6e3a0244752674d9c4f6dadb4260f98f1949bff51ac1211a3f8319e0f933f776e98998d2c7221004f92413f97ccc2e966f8462ed6d33597 0020-DP-Use-push-state-pop-state-for-gold-as-well-when-li.patch
|
|
|
|
28c1d477da79aa212ac79e4b02cf865d8b9c31cec6c42f41b4268e3f3c49bf67fb51e54180abe543a54e550788bb472bfcf1b4bc38d072a792d7403dbbee178a 0021-mips64-disable-multilib-support.patch
|
|
|
|
0920e31c46bf937b47a0602766f042d45adb71abf332ee84399c665c12298ef115cff945fe26d646b0276bfdfdd04913970e6f1f8784a11c26e15111c854643d 0022-aarch64-disable-multilib-support.patch
|
|
|
|
e4c6bf7ec40f2798c8e5b40a543aecffd5591a2805546b3b97aaa4fbe4df6ce4330a60973a9ddfbca9890590606d5204e7f653ab2b6e4b2c13feeb595b68e63a 0023-s390x-disable-multilib-support.patch
|
|
|
|
0e956d793c94283ce5af7fe84bfcbb655585a9573608e9bf497fa7b726e12daa391e44977d0a8c97fb460aba89b1773b91e036b0ee1ef4d6263a3943cb63d9cd 0024-ppc64-le-disable-multilib-support.patch
|
|
|
|
95917fcb60dbc0a8134db9beb583f3c9ea61128499c214f594c434ec8246641ec41e245ce2d1d9b85ffd40ea0e5764f7a33c5522b2547145814245ac0fa25025 0025-x86_64-disable-multilib-support.patch
|
|
|
|
b40d7e4712c035674c993bbb55475290ec14523b3f0fd05493514bac4e9adaa6641faf815fc40ffc00119d9fd64be28218ee874c289ec7430eeef05ab2fcae5e 0026-riscv-disable-multilib-support.patch
|
|
|
|
674360ce2ee9f704d0632cc98756f9fe8dd8ca30064fb9d3423b437f7e679c1c51e765b15e535dcb278cd2769583690acb3395b91e4fd5f6f4e3b97879fcc313 0027-always-build-libgcc_eh.a.patch
|
|
|
|
f060687adcd5297124e4000f1ba1e3fd5d7d124da04d948cbd0d4a6c69a90a2b29a4a0dbbe13a83ab6950724f434de012b681bdbcdf53c0100b40fe3d00f2f2f 0028-ada-libgnarl-compatibility-for-musl.patch
|
|
|
|
5160bae68e20a1966c1f6d655ee98af759e9b9ee842718ae6007d467b418e1cf3b307528a0841477b5259671ce868521b06c0f2e947b7b8f3a398c53dd978252 0029-ada-musl-support-fixes.patch
|
2022-12-22 22:07:19 +00:00
|
|
|
72631fbef4843d6ada52f3173b257e027605866a3faf1d8e34438cbf2581952f97bf6f9569ee44fcd7c4b3b337612eaeb0612fb2e6451903f219e4d99bf719db 0033-gcc-go-link-to-libucontext.patch
|
2022-12-06 08:04:17 +00:00
|
|
|
141c0428f988cbd102000d4db8d4150485f6da5c064469493ea378cd579bed99330658f41fe106c0d07d1c1aa436ec3f864403ed1ba79f791a1d727b42d46910 0034-Use-generic-errstr.go-implementation-on-musl.patch
|
2022-08-13 15:17:36 +00:00
|
|
|
d9ba710f770e053c8f212e821817c188091a829658050b9ab5906388553ec60fec37943ea43c270e92a9014902949f3c98fc4639032d92b8145b375bb29e193e 0035-configure-Add-enable-autolink-libatomic-use-in-LINK_.patch
|
|
|
|
ab90d8fdd977d6cd3da096a1c76d77be3e89a020b2127247771711a32eb608cceed21834ef488ab4b69bb0f408b098fdfb61630819e3d1a1e57d5af67800ee74 0036-configure-fix-detection-of-atomic-builtins-in-libato.patch
|
2022-10-01 00:30:53 +00:00
|
|
|
8bc6823f0b3c66f7b73d7ddb64ffa6930463285c2e9a14a2bc1882bcc4271144eaa1107d713294699caf9481648163cbf43921a2b8e4ac0d55c78a804bae8a3d 0037-libgo-Recognize-off64_t-and-loff_t-definitions-of-mu.patch
|
2022-12-06 08:04:17 +00:00
|
|
|
f0744c01859e67deed404c97e1870b2876935fdc467e51980373744936574c314d5d21134734c5d515e7f3cd3483ef98045b9bbcd81c568c6038fac96ffb5fa0 0039-gcc-go-Use-int64-type-as-offset-argument-for-mmap.patch
|
2022-10-01 00:30:53 +00:00
|
|
|
d6dc1bfb881a313d167aaa5658790b0f55eea4336c408cfc6613dd5783440dafd0d37c43031a5f3e69be40f632e38371cd4fb6e5f0494ac4ea4d7d5025d2ae02 0041-go-gospec-forcibly-disable-fsplit-stack-support.patch
|
|
|
|
684c6a6d52512b973429b6e709966439ac1e174f9e79a33d4a638b452245b457b34752b4b4034ba983f6a712f86522e7adf715bab00a6603f64a12139c5b1e39 0042-gcc-go-fix-build-error-with-SYS_SECCOMP.patch
|
2022-08-13 15:17:36 +00:00
|
|
|
25014dfa99d96ee70ce0ad22e9f7974f0a51cc50b3b9c2db49df50774c8cd29e497ceed120486bee50be83bfb07f2009ed310eb9b0543f2795bd7359b87eadd2 0043-libstdc-do-not-throw-exceptions-for-non-C-locales-on.patch
|
|
|
|
75fd83ac05ab0a08d5f48547b08810f9934209bc78b5db59d65f33887b382af7ec24d8a29d40f86325c05af40c1ae1ec6466c839f646af90afc895a13073d07b 0044-gdc-unconditionally-link-libgphobos-against-libucont.patch
|
|
|
|
13e047153076d6e1fc40c9f5b6bfe5699c0e5460248f3d2b35ae36677cb960525af7b0b025997e5000a8492cec5e77a86828d66b4058c0d7f89fde0ab3890142 0045-druntime-link-against-libucontext-on-all-platforms.patch
|
2022-10-01 00:30:53 +00:00
|
|
|
c33ca2553642c2dbd1c65cd97046548f08775785a3db06d761e3bbe61398c37bc382fe132c0c3fa2101dfd4eea2a6d48bf4fae899a0ddb811c81abd7be35c122 0049-libgo-adjust-name-of-union-in-sigevent-struct.patch
|
2022-08-13 15:17:36 +00:00
|
|
|
179cd15d629884a66e954fd76066675efa594686b970facbb12ad50769e5d70b5530d7f61e77120e26d1c3dfc701cfc5295f341f635db998df73c41bc8e62172 0050-libphobos-don-t-define-__mode_t-twice-on-musl-target.patch
|
2022-10-01 00:30:53 +00:00
|
|
|
c82d7c8d340a76df3d796565a79b0ccc04ddffef39927620e1f3719bf2dc1db101ba13aef24b46c5bc95b7bf1e31c8bda4ab0936ba4c9c5e5047ba08826c982c 0051-libgo-Explicitly-define-SYS_timer_settime-for-32-bit.patch
|
2022-08-13 15:17:36 +00:00
|
|
|
eb403d8ea665fd5dc2c11faf43b055e6a3bf480a397ceee3e0ca1e38ec7d2392315f2694ed9a34ffbc99e464f2873fbbf91be8646ea4dea5d3636e3ea22fefa0 0052-libgnat-time_t-is-always-64-bit-on-musl-libc.patch
|
2022-10-01 00:30:53 +00:00
|
|
|
22fb6edf1ed0387e2b93839ffe6e82a7fee420950af90e91199c3488d966702fdeb1a3396d22be0c73a4051525da9349c93d070a0d83b724c83f2b268da6483f 0053-libgo-make-match.sh-POSIX-shell-compatible.patch
|
2022-11-02 14:27:11 +00:00
|
|
|
9b74d0a0e4140b597708a295bcf51b93944782698470e2ba9bc0f0d4a830fc418da9624eccc85f3d65ff6d50b8ebf40cecd34d5b045db9e6c29614e981e93f92 0054-libphobos-fix-undefined-reference-to-__cmsg_nxthdr-w.patch
|
2021-06-25 14:39:45 +00:00
|
|
|
"
|