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})"
|
|
|
|
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"
|
2019-02-26 12:22:07 +00:00
|
|
|
pkgver=8.3.0
|
2018-12-12 17:14:55 +00:00
|
|
|
[ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2"
|
|
|
|
[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross=""
|
|
|
|
[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target=""
|
|
|
|
|
|
|
|
pkgname="gcc-armv7"
|
2019-02-26 12:22:07 +00:00
|
|
|
pkgrel=0
|
2018-12-12 17:14:55 +00:00
|
|
|
pkgdesc="Stage2 cross-compiler for armv7"
|
|
|
|
url="http://gcc.gnu.org"
|
|
|
|
arch="x86_64"
|
|
|
|
license="GPL LGPL"
|
|
|
|
_gccrel=$pkgver-r$pkgrel
|
2019-04-30 17:12:56 +00:00
|
|
|
depends="isl binutils-armv7 mpc1"
|
2018-12-12 17:14:55 +00:00
|
|
|
makedepends_build="gcc g++ paxmark 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_OBJC:=true}
|
|
|
|
: ${LANG_GO:=true}
|
|
|
|
: ${LANG_FORTRAN:=true}
|
|
|
|
: ${LANG_ADA:=true}
|
|
|
|
|
|
|
|
LIBGOMP="false"
|
|
|
|
LIBGCC="false"
|
|
|
|
LIBATOMIC="false"
|
|
|
|
LIBITM="false"
|
|
|
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
|
|
|
|
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
|
|
|
_builddir="$srcdir/build-cross-native"
|
|
|
|
else
|
|
|
|
STRIP_FOR_TARGET=${CROSS_COMPILE}strip
|
|
|
|
_builddir="$srcdir/build"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Go needs {set,make,swap}context, unimplemented in musl
|
|
|
|
[ "$CTARGET_LIBC" = musl ] && LANG_GO=false
|
|
|
|
|
|
|
|
# libitm has TEXTRELs in ARM build, so disable for now
|
|
|
|
case "$CTARGET_ARCH" in
|
|
|
|
arm*) LIBITM=false ;;
|
|
|
|
mips*) LIBITM=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
|
|
|
|
|
|
|
|
_languages=c
|
|
|
|
if $LANG_CXX; then
|
|
|
|
_languages="$_languages,c++"
|
|
|
|
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::$CTARGET_ARCH gcc-gnat$_target:gnat"
|
|
|
|
_languages="$_languages,ada"
|
|
|
|
makedepends_build="$makedepends_build gcc-gnat gcc-gnat$_cross"
|
|
|
|
fi
|
|
|
|
makedepends="$makedepends_build $makedepends_host"
|
|
|
|
|
|
|
|
source="https://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.xz
|
|
|
|
002_all_default-relro.patch
|
|
|
|
003_all_default-fortify-source.patch
|
|
|
|
005_all_default-as-needed.patch
|
|
|
|
gcc-as-needed-gold.patch
|
|
|
|
gcc-as-needed-push-pop.patch
|
|
|
|
011_all_default-warn-format-security.patch
|
|
|
|
012_all_default-warn-trampolines.patch
|
|
|
|
013_all_default-ssp-fix.patch
|
|
|
|
020_all_msgfmt-libstdc++-link.patch
|
|
|
|
050_all_libiberty-asprintf.patch
|
|
|
|
051_all_libiberty-pic.patch
|
|
|
|
053_all_libitm-no-fortify-source.patch
|
|
|
|
090_all_pr55930-dependency-tracking.patch
|
|
|
|
0003-gcc-poison-system-directories.patch
|
|
|
|
|
|
|
|
203-libgcc_s.patch
|
|
|
|
205-nopie.patch
|
|
|
|
0002-posix_memalign.patch
|
|
|
|
0008-s390x-muslldso.patch
|
|
|
|
0010-ldbl128-config.patch
|
|
|
|
0012-static-pie.patch
|
|
|
|
|
|
|
|
libgcc-always-build-gcceh.a.patch
|
|
|
|
gcc-4.9-musl-fortify.patch
|
|
|
|
gcc-6.1-musl-libssp.patch
|
|
|
|
gcc-pure64.patch
|
|
|
|
|
|
|
|
fix-cxxflags-passing.patch
|
|
|
|
ada-shared.patch
|
|
|
|
ada-musl.patch
|
|
|
|
libgnarl-musl.patch
|
|
|
|
|
|
|
|
320-libffi-gnulinux.patch
|
|
|
|
|
|
|
|
gcc-pure64-mips.patch
|
2019-01-03 14:55:55 +00:00
|
|
|
0016-invalid_tls_model.patch
|
2018-12-12 17:14:55 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
# gcc-4.8-build-args.patch
|
|
|
|
|
|
|
|
# we build out-of-tree
|
|
|
|
_gccdir="$srcdir"/gcc-${_pkgbase:-$pkgver}
|
|
|
|
_gcclibdir=/usr/lib/gcc/${CTARGET}/$pkgver
|
|
|
|
_gcclibexec=/usr/libexec/gcc/${CTARGET}/$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 ${pkgver} > gcc/BASE-VER
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
local _arch_configure=
|
|
|
|
local _libc_configure=
|
|
|
|
local _bootstrap_configure=
|
|
|
|
local _symvers=
|
|
|
|
|
|
|
|
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";;
|
|
|
|
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
|
|
|
|
|
|
|
|
$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 ""
|
|
|
|
|
|
|
|
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 \
|
|
|
|
--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 \
|
|
|
|
-o -name libgij.a -o \
|
|
|
|
| xargs rm -f
|
|
|
|
|
|
|
|
# strip debug info from some static libs
|
|
|
|
${STRIP_FOR_TARGET} -g `find "$pkgdir" \( -name libgfortran.a -o -name libobjc.a -o -name libgomp.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`
|
|
|
|
|
|
|
|
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' | xargs rm -f
|
|
|
|
|
|
|
|
local gdblib=${_target:+$CTARGET/}lib
|
|
|
|
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
|
|
|
|
|
|
|
|
paxmark -pmrs "$pkgdir"/$_gcclibexec/cc1
|
|
|
|
|
|
|
|
# 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
|
|
|
|
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
|
|
|
|
fl="-std=c89"
|
|
|
|
for opt; do
|
|
|
|
case "$opt" in
|
|
|
|
-ansi|-std=c89|-std=iso9899:1990) fl="";;
|
|
|
|
-std=*) echo "$(basename $0) called with non ANSI/ISO C option $opt" >&2
|
|
|
|
exit 1;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
exec gcc $fl ${1+"$@"}
|
|
|
|
EOF
|
|
|
|
cat >"$pkgdir"/usr/bin/c99 <<'EOF'
|
|
|
|
#!/bin/sh
|
|
|
|
fl="-std=c99"
|
|
|
|
for opt; do
|
|
|
|
case "$opt" in
|
|
|
|
-std=c99|-std=iso9899:1999) fl="";;
|
|
|
|
-std=*) echo "$(basename $0) called with non ISO C99 option $opt" >&2
|
|
|
|
exit 1;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
exec gcc $fl ${1+"$@"}
|
|
|
|
EOF
|
|
|
|
chmod 755 "$pkgdir"/usr/bin/c?9
|
|
|
|
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=
|
|
|
|
|
|
|
|
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/"
|
|
|
|
paxmark -pmrs "$subpkgdir/$_gcclibexec/cc1plus"
|
|
|
|
|
|
|
|
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/
|
|
|
|
}
|
|
|
|
|
|
|
|
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"/$_gcclibdir/include \
|
|
|
|
"$subpkgdir"/usr/lib
|
|
|
|
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/
|
|
|
|
}
|
|
|
|
|
|
|
|
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"
|
|
|
|
|
|
|
|
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"/$_gcclibexec/go1 "$subpkgdir"/$_gcclibexec/
|
|
|
|
mv "$pkgdir"/usr/lib/libgo.a \
|
|
|
|
"$pkgdir"/usr/lib/libgo.so \
|
|
|
|
"$pkgdir"/usr/lib/libgobegin.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"/$_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/
|
|
|
|
}
|
|
|
|
|
|
|
|
gnat() {
|
|
|
|
pkgdesc="Ada support for GCC"
|
|
|
|
depends="gcc=$_gccrel"
|
|
|
|
[ "$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/
|
|
|
|
}
|
|
|
|
|
2019-02-26 12:22:07 +00:00
|
|
|
sha512sums="1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802 gcc-8.3.0.tar.xz
|
2018-12-12 17:14:55 +00:00
|
|
|
e36e95b81489163abd6fe9d58f7867bdca43e61143afacbfb17f4698c0b16ec5fd0061d8fab7b2ae615540bebd721c2e2227f80401b4e7fc253da9da62e6b513 002_all_default-relro.patch
|
|
|
|
f86466c62b8291fac46f9c250c7ad8fa5ab7b1cce2504442fd07ddc4543665b317ae28951f244e39aba29aeaf3fff252ec4f6a147aa16adb2b7aed747dd89188 003_all_default-fortify-source.patch
|
|
|
|
02b725b220e540077efef741e9d457f9e004fe53ae642a138e214875d076a60f7c2f27de0ed9a4225db2030fc9c3d2c5b0414c895b9eec0f5f48fad70e2fb029 005_all_default-as-needed.patch
|
|
|
|
6c9a5068f6eea8a85d297a3555b1d2333ffd4b9ddbfb7560a3e643f8577603871ca123373ef7f96e894225291d88f7bf575c7f8386bcfdd1dabcd7ba12598b65 gcc-as-needed-gold.patch
|
|
|
|
ab0df1862f1b645634e79b8101326ce53215eba39861a455cd145b81b5267a6a61bc6e76b32d53887a0a48873f7efc23e2c52cc04400c6afd89822f245cdbc77 gcc-as-needed-push-pop.patch
|
|
|
|
e026bf9f73ee254528423c6cabdfd7794960c567161581b7d4b7c61c45027e12a6efef79662d4288b9cbaecb4798f01af6a5b4a13b766c2d501444ac1846fd43 011_all_default-warn-format-security.patch
|
|
|
|
37de4cc9061bfe1963e6e6570e1a6bbfd58204bf90e0eef819882599a9a80ea28f3eb815c20c1f173dc25d4bd9971b7c7f7f9512d6f8f91f04de1e1175114d4d 012_all_default-warn-trampolines.patch
|
|
|
|
38a0fedeac3eebe4a6a957792ba520225cf42663c96a171cd168fdb6c91ffa9a56b80351f8238c5d03b78d3ae2a6539a54481fe4848b4a395e2c87f2ff7adc08 013_all_default-ssp-fix.patch
|
|
|
|
d35a3ac7e13a4446921a90e1ff3eec1079840c845f9d523c868e24ae21f94cf69ba041de5341ebef96432a6f57598e223381d4286e8fb8baaa25906707f29fbd 020_all_msgfmt-libstdc++-link.patch
|
|
|
|
840070a3c423e6206aaa6e63e1d9a0fcd6efd53626cd1240a193f0b60aa5d84216acc4a2a4fa8bce74549b07e6a316b01d638f20cea13dc62473491a302fb3d6 050_all_libiberty-asprintf.patch
|
|
|
|
0a0bc72b9366158f5d23fff1928e756fdd212433bac6ab1f00d632f241382820db8db5d475ddf11ea020eaf7e2e71b12fb9b1c3c870cf84adf6c2b16f15aabca 051_all_libiberty-pic.patch
|
|
|
|
e7a2eb1b1870e199d6fd753d065781575656fa12baa264f96c5d179689d88c31b8a3f92a5dae96088c05e96aa2bda138364ad7dbcc79e1819a102f192cbb7bab 053_all_libitm-no-fortify-source.patch
|
|
|
|
4a328d1e1a56c20166307edcfa322068915784d9c08025b7f81cf69714da48fc266b6d34f77b9135c2f10da830d9df408276a1b78d1fd218637c2823506593c2 090_all_pr55930-dependency-tracking.patch
|
|
|
|
3842bd2be3e53db34e59bfb2bd438b244fc3712055058b9e232e33345f0fab216256b79e364fbac335972dc599a1d74393704f0cd595f3f076dcc10883c85b28 0003-gcc-poison-system-directories.patch
|
|
|
|
d1c2d7ff7f673375dc7cd84ae9d8515853b5af6390c70bb763412c012101344e4ee1ce155151ce3fb6ba2b80af7ed42d697dbe1bf6fd6e7b2b9087a378c47c37 203-libgcc_s.patch
|
|
|
|
98473bcaa77903a223ca9b0d2087c0921b287a2816d308cc32c8fe009e6cbf5dd1ae7fba27794ab8d9c09e117fe534413d91a464d1218474fc123ce0adfdc2c1 205-nopie.patch
|
|
|
|
6d84354e6df96d5ea244eb3bb5f044781796b88040b11c78fb6ee509e5aac19d46e0e92ca836e98e6495d9751f52439833b748efc419e4f5d5301fb549c4dcc9 0002-posix_memalign.patch
|
|
|
|
7f434a7350c9b06d0ae7cc18a569d813238483afa34b0801d112844a0dfe6164ae36b0416955fd4da7a8caa54672247f319a8ec7ce4b6a97a5f4e17ec083112a 0008-s390x-muslldso.patch
|
|
|
|
66085c5555e6b91b6874d1782d5a1dc0ab1792889f9400f48cde9483f82b51b9e3a5de1efbba21a19fc5e664334f2188d0c2bc988d42335efa26118b3c85cc7f 0010-ldbl128-config.patch
|
|
|
|
45d5bc11a89e5af77503ca06eec52d6d84e6fea0be021aaee1bcc39f8dd3c7b4baa4200cfa2b0688faa0f207d005db89c029eff32f362207aa3d2365b2f2363e 0012-static-pie.patch
|
|
|
|
d08d7ead2de0429e5c9055d5b029ec2be9a8c821d22cecaf9b51f633652c493333f98963d9267fa2fa63850c50ae5eefd5f59e5910ec10d20044dac082182a8b libgcc-always-build-gcceh.a.patch
|
|
|
|
600fe5098dc54edaa9808fd5717af9dec058953f9ad37d49cfba1db4f7e9a7a8f02019342f75157fc575946fa693259422184de27b7ecc8386d9f3ecc0f7cc5d gcc-4.9-musl-fortify.patch
|
|
|
|
dbe0ee917fc7668571722364ab7c806731e3a31e8bfa30b4941b28b16b877d2a32b4a3897ef533399a28f82d43cac9b28e92de0493f0e779046db56584e07fa4 gcc-6.1-musl-libssp.patch
|
|
|
|
fa62556719449caec6b2b434355bfbcaa5ae55ffe017b3e1f827f66a2aae21b79c571ee7a4ce723ea69169bc3a6447e73650991a200cc372adf2f102677518d7 gcc-pure64.patch
|
|
|
|
35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch
|
|
|
|
3f5bc334d9f73d06f5f7c876738d02356acdd08958bea0e4d2095ebf15c2c2ec4e411abdae0297505ae9a1699ca01b17338e853184e84663203b192b0d35fc19 ada-shared.patch
|
|
|
|
50537add461714f44dc6a778e0c6d0e15d6a782591c8aff38d1fb559191ddac2b5ee14a43a3005b389fdf98d2e7468ff4e64c88ba024cf94f9fe0d9854b9e9c8 ada-musl.patch
|
|
|
|
a1f7750bc7b8b7d916a5dee34fcc736bd4fb249c96538b547d495794e6cfd49356aa3974506a15074b4cb58edd5d7e2868607c902dd003e8c464d5066fd4a575 libgnarl-musl.patch
|
|
|
|
f4ef08454e28c8732db69115e4998ec153399e8d229dd27f923dbdcf57b68128a65640d026cc7f45b58ba8764ab1eb575d4eb6d6dfc550a87a183f8b94e76181 320-libffi-gnulinux.patch
|
2019-01-03 14:55:55 +00:00
|
|
|
86be3338cc9c33089608bc4c5e3b7918c4e500a345c338f361b18c342119a6ed69af5495d72950de7106d760f003528b46ad14795e805f8a3331e206dcb234e3 gcc-pure64-mips.patch
|
|
|
|
8039d4081b77332694bc10f898d5e4da0ece4ce7b0e219fedb2aab965126b6b0537d03ba8652341c9c35af07eef33e96b42cc02388f36d8027b9475d44f6b420 0016-invalid_tls_model.patch"
|