Merge pull request #525 from stilor/linaro-download-location

Fix Linaro download locations
This commit is contained in:
Alexey Neyman 2017-01-13 09:53:27 -08:00 committed by GitHub
commit cbb045ab33
9 changed files with 125 additions and 88 deletions

View File

@ -92,6 +92,12 @@ config BINUTILS_V_2_24
prompt "2.24"
select BINUTILS_2_24_or_later
config BINUTILS_LINARO_V_2_23_2
bool
prompt "linaro-2.23.2-2013.10-4"
select BINUTILS_2_23_2_or_later
depends on CC_BINUTILS_SHOW_LINARO
config BINUTILS_V_2_23_2
bool
prompt "2.23.2"
@ -109,6 +115,7 @@ config BINUTILS_VERSION
default "linaro-2.25.0-2015.01-2" if BINUTILS_LINARO_V_2_25
default "linaro-2.24.0-2014.11-2" if BINUTILS_LINARO_V_2_24
default "2.24" if BINUTILS_V_2_24
default "linaro-2.23.2-2013.10-4" if BINUTILS_LINARO_V_2_23_2
default "2.23.2" if BINUTILS_V_2_23_2
endif # ! BINUTILS_CUSTOM

View File

@ -71,25 +71,32 @@ choice
# Don't remove next line
# CT_INSERT_VERSION_BELOW
config CC_GCC_V_6_3_0
bool
prompt "6.3.0"
select CC_GCC_6
config CC_GCC_V_linaro_6_2
bool
prompt "linaro-6.2-2016.11"
depends on CC_GCC_SHOW_LINARO
select CC_GCC_6
config CC_GCC_V_5_4_0
bool
prompt "5.4.0"
select CC_GCC_5
config CC_GCC_V_linaro_5_2
config CC_GCC_V_linaro_5_3
bool
prompt "linaro-5.2-2015.11-2"
prompt "linaro-5.3-2016.05"
depends on CC_GCC_SHOW_LINARO
select CC_GCC_5
config CC_GCC_V_linaro_4_9
bool
prompt "linaro-4.9-2015.06"
prompt "linaro-4.9-2016.02"
depends on CC_GCC_SHOW_LINARO
select CC_GCC_4_9
@ -288,9 +295,10 @@ config CC_GCC_VERSION
# Don't remove next line
# CT_INSERT_VERSION_STRING_BELOW
default "6.3.0" if CC_GCC_V_6_3_0
default "linaro-6.2-2016.11" if CC_GCC_V_linaro_6_2
default "5.4.0" if CC_GCC_V_5_4_0
default "linaro-5.2-2015.11-2" if CC_GCC_V_linaro_5_2
default "linaro-4.9-2015.06" if CC_GCC_V_linaro_4_9
default "linaro-5.3-2016.05" if CC_GCC_V_linaro_5_3
default "linaro-4.9-2016.02" if CC_GCC_V_linaro_4_9
default "4.9.4" if CC_GCC_V_4_9_4
default "linaro-4.8-2015.06" if CC_GCC_V_linaro_4_8
default "4.8.5" if CC_GCC_V_4_8_5

View File

