# HG changeset patch # User David Holsgrove # Date 1349930381 -36000 # Node ID 3662412ddd59415418cf2d32827c6a65b5772c71 # Parent 7f5a3382968fe3caefbc2437f2e643bd40898710 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" [yann.morin.1998@free.fr: fix indentation, don't patch custom dir location] Signed-off-by: "Yann E. MORIN" Message-Id: <7a604b5df9c84a1e20c3.1349931195@localhost.localdomain> PatchWork-Id: 190788 diff -r 7f5a3382968f -r 3662412ddd59 config/binutils/binutils.in --- a/config/binutils/binutils.in Thu Oct 11 14:39:41 2012 +1000 +++ b/config/binutils/binutils.in Thu Oct 11 14:39:41 2012 +1000 @@ -50,8 +50,26 @@ prompt "2.16.1a (OBSOLETE)" depends on OBSOLETE +config BINUTILS_CUSTOM + bool + prompt "Custom binutils" + depends on EXPERIMENTAL + select BINUTILS_2_22_or_later + endchoice +if BINUTILS_CUSTOM + +config BINUTILS_CUSTOM_LOCATION + string + prompt "Full path to custom binutils source" + default "" + help + Enter the path to the directory (or tarball) of your source for binutils, + or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/binutils + +endif # BINUTILS_CUSTOM + config BINUTILS_VERSION string # Don't remove next line @@ -64,6 +82,7 @@ default "2.18a" if BINUTILS_V_2_18a default "2.17a" if BINUTILS_V_2_17a default "2.16.1a" if BINUTILS_V_2_16_1a + default "custom" if BINUTILS_CUSTOM config BINUTILS_2_22_or_later bool diff -r 7f5a3382968f -r 3662412ddd59 scripts/build/binutils/binutils.sh --- a/scripts/build/binutils/binutils.sh Thu Oct 11 14:39:41 2012 +1000 +++ 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}" }