diff -r 712a8ed22762 -r 3662412ddd59 scripts/build/binutils/binutils.sh --- a/scripts/build/binutils/binutils.sh Tue Aug 07 14:03:03 2012 +0800 +++ b/scripts/build/binutils/binutils.sh Thu Oct 11 14:39:41 2012 +1000 @@ -4,13 +4,24 @@ # Download binutils do_binutils_get() { - CT_GetFile "binutils-${CT_BINUTILS_VERSION}" \ - {ftp,http}://{ftp.gnu.org/gnu,ftp.kernel.org/pub/linux/devel}/binutils \ - ftp://gcc.gnu.org/pub/binutils/{releases,snapshots} + if [ "${CT_BINUTILS_CUSTOM}" = "y" ]; then + CT_GetCustom "binutils" "${CT_BINUTILS_VERSION}" \ + "${CT_BINUTILS_CUSTOM_LOCATION}" + else + CT_GetFile "binutils-${CT_BINUTILS_VERSION}" \ + {ftp,http}://{ftp.gnu.org/gnu,ftp.kernel.org/pub/linux/devel}/binutils \ + ftp://gcc.gnu.org/pub/binutils/{releases,snapshots} + fi } # Extract binutils do_binutils_extract() { + # If using custom directory location, nothing to do + if [ "${CT_BINUTILS_CUSTOM}" = "y" \ + -a -d "${CT_SRC_DIR}/binutils-${CT_BINUTILS_VERSION}" ]; then + return 0 + fi + CT_Extract "binutils-${CT_BINUTILS_VERSION}" CT_Patch "binutils" "${CT_BINUTILS_VERSION}" }