summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in1
-rw-r--r--config/binutils/binutils.in7
-rw-r--r--config/cc/gcc.in18
-rw-r--r--config/companion_libs/cloog.in9
-rw-r--r--config/companion_libs/isl.in43
-rw-r--r--config/debug/gdb.in25
-rw-r--r--configure.ac22
-rw-r--r--kconfig/Makefile3
-rw-r--r--kconfig/zconf.gperf2
-rw-r--r--scripts/build/binutils/binutils.sh20
-rw-r--r--scripts/build/cc/100-gcc.sh36
-rw-r--r--scripts/build/debug/300-gdb.sh31
-rw-r--r--scripts/build/libc/glibc.sh21
-rw-r--r--scripts/build/libc/newlib.sh21
-rw-r--r--scripts/functions34
15 files changed, 191 insertions, 102 deletions
diff --git a/Makefile.in b/Makefile.in
index 16ab72a..4fb85bb 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -69,6 +69,7 @@ export objdump := @OBJDUMP@
export readelf := @READELF@
export patch := @PATCH@
export gperf := @GPERF@
+export gperf_len_type := @GPERF_LEN_TYPE@
export CC := @CC@
export CPP := @CPP@
export CPPFLAGS := @CPPFLAGS@
diff --git a/config/binutils/binutils.in b/config/binutils/binutils.in
index 7d9ab04..59eb6f8 100644
--- a/config/binutils/binutils.in
+++ b/config/binutils/binutils.in
@@ -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
diff --git a/config/cc/gcc.in b/config/cc/gcc.in
index 7808241..e0c4875 100644
--- a/config/cc/gcc.in
+++ b/config/cc/gcc.in
@@ -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
diff --git a/config/companion_libs/cloog.in b/config/companion_libs/cloog.in
index dcac30d..d6e129d 100644
--- a/config/companion_libs/cloog.in
+++ b/config/companion_libs/cloog.in
@@ -1,31 +1,32 @@
# CLooG options
+# CLooG 0.18.4 requires ISL 0.12 or newer
+# CLooG 0.18.1/0.18.0 frequires ISL 0.12 or older
choice
bool
prompt "CLooG version"
-if ISL
-
# Don't remove next line
# CT_INSERT_VERSION_BELOW
config CLOOG_V_0_18_4
bool
prompt "0.18.4"
+ depends on ISL_V_0_12_or_later
select CLOOG_0_18_4_or_later
config CLOOG_V_0_18_1
bool
prompt "0.18.1"
+ depends on !ISL_V_0_14_or_later
select CLOOG_0_18_or_later
config CLOOG_V_0_18_0
bool
prompt "0.18.0"
+ depends on !ISL_V_0_14_or_later
select CLOOG_0_18_or_later
-endif # ISL
-
endchoice
config CLOOG_VERSION
diff --git a/config/companion_libs/isl.in b/config/companion_libs/isl.in
index 0584764..f1af3a0 100644
--- a/config/companion_libs/isl.in
+++ b/config/companion_libs/isl.in
@@ -1,39 +1,69 @@
# ISL options
+# GCC 4.8 supports ISL 0.10 to 0.14
+# GCC 4.9 supports ISL 0.10 to 0.15
+# GCC 5 supports ISL 0.12 to 0.16
+# GCC 6 supports ISL 0.14 to 0.16
+# Starting with GCC 5, GCC's configure no longer checks the ISL version explicitly,
+# despite what the configure's message says ("checking for isl 0.15 or 0.16").
+# Instead, it verifies that certain interfaces are available, so it accepts 0.17.1
+# or 0.18 under that check. Include them as experimental just in case anyone needs
+# the bugfixes in these releases.
choice
bool
prompt "ISL version"
# Don't remove next line
# CT_INSERT_VERSION_BELOW
+config ISL_V_0_18
+ bool
+ prompt "0.18"
+ depends on EXPERIMENTAL # Not officially recommended by GCC
+ depends on CC_GCC_5_or_later
+ select ISL_V_0_16_or_later
+
+config ISL_V_0_17_1
+ bool
+ prompt "0.17.1"
+ depends on EXPERIMENTAL # Not officially recommended by GCC
+ depends on CC_GCC_5_or_later
+ select ISL_V_0_16_or_later
+
config ISL_V_0_16_1
bool
prompt "0.16.1"
- depends on CLOOG_0_18_4_or_later || CC_GCC_5_or_later
+ depends on CC_GCC_5_or_later
select ISL_V_0_16_or_later
+config ISL_V_0_15
+ bool
+ prompt "0.15"
+ select ISL_V_0_15_or_later
+
config ISL_V_0_14
bool
prompt "0.14"
- depends on CLOOG_0_18_4_or_later || CC_GCC_5_or_later
select ISL_V_0_14_or_later
config ISL_V_0_12_2
bool
prompt "0.12.2"
- depends on ! CLOOG_0_18_4_or_later || CC_GCC_5_or_later
+ depends on !CC_GCC_6_or_later
select ISL_V_0_12_or_later
config ISL_V_0_11_1
bool
prompt "0.11.1"
- depends on ! CLOOG_0_18_4_or_later
- depends on ! CC_GCC_5_or_later
+ depends on !CC_GCC_4_9_or_later
endchoice
config ISL_V_0_16_or_later
bool
+ select ISL_V_0_15_or_later
+
+config ISL_V_0_15_or_later
+ bool
select ISL_V_0_14_or_later
config ISL_V_0_14_or_later
@@ -47,7 +77,10 @@ config ISL_VERSION
string
# Don't remove next line
# CT_INSERT_VERSION_STRING_BELOW
+ default "0.18" if ISL_V_0_18
+ default "0.17.1" if ISL_V_0_17_1
default "0.16.1" if ISL_V_0_16_1
+ default "0.15" if ISL_V_0_15
default "0.14" if ISL_V_0_14
default "0.12.2" if ISL_V_0_12_2
default "0.11.1" if ISL_V_0_11_1
diff --git a/config/debug/gdb.in b/config/debug/gdb.in
index 2b33d33..0b39327 100644
--- a/config/debug/gdb.in
+++ b/config/debug/gdb.in
@@ -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
diff --git a/configure.ac b/configure.ac
index 492d315..76f0d30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -134,9 +134,9 @@ AS_IF([test -z "$CC"],
AC_PROG_CPP
#---------------------------------------------------------------------
-# Check to see if gcc can static link
-AC_MSG_CHECKING([if gcc can static link])
-echo "int main() {}" | gcc -static -o /dev/null -xc - > /dev/null 2>&1
+# Check to see if the compiler can link statically
+AC_MSG_CHECKING([if $CC can static link])
+echo "int main() {}" | ${CC} -static -o /dev/null -xc - > /dev/null 2>&1
static_test=$?
AS_IF([test $static_test -eq 0],
[static_link=y
@@ -305,6 +305,22 @@ AC_CACHE_CHECK([for GNU automake >= 1.10], [ac_cv_path_automake],
AC_MSG_ERROR([could not find GNU automake >= 1.10])])])
AC_SUBST([automake], [$ac_cv_path_automake])
+#----------------------------------------
+# Gperf 3.1 started generating functions with size_t rather than unsigned int
+AC_MSG_CHECKING([for the type used in gperf declarations])
+echo "#include <string.h>" > conftest.gperf.c
+echo "const char * in_word_set(const char *, GPERF_LEN_TYPE);" >> conftest.gperf.c
+echo foo,bar | ${GPERF} -L ANSI-C >> conftest.gperf.c
+AS_IF([${CC} -c -o /dev/null conftest.gperf.c -DGPERF_LEN_TYPE='size_t' >/dev/null 2>&1],
+ [AC_MSG_RESULT([size_t])
+ GPERF_LEN_TYPE='size_t'],
+ [${CC} -c -o /dev/null conftest.gperf.c -DGPERF_LEN_TYPE='unsigned int' >/dev/null 2>&1],
+ [AC_MSG_RESULT([unsigned int])
+ GPERF_LEN_TYPE='unsigned int'],
+ [AC_MSG_ERROR([unable to determine gperf len type])])
+rm -f conftest.gperf.c
+AC_SUBST([GPERF_LEN_TYPE])
+
#--------------------------------------------------------------------
# Boring again... But still a bit of work to do...
#--------------------------------------------------------------------
diff --git a/kconfig/Makefile b/kconfig/Makefile
index 9f30566..ee838aa 100644
--- a/kconfig/Makefile
+++ b/kconfig/Makefile
@@ -6,7 +6,8 @@ all: conf mconf nconf
@true # Just be silent, you fscking son of a fscking beach...
# Build flags
-CFLAGS = -DCONFIG_=\"CT_\" -DPACKAGE="\"crosstool-NG $(VERSION)\""
+CFLAGS = -DCONFIG_=\"CT_\" -DPACKAGE="\"crosstool-NG $(VERSION)\"" \
+ -DGPERF_LEN_TYPE="$(gperf_len_type)"
LDFLAGS = $(INTL_LIBS)
# Compiler flags to use gettext
diff --git a/kconfig/zconf.gperf b/kconfig/zconf.gperf
index ac498f0..434483b 100644
--- a/kconfig/zconf.gperf
+++ b/kconfig/zconf.gperf
@@ -9,7 +9,7 @@
struct kconf_id;
-static const struct kconf_id *kconf_id_lookup(register const char *str, register unsigned int len);
+static const struct kconf_id *kconf_id_lookup(register const char *str, register GPERF_LEN_TYPE len);
%%
mainmenu, T_MAINMENU, TF_COMMAND
diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh
index 0e285b6..17ea138 100644
--- a/scripts/build/binutils/binutils.sh
+++ b/scripts/build/binutils/binutils.sh
@@ -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
diff --git a/scripts/build/cc/100-gcc.sh b/scripts/build/cc/100-gcc.sh
index 3daa407..214f208 100644
--- a/scripts/build/cc/100-gcc.sh
+++ b/scripts/build/cc/100-gcc.sh
@@ -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
diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh
index 3d3af7b..dabd81a 100644
--- a/scripts/build/debug/300-gdb.sh
+++ b/scripts/build/debug/300-gdb.sh
@@ -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
}
diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh
index 019dd90..3e2c88e 100644
--- a/scripts/build/libc/glibc.sh
+++ b/scripts/build/libc/glibc.sh
@@ -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
diff --git a/scripts/build/libc/newlib.sh b/scripts/build/libc/newlib.sh
index 100dc1a..0c0c2aa 100644
--- a/scripts/build/libc/newlib.sh
+++ b/scripts/build/libc/newlib.sh
@@ -13,15 +13,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
}
diff --git a/scripts/functions b/scripts/functions
index f687504..35b3872 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -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,