diff options
author | Bryan Hundven <bryanhundven@gmail.com> | 2015-01-26 16:02:32 (GMT) |
---|---|---|
committer | Bryan Hundven <bryanhundven@gmail.com> | 2015-01-26 16:02:32 (GMT) |
commit | 0a6b755fea0385bc38d07cacc059258338b5be65 (patch) | |
tree | 97d3e802d87187bbae61c7c427a9303631dd8ace /scripts/build | |
parent | cf3fc4244ce0541c6fb671ff2004e83951be798d (diff) | |
parent | 42e6c434d7fb35860bb8e6a0303ffaf7d706d68d (diff) |
Merge pull request #24 from Christopher83/master
Add the support to choose, download and build latest Linaro toolchain components
Diffstat (limited to 'scripts/build')
-rw-r--r-- | scripts/build/binutils/binutils.sh | 13 | ||||
-rw-r--r-- | scripts/build/cc/gcc.sh | 25 | ||||
-rw-r--r-- | scripts/build/debug/300-gdb.sh | 30 | ||||
-rw-r--r-- | scripts/build/libc/eglibc.sh | 9 | ||||
-rw-r--r-- | scripts/build/libc/glibc.sh | 14 | ||||
-rw-r--r-- | scripts/build/libc/newlib.sh | 11 |
6 files changed, 68 insertions, 34 deletions
diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh index 1cc8739..813d3ce 100644 --- a/scripts/build/binutils/binutils.sh +++ b/scripts/build/binutils/binutils.sh @@ -8,9 +8,16 @@ do_binutils_get() { CT_GetCustom "binutils" "${CT_BINUTILS_VERSION}" \ "${CT_BINUTILS_CUSTOM_LOCATION}" else - CT_GetFile "binutils-${CT_BINUTILS_VERSION}" \ - ftp://{sourceware.org,gcc.gnu.org}/pub/binutils/{releases,snapshots} \ - {ftp,http}://{ftp.gnu.org/gnu,ftp.kernel.org/pub/linux/devel}/binutils + 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}" \ + ftp://{sourceware.org,gcc.gnu.org}/pub/binutils/{releases,snapshots} \ + {ftp,http}://{ftp.gnu.org/gnu,ftp.kernel.org/pub/linux/devel}/binutils + fi fi if [ -n "${CT_ARCH_BINFMT_FLAT}" ]; then diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index 40241c2..ed78aa1 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -6,30 +6,31 @@ do_cc_get() { local linaro_version="" local linaro_series="" - local linaro_base_url="http://launchpad.net/gcc-linaro" if [ "${CT_CC_CUSTOM}" = "y" ]; then CT_GetCustom "gcc" "${CT_CC_VERSION}" "${CT_CC_CUSTOM_LOCATION}" else # Account for the Linaro versioning linaro_version="$( echo "${CT_CC_VERSION}" \ - |sed -r -e 's/^linaro-//;' \ + |${sed} -r -e 's/^linaro-//;' \ )" linaro_series="$( echo "${linaro_version}" \ - |sed -r -e 's/-.*//;' \ + |${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. - CT_DoLog EXTRA "linaro_version: ${linaro_version} CT_CC_VERSION: ${CT_CC_VERSION}" + # 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_VERSION}" ]; then - CT_GetFile "gcc-${CT_CC_VERSION}" \ - ftp://{gcc.gnu.org,sourceware.org}/pub/gcc/releases/gcc-${CT_CC_VERSION} \ - {http,ftp,https}://ftp.gnu.org/gnu/gcc/gcc-${CT_CC_VERSION} + CT_GetFile "gcc-${CT_CC_VERSION}" \ + ftp://{gcc.gnu.org,sourceware.org}/pub/gcc/releases/gcc-${CT_CC_VERSION} \ + {http,ftp,https}://ftp.gnu.org/gnu/gcc/gcc-${CT_CC_VERSION} else - CT_GetFile "gcc-${CT_CC_VERSION}" \ - "${linaro_base_url}/${linaro_series}/${linaro_version}/+download" + YYMM=`echo ${CT_CC_VERSION} |cut -d- -f3 |${sed} -e 's,^..,,'` + CT_GetFile "gcc-${CT_CC_VERSION}" \ + "http://launchpad.net/gcc-linaro/${linaro_series}/${linaro_version}/+download" \ + https://releases.linaro.org/${YYMM}/components/toolchain/gcc-linaro/${linaro_series} \ + http://cbuild.validation.linaro.org/snapshots fi fi # ! custom location diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh index 149a2f8..8fed3d0 100644 --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -35,15 +35,6 @@ do_debug_gdb_parts() { do_debug_gdb_get() { local linaro_version="" local linaro_series="" - local linaro_base_url="http://launchpad.net/gdb-linaro" - - # 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/-.*//;' \ - )" do_debug_gdb_parts @@ -51,13 +42,24 @@ do_debug_gdb_get() { if [ "${CT_GDB_CUSTOM}" = "y" ]; then CT_GetCustom "gdb" "${CT_GDB_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}" \ - ftp://{sourceware.org,gcc.gnu.org}/pub/gdb/releases \ - {http,ftp,https}://ftp.gnu.org/pub/gnu/gdb + CT_GetFile "gdb-${CT_GDB_VERSION}" \ + ftp://{sourceware.org,gcc.gnu.org}/pub/gdb/releases \ + {http,ftp,https}://ftp.gnu.org/pub/gnu/gdb else - CT_GetFile "gdb-${CT_GDB_VERSION}" \ - "${linaro_base_url}/${linaro_series}/${linaro_version}/+download" + 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 fi fi diff --git a/scripts/build/libc/eglibc.sh b/scripts/build/libc/eglibc.sh index 1f1095f..704ef7c 100644 --- a/scripts/build/libc/eglibc.sh +++ b/scripts/build/libc/eglibc.sh @@ -16,6 +16,15 @@ do_libc_get() { local -a extra_addons local svn_base + if echo ${CT_LIBC_VERSION} |grep -q linaro; then + # Linaro eglibc releases come from regular downloads... + YYMM=`echo ${CT_LIBC_VERSION} |cut -d- -f3 |${sed} -e 's,^..,,'` + CT_GetFile "eglibc-${CT_LIBC_VERSION}" \ + https://releases.linaro.org/${YYMM}/components/toolchain/eglibc-linaro \ + http://cbuild.validation.linaro.org/snapshots + return + fi + if [ "${CT_EGLIBC_HTTP}" = "y" ]; then svn_base="http://www.eglibc.org/svn" else diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index 8093d94..971d326 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -23,9 +23,17 @@ do_libc_get() { CT_GetCustom "glibc" "${CT_LIBC_VERSION}" "${CT_LIBC_GLIBC_CUSTOM_LOCATION}" CT_LIBC_CUSTOM_LOCATION="${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}" 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} + if echo ${CT_LIBC_VERSION} |grep -q linaro; then + # Linaro eglibc 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 fi # C library addons diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh index 74785a6..9d42035 100644 --- a/scripts/build/libc/newlib.sh +++ b/scripts/build/libc/newlib.sh @@ -16,8 +16,15 @@ do_libc_get() { CT_GetCustom "newlib" "${CT_LIBC_VERSION}" \ "${CT_LIBC_NEWLIB_CUSTOM_LOCATION}" else # ! custom location - CT_GetFile "newlib-${CT_LIBC_VERSION}" ${libc_src} \ - http://mirrors.kernel.org/sources.redhat.com/newlib + 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 fi # ! custom location if [ "${CT_ATMEL_AVR32_HEADERS}" = "y" ]; then |