@ -115,11 +115,23 @@ config GDB_V_7_8
prompt "7.8"
select GDB_7_2_or_later
config GDB_V_linaro_7_7_1
bool
prompt "linaro-7.7.1-2014.06"
depends on DEBUG_GDB_SHOW_LINARO
select GDB_7_2_or_later
config GDB_V_7_7_1
bool
prompt "7.7.1"
select GDB_7_2_or_later
config GDB_V_linaro_7_7
bool
prompt "linaro-7.7-2014.05"
depends on DEBUG_GDB_SHOW_LINARO
select GDB_7_2_or_later
config GDB_V_7_7
bool
prompt "7.7"
@ -138,7 +150,7 @@ config GDB_V_7_6_1
config GDB_V_linaro_7_5
bool
prompt "linaro-7.5-2012.12-1"
prompt "linaro-7.5-2012.12"
depends on DEBUG_GDB_SHOW_LINARO
select GDB_7_2_or_later
@ -179,12 +191,6 @@ config GDB_V_7_3a
prompt "7.3a"
select GDB_7_2_or_later
config GDB_V_linaro_7_2
bool
prompt "linaro-7.2-2011.05-0"
depends on DEBUG_GDB_SHOW_LINARO
select GDB_7_2_or_later
config GDB_V_7_2a
bool
prompt "7.2a"
@ -247,11 +253,13 @@ config GDB_VERSION
default "linaro-7.8-2014.09" if GDB_V_linaro_7_8
default "7.8.1" if GDB_V_7_8_1
default "7.8" if GDB_V_7_8
default "linaro-7.7.1-2014.06-1" if GDB_V_linaro_7_7_1
default "7.7.1" if GDB_V_7_7_1
default "linaro-7.7-2014.05" if GDB_V_linaro_7_7
default "7.7" if GDB_V_7_7
default "linaro-7.6.1-2013.10" if GDB_V_linaro_7_6
default "7.6.1" if GDB_V_7_6_1
default "linaro-7.5-2012.12-1" if GDB_V_linaro_7_5
default "linaro-7.5-2012.12" if GDB_V_linaro_7_5
default "7.5.1" if GDB_V_7_5_1
default "linaro-7.4-2012.06" if GDB_V_linaro_7_4
default "7.4.1" if GDB_V_7_4_1
@ -259,7 +267,6 @@ config GDB_VERSION
default "linaro-7.3-2011.12" if GDB_V_linaro_7_3
default "7.3.1" if GDB_V_7_3_1
default "7.3a" if GDB_V_7_3a
default "linaro-7.2-2011.05-0" if GDB_V_linaro_7_2_2011_05_0
default "7.2a" if GDB_V_7_2a
default "7.1a" if GDB_V_7_1a
default "7.0.1a" if GDB_V_7_0_1a

View File

@ -8,16 +8,16 @@ do_binutils_get() {
CT_GetCustom "binutils" "${CT_BINUTILS_CUSTOM_VERSION}" \
"${CT_BINUTILS_CUSTOM_LOCATION}"
else
if echo ${CT_BINUTILS_VERSION} |grep -q linaro; then
YYMM=`echo ${CT_BINUTILS_VERSION} |cut -d- -f3 |sed -e 's,^..,,'`
CT_GetFile "binutils-${CT_BINUTILS_VERSION}" \
https://releases.linaro.org/${YYMM}/components/toolchain/binutils-linaro \
http://cbuild.validation.linaro.org/snapshots
else
CT_GetFile "binutils-${CT_BINUTILS_VERSION}" \
{http,ftp}://{ftp.gnu.org/gnu,ftp.kernel.org/pub/linux/devel}/binutils \
ftp://{sourceware.org,gcc.gnu.org}/pub/binutils/{releases,snapshots}
fi
case "${CT_BINUTILS_VERSION}" in
linaro-*)
CT_GetLinaro "binutils" "${CT_BINUTILS_VERSION}"
;;
*)
CT_GetFile "binutils-${CT_BINUTILS_VERSION}" \
{http,ftp}://{ftp.gnu.org/gnu,ftp.kernel.org/pub/linux/devel}/binutils \
ftp://{sourceware.org,gcc.gnu.org}/pub/binutils/{releases,snapshots}
;;
esac
fi
if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then

View File

