Browse Source

d/gcc-arm-none-eabi: Upgraded to gcc-arm-none-eabi-9.2019.q4.

current-20191101
Damien Goutte-Gattat 2 years ago
parent
commit
8d813e9a82
  1. 1
      d/gcc-arm-none-eabi/gcc-6.3.1svn253039.tar.xz.sha256
  2. 1
      d/gcc-arm-none-eabi/gcc-arm-none-eabi-9-2019-q4-major-src.tar.bz2.sha256
  3. 63
      d/gcc-arm-none-eabi/gcc-arm-none-eabi-9.2019.q4-fix-lib64.patch
  4. 111
      d/gcc-arm-none-eabi/gcc-arm-none-eabi.SlackBuild
  5. 6
      d/gcc-arm-none-eabi/slack-desc

1
d/gcc-arm-none-eabi/gcc-6.3.1svn253039.tar.xz.sha256

@ -1 +0,0 @@
6f940fdd70fbfe9452177a773cb3f0c144a72ead29943719f55d90c0f44bc578 gcc-6.3.1svn253039.tar.xz

1
d/gcc-arm-none-eabi/gcc-arm-none-eabi-9-2019-q4-major-src.tar.bz2.sha256

@ -0,0 +1 @@
f162a655f222319f75862d7aba9ff8a4a86f752392e4f3c5d9ef2ee8bc13be58 gcc-arm-none-eabi-9-2019-q4-major-src.tar.bz2

63
d/gcc-arm-none-eabi/gcc-arm-none-eabi-9.2019.q4-fix-lib64.patch

@ -0,0 +1,63 @@
--- build-toolchain.sh.orig 2019-12-01 20:23:47.343296070 +0000
+++ build-toolchain.sh 2019-12-01 23:13:44.050937974 +0000
@@ -272,7 +272,8 @@
pushd $BUILDDIR_NATIVE/gcc-first
$SRCDIR/$GCC/configure --target=$TARGET \
--prefix=$INSTALLDIR_NATIVE \
- --libexecdir=$INSTALLDIR_NATIVE/lib \
+ --libexecdir=$INSTALLDIR_NATIVE/libexec \
+ --libdir=$INSTALLDIR_NATIVE/lib64 \
--infodir=$INSTALLDIR_NATIVE_DOC/info \
--mandir=$INSTALLDIR_NATIVE_DOC/man \
--htmldir=$INSTALLDIR_NATIVE_DOC/html \
@@ -308,7 +309,7 @@
pushd $INSTALLDIR_NATIVE
rm -rf bin/arm-none-eabi-gccbug
-rm -rf ./lib/libiberty.a
+rm -rf ./lib64/libiberty.a
rm -rf include
popd
@@ -323,6 +324,7 @@
$NEWLIB_CONFIG_OPTS \
--target=$TARGET \
--prefix=$INSTALLDIR_NATIVE \
+ --libdir=$INSTALLDIR_NATIVE/lib64 \
--infodir=$INSTALLDIR_NATIVE_DOC/info \
--mandir=$INSTALLDIR_NATIVE_DOC/man \
--htmldir=$INSTALLDIR_NATIVE_DOC/html \
@@ -392,7 +394,8 @@
$SRCDIR/$GCC/configure --target=$TARGET \
--prefix=$INSTALLDIR_NATIVE \
- --libexecdir=$INSTALLDIR_NATIVE/lib \
+ --libexecdir=$INSTALLDIR_NATIVE/libexec \
+ --libdir=$INSTALLDIR_NATIVE/lib64 \
--infodir=$INSTALLDIR_NATIVE_DOC/info \
--mandir=$INSTALLDIR_NATIVE_DOC/man \
--htmldir=$INSTALLDIR_NATIVE_DOC/html \
@@ -589,7 +592,7 @@
if [ "x$BUILD" == "xx86_64-apple-darwin10" ]; then
STRIP_BINARIES=$(find $INSTALLDIR_NATIVE/lib/gcc/arm-none-eabi/$GCC_VER/ -maxdepth 1 -name \* -perm +111 -and ! -type d)
else
- STRIP_BINARIES=$(find $INSTALLDIR_NATIVE/lib/gcc/arm-none-eabi/$GCC_VER/ -maxdepth 1 -name \* -perm /111 -and ! -type d)
+ STRIP_BINARIES=$(find $INSTALLDIR_NATIVE/libexec/gcc/arm-none-eabi/$GCC_VER/ -maxdepth 1 -name \* -perm /111 -and ! -type d)
fi
for bin in $STRIP_BINARIES ; do
strip_binary strip $bin
@@ -609,12 +612,12 @@
arm-none-eabi-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc $target_obj || true
done
-TARGET_LIBRARIES=$(find $INSTALLDIR_NATIVE/lib/gcc/arm-none-eabi/$GCC_VER -name \*.a)
+TARGET_LIBRARIES=$(find $INSTALLDIR_NATIVE/lib64/gcc/arm-none-eabi/$GCC_VER -name \*.a)
for target_lib in $TARGET_LIBRARIES ; do
arm-none-eabi-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc $target_lib || true
done
-TARGET_OBJECTS=$(find $INSTALLDIR_NATIVE/lib/gcc/arm-none-eabi/$GCC_VER -name \*.o)
+TARGET_OBJECTS=$(find $INSTALLDIR_NATIVE/lib64/gcc/arm-none-eabi/$GCC_VER -name \*.o)
for target_obj in $TARGET_OBJECTS ; do
arm-none-eabi-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc $target_obj || true
done

