altcross.sh: automatically figure out GCC version

This commit is contained in:
Алексей Шепляков 2022-06-05 19:48:06 +04:00
parent 8de5f7662d
commit 4b07931525

View File

@ -2,19 +2,21 @@
set -e
set -x
KERNEL_VERSION='5.10'
BINUTILS_VERSION='2.35.2'
GCC_VERSION='10.3.1-20210703'
GLIBC_VERSION='2.32-alt4'
TARGET=aarch64-linux-gnu
KERNEL_SOURCE="`find /usr/src/kernel/sources -type f -name 'kernel-source-*.tar'`"
BINUTILS_SOURCE="`find /usr/src/binutils-source -type f -name 'binutils-*.tar'`"
GCC_SOURCE="`find /usr/src/gcc-source -type f -name 'gcc-*.tar'`"
GLIBC_SOURCE="`find /usr/src/glibc-source -type f -name 'glibc-*.tar'`"
getversion() {
local fname="${1##*/}"
local bname="${fname%.tar*}"
local ver="${bname#*-}"
echo "$ver"
}
TARGET=aarch64-linux-gnu
GCC_VERSION=`getversion $GCC_SOURCE`
GCC_MAJOR_VERSION="${GCC_VERSION%%.*}"
BUILDDIR="`pwd`/build"