Skip to content

Commit

Permalink
add gcc-arm-none-eabi-9-2019-q4-major source
Browse files Browse the repository at this point in the history
  • Loading branch information
vanbwodonk committed Feb 4, 2020
1 parent 725e975 commit aee26c2
Show file tree
Hide file tree
Showing 14 changed files with 677 additions and 657 deletions.
Binary file modified How-to-build-toolchain.pdf
Binary file not shown.
67 changes: 30 additions & 37 deletions build-common.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2011-2015, ARM Limited
# Copyright (c) 2011-2019, ARM Limited
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -50,10 +50,10 @@ copy_dir_clean() {
set +u
mkdir -p "$2"
(cd "$1" && tar cf - \
--exclude=CVS --exclude=.svn --exclude=.git --exclude=.pc \
--exclude="*~" --exclude=".#*" \
--exclude="*.orig" --exclude="*.rej" \
.) | (cd "$2" && tar xf -)
--exclude=CVS --exclude=.svn --exclude=.git --exclude=.pc \
--exclude="*~" --exclude=".#*" \
--exclude="*.orig" --exclude="*.rej" \
.) | (cd "$2" && tar xf -)
set -u
}

Expand All @@ -67,39 +67,29 @@ copy_dir_clean() {
pack_dir_clean() {
set +u
tar cjfh $3 \
--exclude=CVS --exclude=.svn --exclude=.git --exclude=.pc \
--exclude="*~" --exclude=".#*" \
--exclude="*.orig" --exclude="*.rej" $4 $5 $6 $7 $8 $9 ${10} \
-C $1 $2
--exclude=CVS --exclude=.svn --exclude=.git --exclude=.pc \
--exclude="*~" --exclude=".#*" \
--exclude="*.orig" --exclude="*.rej" $4 $5 $6 $7 $8 $9 ${10} \
-C $1 $2
set -u
}

# Clean all global shell variables except for those needed by build scripts
clean_env () {
set +u
local var_list
local var
var_list=`export|grep "^declare -x"|sed -e "s/declare -x //"|cut -d"=" -f1`
var_list=$(export | sed -e "s/declare -x //" | cut -d= -f1 | grep -E '[[:upper:]]+\b')

for var in $var_list ; do
case $var in
DEJAGNU|\
DISPLAY|\
HOME|\
LD_LIBRARY_PATH|\
LOGNAME|\
PATH|\
PWD|\
SHELL|\
SHLVL|\
TERM|\
USER|\
USERNAME|\
com.apple.*|\
XAUTHORITY)
case "$var" in
DEJAGNU | DISPLAY | HOME | LD_LIBRARY_PATH | LOGNAME | PATH | PWD | SHELL | SHLVL | TERM | USER | USERNAME | XAUTHORITY)
;;
com.apple.*)
;;
LSB_* | LSF_* | LS_* | EGO_* | HOSTTYPE | TMPDIR)
;;
*)
unset $var
unset "$var"
;;
esac
done
Expand Down Expand Up @@ -260,9 +250,9 @@ MPC_VER=1.0.3
ISL_VER=0.18
EXPAT_VER=2.1.1
LIBELF_VER=0.8.13
LIBICONV_VER=1.14
LIBICONV_VER=1.15
ZLIB_VER=1.2.8
PYTHON_WIN_VER=2.7.13
PYTHON_WIN_VER=2.7.7

BINUTILS=binutils
GCC=gcc
Expand Down Expand Up @@ -305,30 +295,33 @@ ZLIB_URL=http://www.zlib.net/fossils/$ZLIB_PACK
ENV_VAR_UPDATE_URL=http://nsis.sourceforge.net/mediawiki/images/a/ad/$ENV_VAR_UPDATE_PACK
PYTHON_WIN_URL=https://www.python.org/ftp/python/$PYTHON_WIN_VER/$PYTHON_WIN_PACK

TAR=tar
# Set variables according to real environment to make this script can run
# on Ubuntu and Mac OS X.
TAR=tar
uname_string=`uname | sed 'y/LINUXDARWIN/linuxdarwin/'`
host_arch=`uname -m | sed 'y/XI/xi/'`
if [ "x$uname_string" == "xlinux" ] ; then
BUILD="$host_arch"-linux-gnu
HOST_NATIVE="$host_arch"-linux-gnu
READLINK=readlink
#JOBS=`grep ^processor /proc/cpuinfo|wc -l`
JOBS=3
JOBS=2
GCC_CONFIG_OPTS_LCPP="--with-host-libstdcxx=-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm"
MD5="md5sum -b"
PACKAGE_NAME_SUFFIX=linux
PACKAGE_NAME_SUFFIX="${host_arch}-linux"
WGET="wget -q"
elif [ "x$uname_string" == "xdarwin" ] ; then
BUILD=x86_64-apple-darwin10
HOST_NATIVE=x86_64-apple-darwin10
READLINK=greadlink
# Disable parallel build for mac as we will randomly run into "Permission denied" issue.
JOBS=`sysctl -n hw.ncpu`
#JOBS=1
#JOBS=`sysctl -n hw.ncpu`
JOBS=1
GCC_CONFIG_OPTS_LCPP="--with-host-libstdcxx=-static-libgcc -Wl,-lstdc++ -lm"
MD5="md5 -r"
PACKAGE_NAME_SUFFIX=mac
#Redefine wget command to curl as MacOS does not have wget by default
WGET="curl -OLs"
else
error "Unsupported build system : $uname_string"
fi
Expand All @@ -346,9 +339,9 @@ if [ "${SCRIPT%%-*}" = "build" ]; then

