mirror of
https://github.com/pygos/build.git
synced 2024-11-14 07:27:10 +01:00
David Oberhollenzer
c8d01f966a
Been working on this for too long, don't remember the specifics, will add documentation. Signed-off-by: David Oberhollenzer <goliath@infraroot.at>
75 lines
1.9 KiB
Text
Executable file
75 lines
1.9 KiB
Text
Executable file
VERSION="8.2.0"
|
|
SRCDIR="gcc-$VERSION"
|
|
TARBALL="gcc-$VERSION.tar.xz"
|
|
URL="http://ftp.gnu.org/gnu/gcc/gcc-$VERSION"
|
|
SHA256SUM="196c3c04ba2613f893283977e6011b2345d1cd1af9abeac58e916b1aab3e0080"
|
|
DEPENDS="tc-binutils tc-cloog tc-gmp tc-isl tc-mpc tc-mpfr 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
|
|
|
|
for child in cloog gmp isl mpc mpfr; do
|
|
include_pkg "tc-$child"
|
|
|
|
if [ ! -e "$child" ]; then
|
|
echo "installing symlink to $child..."
|
|
ln -s "$PKGSRCDIR/$SRCDIR" "$child"
|
|
else
|
|
if [ ! -L "$child" ]; then
|
|
echo "ERROR: $child " \
|
|
"exists but is not a symlink!"
|
|
exit 1
|
|
fi
|
|
fi
|
|
done
|
|
}
|
|
|
|
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-arch="$GCC_CPU" $extra $GCC_EXTRACFG
|
|
|
|
make -j $NUMJOBS all-gcc all-target-libgcc
|
|
}
|
|
|
|
deploy() {
|
|
make install-gcc install-target-libgcc
|
|
|
|
touch "$2/$PKGNAME.files"
|
|
cat > "$2/$PKGNAME.desc" <<_EOF
|
|
name $PKGNAME
|
|
_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"
|
|
}
|