@ -11,30 +11,18 @@ do_gcc_get() {
CT_GetCustom "gcc" "${CT_CC_GCC_CUSTOM_VERSION}" \
"${CT_CC_GCC_CUSTOM_LOCATION}"
else
# Account for the Linaro versioning
linaro_version="$( echo "${CT_CC_GCC_VERSION}" \
|sed -r -e 's/^linaro-//;' \
)"
linaro_series="$( echo "${linaro_version}" \
|sed -r -e 's/-.*//;' \
)"
# The official gcc hosts put gcc under a gcc/release/ directory,
# whereas the mirrors put it in the gcc/ directory.
# Also, Split out linaro mirrors, so that downloads happen faster.
if [ x"${linaro_version}" = x"${CT_CC_GCC_VERSION}" ]; then
CT_GetFile "gcc-${CT_CC_GCC_VERSION}" \
{http,ftp,https}://ftp.gnu.org/gnu/gcc/gcc-${CT_CC_GCC_VERSION} \
ftp://{gcc.gnu.org,sourceware.org}/pub/gcc/releases/gcc-${CT_CC_GCC_VERSION}
else
YYMM=`echo ${CT_CC_GCC_VERSION} |cut -d- -f3 |sed -e 's,^..,,'`
CT_GetFile "gcc-${CT_CC_GCC_VERSION}" \
"https://releases.linaro.org/components/toolchain/gcc-linaro/${linaro_version}" \
"https://releases.linaro.org/${YYMM}/components/toolchain/gcc-linaro/${linaro_series}" \
"http://launchpad.net/gcc-linaro/${linaro_series}/${linaro_version}/+download" \
http://cbuild.validation.linaro.org/snapshots
fi
case "${CT_CC_GCC_VERSION}" in
linaro-*)
CT_GetLinaro "gcc" "${CT_CC_GCC_VERSION}"
;;
*)
# The official gcc hosts put gcc under a gcc/release/ directory,
# whereas the mirrors put it in the gcc/ directory.
CT_GetFile "gcc-${CT_CC_GCC_VERSION}" \
{http,ftp,https}://ftp.gnu.org/gnu/gcc/gcc-${CT_CC_GCC_VERSION} \
ftp://{gcc.gnu.org,sourceware.org}/pub/gcc/releases/gcc-${CT_CC_GCC_VERSION}
;;
esac
fi # ! custom location
# Starting with GCC 4.3, ecj is used for Java, and will only be
# built if the configure script finds ecj.jar at the top of the

View File

@ -10,26 +10,17 @@ do_debug_gdb_get() {
CT_GetCustom "gdb" "${CT_GDB_CUSTOM_VERSION}" \
"${CT_GDB_CUSTOM_LOCATION}"
else
# Account for the Linaro versioning
linaro_version="$( echo "${CT_GDB_VERSION}" \
|sed -r -e 's/^linaro-//;' \
)"
linaro_series="$( echo "${linaro_version}" \
|sed -r -e 's/-.*//;' \
)"
if [ x"${linaro_version}" = x"${CT_GDB_VERSION}" ]; then
CT_GetFile "gdb-${CT_GDB_VERSION}" \
http://mirrors.kernel.org/sourceware/gdb \
{http,ftp,https}://ftp.gnu.org/pub/gnu/gdb \
ftp://{sourceware.org,gcc.gnu.org}/pub/gdb/releases
else
YYMM=`echo ${CT_GDB_VERSION} |cut -d- -f3 |sed -e 's,^..,,'`
CT_GetFile "gdb-${CT_GDB_VERSION}" \
"http://launchpad.net/gdb-linaro/${linaro_series}/${linaro_version}/+download" \
https://releases.linaro.org/${YYMM}/components/toolchain/gdb-linaro \
http://cbuild.validation.linaro.org/snapshots
fi
case "${CT_GDB_VERSION}" in
linaro-*)
CT_GetLinaro "gdb" "${CT_GDB_VERSION}"
;;
*)
CT_GetFile "gdb-${CT_GDB_VERSION}" \
http://mirrors.kernel.org/sourceware/gdb \
{http,ftp,https}://ftp.gnu.org/pub/gnu/gdb \
ftp://{sourceware.org,gcc.gnu.org}/pub/gdb/releases
;;
esac
fi
}

View File