stack_level=0

RELEASEDATE=`date +%Y%m%d`
release_year=${RELEASEDATE:0:4}
release_month=${RELEASEDATE:4:2}
RELEASEDATE=$(date +%Y%m%d)
release_year=$(date +%Y)
release_month=$(date +%m)
case $release_month in
01|02|03)
RELEASEVER=${release_year}-q1-update
Expand Down
65 changes: 40 additions & 25 deletions build-prerequisites.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#! /usr/bin/env bash
# Copyright (c) 2011-2015, ARM Limited
# Copyright (c) 2011-2019, ARM Limited
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -31,6 +31,10 @@ set -x
set -u
set -o pipefail

if [[ "$(uname)" != "Darwin" ]]; then
PS4='+$(date +%Y-%m-%d:%H:%M:%S) (${BASH_SOURCE}:${LINENO}): ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
fi

umask 022

exec < /dev/null
Expand All @@ -48,7 +52,7 @@ script_path=`cd $(dirname $0) && pwd -P`
usage ()
{
cat<<EOF
Usage: $0 [--skip_steps=...]
Usage: $(basename $0) [--skip_steps=...]
This script will build dependent libraries for GNU Tools Arm Embedded toolchain.
Expand All @@ -72,41 +76,55 @@ for ac_arg; do
--skip_steps=*)
skip_steps=`echo $ac_arg | sed -e "s/--skip_steps=//g" -e "s/,/ /g"`
;;
*)
--help|-h)
usage
exit 1
exit 1
;;
*)
usage
exit 1
;;
esac
done

if [ "x$skip_steps" != "x" ]; then
for ss in $skip_steps; do
case $ss in
mingw32)
skip_mingw32=yes
;;
*)
echo "Unknown build steps: $ss" 1>&2
usage
exit 1
;;
esac
done
for ss in $skip_steps; do
case $ss in
mingw32)
skip_mingw32=yes
;;
howto | package_sources | md5_checksum)
;;
*)
echo "Unknown build steps: $ss" 1>&2
usage
exit 1
;;
esac
done
fi

if [ "x$BUILD" == "xx86_64-apple-darwin10" ]; then
skip_mingw32=yes
fi

rm -rf $BUILDDIR_NATIVE && mkdir -p $BUILDDIR_NATIVE
rm -rf $INSTALLDIR_NATIVE && mkdir -p $INSTALLDIR_NATIVE
rm -rf "$BUILDDIR_NATIVE"
mkdir -p "$BUILDDIR_NATIVE"

rm -rf "$INSTALLDIR_NATIVE"
mkdir -p "$INSTALLDIR_NATIVE"

if [ "x$skip_mingw32" != "xyes" ] ; then
rm -rf $BUILDDIR_MINGW && mkdir -p $BUILDDIR_MINGW
rm -rf $INSTALLDIR_MINGW && mkdir -p $INSTALLDIR_MINGW
rm -rf "$BUILDDIR_MINGW"
mkdir -p "$BUILDDIR_MINGW"
rm -rf "$INSTALLDIR_MINGW"
mkdir -p "$INSTALLDIR_MINGW"
fi
rm -rf $PACKAGEDIR && mkdir -p $PACKAGEDIR

cd $SRCDIR
rm -rf "$PACKAGEDIR"
mkdir -p "$PACKAGEDIR"

cd "$SRCDIR"

echo Task [I-0] /$HOST_NATIVE/zlib/
rm -rf $BUILDDIR_NATIVE/zlib
Expand Down Expand Up @@ -211,9 +229,6 @@ make -j$JOBS
make install
popd

# for Raspberry Pi, always skip mingw32
exit 0

# skip building mingw32 toolchain if "--skip_mingw32" specified
if [ "x$skip_mingw32" == "xyes" ] ; then
exit 0
Expand Down
Loading

0 comments on commit aee26c2

Please sign in to comment.