diff options
author | David Holsgrove <david.holsgrove@xilinx.com> | 2012-10-11 14:39:41 +1000 |
---|---|---|
committer | David Holsgrove <david.holsgrove@xilinx.com> | 2012-10-11 14:39:41 +1000 |
commit | 2ace8ed697e17859376364d02b88b8539a2bf9af (patch) | |
tree | d766a1c72a01d3ea275885be89f2258f8adf350b /scripts/build/binutils/binutils.sh | |
parent | 6b8740dd6dbcf35a8903fb5ac3361a5a6405c5a5 (diff) | |
download | crosstool-ng-2ace8ed697e17859376364d02b88b8539a2bf9af.tar.gz crosstool-ng-2ace8ed697e17859376364d02b88b8539a2bf9af.tar.bz2 crosstool-ng-2ace8ed697e17859376364d02b88b8539a2bf9af.zip |
binutils/binutils: Add CUSTOM version and CUSTOM_LOCATION config options and GetCustom
CUSTOM_LOCATION config options only presented in menuconfig if component
CUSTOM version selected.
Signed-off-by: "David Holsgrove" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: fix indentation, don't patch custom dir location]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <7a604b5df9c84a1e20c3.1349931195@localhost.localdomain>
PatchWork-Id: 190788
Diffstat (limited to 'scripts/build/binutils/binutils.sh')
-rw-r--r-- | scripts/build/binutils/binutils.sh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/scripts/build/binutils/binutils.sh b/scripts/build/binutils/binutils.sh index 7c260d7c..0aeb3931 100644 --- a/scripts/build/binutils/binutils.sh +++ b/scripts/build/binutils/binutils.sh @@ -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}" } |