From 6b8740dd6dbcf35a8903fb5ac3361a5a6405c5a5 Mon Sep 17 00:00:00 2001 From: David Holsgrove Date: Thu, 11 Oct 2012 14:39:41 +1000 Subject: cc/gcc: 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: don't patch custom directory location] Signed-off-by: "Yann E. MORIN" Message-Id: PatchWork-Id: 190787 --- scripts/build/cc/gcc.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'scripts/build') diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index dce77e94..70f38a6f 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -4,7 +4,9 @@ # Download gcc do_cc_get() { - if [ -n "${CT_CC_V_SVN}" ]; then + if [ "${CT_CC_CUSTOM}" = "y" ]; then + CT_GetCustom "gcc" "${CT_CC_VERSION}" "${CT_CC_CUSTOM_LOCATION}" + elif [ -n "${CT_CC_V_SVN}" ]; then # Get gcc from SVN! local svn_base @@ -59,6 +61,12 @@ do_cc_get() { # Extract gcc do_cc_extract() { + # If using custom directory location, nothing to do + if [ "${CT_CC_CUSTOM}" = "y" \ + -a -d "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}" ]; then + return 0 + fi + CT_Extract "gcc-${CT_CC_VERSION}" CT_Patch "gcc" "${CT_CC_VERSION}" -- cgit v1.2.3