development/avr-gcc: Updated for version 10.2.0.

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
Matteo Bernardini 2021-01-17 14:05:55 +01:00 committed by Robby Workman
parent dbc7cbfdb3
commit 7fc671ae60
2 changed files with 33 additions and 23 deletions

View file

@ -8,13 +8,14 @@
# This file is placed in the public domain.
PRGNAM=avr-gcc
VERSION=${VERSION:-4.9.2}
VERSION=${VERSION:-10.2.0}
ISLVERSION=${ISLVERSION:-0.22}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@ -25,8 +26,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@ -42,21 +43,25 @@ fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf gcc-$VERSION avr-gcc-build-$VERSION
tar xvf $CWD/gcc-$VERSION.tar.bz2 || exit 1
mkdir avr-gcc-build-$VERSION
cd avr-gcc-build-$VERSION || exit 1
chown -R root:root .
mkdir -p $TMP/$PRGNAM $PKG $OUTPUT
cd $TMP/$PRGNAM
rm -rf $TMP/$PRGNAM/*
tar xvf $CWD/gcc-$VERSION.tar.xz
tar xvf $CWD/isl-$ISLVERSION.tar.bz2
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
cd gcc-$VERSION
ln -s ../isl-$ISLVERSION isl
mkdir ../avr-gcc-build-$VERSION
cd ../avr-gcc-build-$VERSION
export CFLAGS_FOR_TARGET="$SLKCFLAGS"
export CXXFLAGS_FOR_TARGET="$SLKCFLAGS"
CFLAGS_FOR_BUILD="$SLKCFLAGS" \
CXXFLAGS_FOR_BUILD="$SLKCFLAGS" \
../gcc-$VERSION/configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@ -71,11 +76,12 @@ CXXFLAGS_FOR_BUILD="$SLKCFLAGS" \
--disable-linker-build-id \
--disable-nls \
--disable-werror \
--enable-__cxa_atexit \
--disable-__cxa_atexit \
--enable-checking=release \
--enable-clocale=gnu \
--enable-cloog-backend=isl \
--enable-gnu-unique-object \
--enable-gnu-indirect-function \
--enable-gold \
--enable-languages=c,c++ \
--enable-ld=default \
@ -90,22 +96,24 @@ CXXFLAGS_FOR_BUILD="$SLKCFLAGS" \
--with-plugin-ld=ld.gold \
--with-system-zlib \
--with-dwarf2 \
--with-isl \
--program-prefix="avr-" \
--program-suffix="" \
--build=$ARCH-slackware-linux
make || exit 1
make install DESTDIR=$PKG || exit 1
make -j1 install DESTDIR=$PKG || exit 1
# Remove useless stuff
rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/libiberty.a
rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/libcc1.*
rm -rf $PKG/usr/info
rm -rf $PKG/usr/include
rm -rf $PKG/usr/share
rm -rf $PKG/usr/man/man7
rm -rf $PKG/usr/libexec/gcc/avr/$VERSION/install-tools
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;

View file

@ -1,8 +1,10 @@
PRGNAM="avr-gcc"
VERSION="4.9.2"
VERSION="10.2.0"
HOMEPAGE="http://www.gnu.org/software/gcc/"
DOWNLOAD="ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.9.2/gcc-4.9.2.tar.bz2"
MD5SUM="4df8ee253b7f3863ad0b86359cd39c43"
DOWNLOAD="ftp://ftp.gnu.org/pub/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.xz \
http://isl.gforge.inria.fr/isl-0.22.tar.bz2"
MD5SUM="e9fd9b1789155ad09bcf3ae747596b50 \
4e6b2a1dd20b2ac011730a24580ff7a9"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="avr-binutils"