1
0
Fork 0
mirror of https://github.com/pygos/build.git synced 2024-11-15 07:57:11 +01:00
build/pkg/tc-gcc1/build
David Oberhollenzer 87f661ff6c Bump gcc version
Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
2019-07-07 14:31:46 +02:00

64 lines
1.8 KiB
Text
Executable file

VERSION="9.1.0"
SRCDIR="gcc-$VERSION"
TARBALL="gcc-$VERSION.tar.xz"
URL="http://ftp.gnu.org/gnu/gcc/gcc-$VERSION"
SHA256SUM="79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0"
DEPENDS="tc-binutils linux-dev fortify-headers"
prepare() {
apply_patches
#
# XXX: if you ever add support for another 64 bit processor,
# you need to patch this.
#
# Fixup multilib configuration to install libraries
# into /lib instead of /lib64
#
for subdir in "i386/t-linux64" "aarch64/t-aarch64-linux"; do
sed -e 's/lib64/lib/g' \
-i "$PKGSRCDIR/$SRCDIR/gcc/config/$subdir"
done
./contrib/download_prerequisites --verify --sha512
}
build() {
local extra="--disable-libssp"
if [ "x$TC_HARDENING" = "xyes" ]; then
extra="$extra --enable-default-pie"
extra="$extra --enable-default-ssp"
fi
$1/configure --prefix="$TCDIR" --target="$TARGET" \
--build="$HOSTTUPLE" --host="$HOSTTUPLE" \
--with-sysroot="$TCDIR/$TARGET" \
--disable-nls --disable-shared --without-headers \
--disable-multilib --disable-decimal-float \
--disable-libgomp --disable-libmudflap \
--disable-libatomic \
--disable-libquadmath --disable-threads \
--enable-languages=c --with-newlib \
--with-as="$TCDIR/bin/$TARGET-as" \
--with-ld="$TCDIR/bin/$TARGET-ld" \
--with-arch="$GCC_CPU" $extra $GCC_EXTRACFG
make -j $NUMJOBS all-gcc all-target-libgcc
}
deploy() {
make install-gcc install-target-libgcc
touch "$PKGDEPLOYDIR/$PKGNAME.files"
cat > "$PKGDEPLOYDIR/$PKGNAME.desc" <<_EOF
requires tc-binutils linux-dev fortify-headers
_EOF
}
check_update() {
curl --silent -L "http://ftp.gnu.org/gnu/gcc" | \
grep -o ">gcc-[0-9.]*/<" | \
sed 's/>gcc-//g' | sed 's/\/<//g' | \
verson_find_greatest "$VERSION"
}