111
d/gcc-arm-none-eabi/gcc-arm-none-eabi.SlackBuild

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2018 Damien Goutte-Gattat
# Copyright (C) 2018,2019 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -22,19 +22,18 @@
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest gcc sourcecode is available at: <http://sourceware.org/>.
#
# Depends: d/newlib-arm-none-eabi
# Latest gcc sourcecode is available at:
# <https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm>.
# Source package infos
NAMESRC=${NAMESRC:-gcc}
VERSION=${VERSION:-6.3.1}
REVISION=${REVISION:-253039}
ARCHIVE=${ARCHIVE:-$NAMESRC-${VERSION}svn$REVISION.tar.xz}
REPOURL=${REPOURL:-svn://gcc.gnu.org/svc/gcc/branches/ARM/embedded-6-branch}
NAMESRC=${NAMESRC:-gcc-arm-none-eabi}
VERSION=${VERSION:-9-2019-q4}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION-major-src.tar.bz2}
WGET=${WGET:-https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-gcc-arm-none-eabi}
VERSIONPKG=${VERSION//-/.}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
@ -62,85 +61,37 @@ if [ ! -d $TMP ]; then
fi
# Get and verify the source archive
NAME=gcc-${VERSION}svn$REVISION
if [ ! -r $ARCHIVE ]; then
svn co $REPOURL@$REVISION $NAME
tar -c --xz \
--exclude=".svn" \
--exclude="libffi" \
--exclude="libgomp" \
--exclude="libquadmath" \
--exclude="libssp" \
--exclude="libada" \
--exclude="libgfortran" \
--exclude="libcilkrts" \
--exclude="libgo" \
--exclude="libjava" \
--exclude="zlib" \
--exclude="gcc/testsuite/ada" \
--exclude="gcc/testsuite/gfortran.dg" \
--exclude="gcc/testsuite/gfortran.fortran-torture" \
--exclude="gcc/testsuite/go.dg" \
--exclude="gcc/testsuite/go.go-torture" \
--exclude="gcc/testsuite/go.test" \
--exclude="gcc/testsuite/objc" \
--exclude="gcc/testsuite/obj-c++.dg" \
--exclude="gcc/testsuite/objc.dg" \
--exclude="gcc/testsuite/objc-obj-c++-shared" \
--exclude="gcc/ada/doc" \
-f $NAME.tar.xz $NAME
rm -rf $NAME
wget -O "$ARCHIVE.part" $WGET
mv $ARCHIVE.part $ARCHIVE
fi
sha256sum -c $ARCHIVE.sha256
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Compile 2nd stage GCC
# Compile
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
mkdir buildgcc && cd buildgcc
../$NAME/configure \
--prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX \
--build=$ARCH-slackware-linux \
--target=arm-none-eabi \
--with-sysroot=/usr/arm-none-eabi \
--enable-languages=c,c++ \
--enable-plugins \
--disable-decimal-float \
--disable-libffi \
--disable-libgomp \
--disable-libmudflap \
--disable-libquadmath \
--disable-libssp \
--disable-libstdcxx-pch \
--disable-nls \
--disable-shared \
--disable-threads \
--disable-tls \
--with-gnu-as \
--with-gnu-ld \
--with-newlib \
--with-headers=yes \
--with-python-dir=share/gcc-arm-none-eabi
make -j $JOBS INHIBIT_LIBC_CFLAGS="-DUSE_TM_CLONE_REGISTRY=0"
make install DESTDIR=$PKG
rmdir $PKG/usr/include
rm $PKG/usr/lib$LIBDIRSUFFIX/libcc1.*
# Strip binaries
find $PKG/usr/bin | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null
# Remove man and info pages
rm -rf $PKG/usr/share/{man,info}
cd $NAME
# On x86_64, make sure everything is installed in lib64
if [ "x$ARCH" = xx86_64 ] ; then
patch < $CWD/gcc-arm-none-eabi-9.2019.q4-fix-lib64.patch
fi
unset TERMCAP
./install-sources.sh --skip_steps=mingw32
./build-prerequisites.sh --skip_steps=mingw32
./build-toolchain.sh --skip_steps=mingw32,howto,manual
# Copy slack-desc file
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
# Now move everything into a staging tree
mkdir -p $PKG
mv install-native $PKG/usr
rm -f $PKG/usr/lib$LIBDIRSUFFIX/libcc1.so*
rm -rf $PKG/usr/share/doc
# Add dependency infos
cat <<EOF > $PKG/install/slack-required
newlib-arm-none-eabi
EOF
# Install doc files
mkdir -p $PKG/usr/doc/$NAME $PKG/install
install -m 644 license.txt readme.txt release.txt $PKG/usr/doc/$NAME
install -m 644 $CWD/slack-desc $PKG/install
# Package the tree
cd $PKG
@ -149,7 +100,7 @@ PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME $TMP/buildgcc
rm -rf $TMP/$NAME
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot

6
d/gcc-arm-none-eabi/slack-desc

@ -1,10 +1,10 @@
|-----handy-ruler-----------------------------------------------------|
gcc-arm-none-eabi: gcc-arm-none-eabi (GCC compiler for ARM)
gcc-arm-none-eabi: gcc-arm-none-eabi (GCC toolchain for ARM)
gcc-arm-none-eabi:
gcc-arm-none-eabi: GCC is the GNU Compiler Collection.
gcc-arm-none-eabi:
gcc-arm-none-eabi: this package contains those parts of the compiler collection needed
gcc-arm-none-eabi: to compile C and C++ code for the ARM architecture.
gcc-arm-none-eabi: This package contains a complete GCC-based toolchain needed to
gcc-arm-none-eabi: compile C and C++ code for the ARM architecture.
gcc-arm-none-eabi:
gcc-arm-none-eabi:
gcc-arm-none-eabi:

Loading…
Cancel
Save