summaryrefslogtreecommitdiff
path: root/scripts/build/cc/gcc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build/cc/gcc.sh')
-rw-r--r--scripts/build/cc/gcc.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index ed78aa1..835aea0 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -23,8 +23,8 @@ do_cc_get() {
# 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}
+ {http,ftp,https}://ftp.gnu.org/gnu/gcc/gcc-${CT_CC_VERSION} \
+ ftp://{gcc.gnu.org,sourceware.org}/pub/gcc/releases/gcc-${CT_CC_VERSION}
else
YYMM=`echo ${CT_CC_VERSION} |cut -d- -f3 |${sed} -e 's,^..,,'`
CT_GetFile "gcc-${CT_CC_VERSION}" \
@@ -39,7 +39,9 @@ do_cc_get() {
# GCC source tree, which will not be there unless we get it and
# put it there ourselves
if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" ]; then
- CT_GetFile ecj-latest .jar ftp://gcc.gnu.org/pub/java \
+ CT_GetFile ecj-latest .jar http://mirrors.kernel.org/sourceware/java/ \
+ http://crosstool-ng.org/pub/java \
+ ftp://gcc.gnu.org/pub/java \
ftp://sourceware.org/pub/java
fi
}
@@ -490,7 +492,9 @@ do_cc_core_backend() {
# check whether compiler has an extension
file="$( ls -1 "${prefix}/bin/${CT_TARGET}-gcc."* 2>/dev/null || true )"
[ -z "${file}" ] || ext=".${file##*.}"
- CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}"
+ if [ -f "${prefix}/bin/${CT_TARGET}-gcc${ext}" ]; then
+ CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}"
+ fi
if [ "${CT_MULTILIB}" = "y" ]; then
if [ "${CT_CANADIAN}" = "y" -a "${mode}" = "baremetal" \
@@ -882,7 +886,9 @@ do_cc_backend() {
# check whether compiler has an extension
file="$( ls -1 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-gcc."* 2>/dev/null || true )"
[ -z "${file}" ] || ext=".${file##*.}"
- CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-cc${ext}"
+ if [ -f "${CT_PREFIX_DIR}/bin/${CT_TARGET}-gcc${ext}" ]; then
+ CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-cc${ext}"
+ fi
if [ "${CT_MULTILIB}" = "y" ]; then
if [ "${CT_CANADIAN}" = "y" ]; then