1.1 --- a/config/cc/gcc.in Mon Oct 22 03:32:28 2012 +0000
1.2 +++ b/config/cc/gcc.in Thu Oct 11 14:39:41 2012 +1000
1.3 @@ -239,6 +239,12 @@
1.4 prompt "3.4.6 (OBSOLETE)"
1.5 depends on OBSOLETE
1.6
1.7 +config CC_CUSTOM
1.8 + bool
1.9 + prompt "Custom gcc"
1.10 + depends on EXPERIMENTAL
1.11 + select CC_GCC_latest
1.12 +
1.13 endchoice
1.14
1.15 if CC_V_SVN
1.16 @@ -297,6 +303,18 @@
1.17
1.18 endif
1.19
1.20 +if CC_CUSTOM
1.21 +
1.22 +config CC_CUSTOM_LOCATION
1.23 + string
1.24 + prompt "Full path to custom gcc source"
1.25 + default ""
1.26 + help
1.27 + Enter the path to the directory (or tarball) of your source for gcc,
1.28 + or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/gcc
1.29 +
1.30 +endif #CC_CUSTOM
1.31 +
1.32 config CC_GCC_4_2
1.33 bool
1.34 select CC_GCC_4_2_or_later
1.35 @@ -484,6 +502,7 @@
1.36 default "4.1.2" if CC_V_4_1_2
1.37 default "4.0.4" if CC_V_4_0_4
1.38 default "3.4.6" if CC_V_3_4_6
1.39 + default "custom" if CC_CUSTOM
1.40
1.41 config CC_LANG_JAVA_USE_ECJ
1.42 bool
2.1 --- a/scripts/build/cc/gcc.sh Mon Oct 22 03:32:28 2012 +0000
2.2 +++ b/scripts/build/cc/gcc.sh Thu Oct 11 14:39:41 2012 +1000
2.3 @@ -4,7 +4,9 @@
2.4
2.5 # Download gcc
2.6 do_cc_get() {
2.7 - if [ -n "${CT_CC_V_SVN}" ]; then
2.8 + if [ "${CT_CC_CUSTOM}" = "y" ]; then
2.9 + CT_GetCustom "gcc" "${CT_CC_VERSION}" "${CT_CC_CUSTOM_LOCATION}"
2.10 + elif [ -n "${CT_CC_V_SVN}" ]; then
2.11 # Get gcc from SVN!
2.12 local svn_base
2.13
2.14 @@ -59,6 +61,12 @@
2.15
2.16 # Extract gcc
2.17 do_cc_extract() {
2.18 + # If using custom directory location, nothing to do
2.19 + if [ "${CT_CC_CUSTOM}" = "y" \
2.20 + -a -d "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}" ]; then
2.21 + return 0
2.22 + fi
2.23 +
2.24 CT_Extract "gcc-${CT_CC_VERSION}"
2.25 CT_Patch "gcc" "${CT_CC_VERSION}"
2.26