@ -11,17 +11,16 @@ do_libc_get() {
CT_GetCustom "glibc" "${CT_LIBC_GLIBC_CUSTOM_VERSION}" \
"${CT_LIBC_GLIBC_CUSTOM_LOCATION}"
else
if echo ${CT_LIBC_VERSION} |grep -q linaro; then
# Linaro glibc releases come from regular downloads...
YYMM=`echo ${CT_LIBC_VERSION} |cut -d- -f3 |sed -e 's,^..,,'`
CT_GetFile "glibc-${CT_LIBC_VERSION}" \
https://releases.linaro.org/${YYMM}/components/toolchain/glibc-linaro \
http://cbuild.validation.linaro.org/snapshots
else
CT_GetFile "glibc-${CT_LIBC_VERSION}" \
{http,ftp,https}://ftp.gnu.org/gnu/glibc \
ftp://{sourceware.org,gcc.gnu.org}/pub/glibc/{releases,snapshots}
fi
case "${CT_LIBC_VERSION}" in
linaro-*)
CT_GetLinaro "glibc" "${CT_LIBC_VERSION}"
;;
*)
CT_GetFile "glibc-${CT_LIBC_VERSION}" \
{http,ftp,https}://ftp.gnu.org/gnu/glibc \
ftp://{sourceware.org,gcc.gnu.org}/pub/glibc/{releases,snapshots}
;;
esac
fi
return 0

View File

@ -17,15 +17,18 @@ do_libc_get() {
CT_GetCustom "newlib" "${CT_LIBC_NEWLIB_CUSTOM_VERSION}" \
"${CT_LIBC_NEWLIB_CUSTOM_LOCATION}"
else # ! custom location
if echo ${CT_LIBC_VERSION} |grep -q linaro; then
YYMM=`echo ${CT_LIBC_VERSION} |cut -d- -f3 |sed -e 's,^..,,'`
CT_GetFile "newlib-${CT_LIBC_VERSION}" ${libc_src} \
https://releases.linaro.org/${YYMM}/components/toolchain/newlib-linaro \
http://cbuild.validation.linaro.org/snapshots
else
CT_GetFile "newlib-${CT_LIBC_VERSION}" ${libc_src} \
http://mirrors.kernel.org/sources.redhat.com/newlib
fi
case "${CT_LIBC_VERSION}" in
linaro-*)
CT_GetLinaro "newlib" "${CT_LIBC_VERSION}"
;;
*)
# kernel.org mirror is outdated, keep last as a fallback
CT_GetFile "newlib-${CT_LIBC_VERSION}" \
ftp://sourceware.org/pub/newlib \
http://mirrors.kernel.org/sourceware/newlib \
http://mirrors.kernel.org/sources.redhat.com/newlib
;;
esac
fi # ! custom location
}

View File

@ -798,6 +798,40 @@ CT_GetFile() {
return 1
}
# Get a component from Linaro archives.
# Usage: CT_GetLinaro <component> <version>
CT_GetLinaro() {
local comp="$1"
local version="$2"
local linaro_version
local yyyymm_p
local yymm
local base
case "${version}" in
linaro-*)
linaro_version="${version#linaro-}"
;;
*)
CT_Abort "Version ${version} is not a Linaro package"
;;
esac
# Recent releases reside in top of the directory tree; older releases
# are moved into the archive. Subdirectories are named differently
# in archive!
# In archive, some URLs also contain base component version
# (e.g. "gcc-linaro/4.9") while some do not (e.g. just "newlib-linaro").
base="${linaro_version%%-*}"
# Strip base version, first two digits of the year and optional patchlevel
yymm="${linaro_version#*-??}"
yymm="${yymm%-*}"
CT_GetFile "${comp}-${version}" \
"https://releases.linaro.org/components/toolchain/${comp}-linaro/${linaro_version}" \
"https://releases.linaro.org/archive/${yymm}/components/toolchain/${comp}-linaro/${base}" \
"https://releases.linaro.org/archive/${yymm}/components/toolchain/${comp}-linaro"
}
# Checkout from CVS, and build the associated tarball
# The tarball will be called ${basename}.tar.bz2
# Prerequisite: either the server does not require password,