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 | 6b8740dd6dbcf35a8903fb5ac3361a5a6405c5a5 (patch) | |
tree | 25e3b72111a43eeb4e3508a2ba8a38ce5d18aeed | |
parent | b8baed585d8efed6c42fd7036fbbc4f586588a90 (diff) | |
download | crosstool-ng-6b8740dd6dbcf35a8903fb5ac3361a5a6405c5a5.tar.gz crosstool-ng-6b8740dd6dbcf35a8903fb5ac3361a5a6405c5a5.tar.bz2 crosstool-ng-6b8740dd6dbcf35a8903fb5ac3361a5a6405c5a5.zip |
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" <david.holsgrove@xilinx.com>
[yann.morin.1998@free.fr: don't patch custom directory location]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <f2272ac0f37cedd0bb91.1349931194@localhost.localdomain>
PatchWork-Id: 190787
-rw-r--r-- | config/cc/gcc.in | 19 | ||||
-rw-r--r-- | scripts/build/cc/gcc.sh | 10 |
2 files changed, 28 insertions, 1 deletions
diff --git a/config/cc/gcc.in b/config/cc/gcc.in index 8875ba2a..15b2d46c 100644 --- a/config/cc/gcc.in +++ b/config/cc/gcc.in @@ -239,6 +239,12 @@ config CC_V_3_4_6 prompt "3.4.6 (OBSOLETE)" depends on OBSOLETE +config CC_CUSTOM + bool + prompt "Custom gcc" + depends on EXPERIMENTAL + select CC_GCC_latest + endchoice if CC_V_SVN @@ -297,6 +303,18 @@ config GCC_CHECKOUT endif +if CC_CUSTOM + +config CC_CUSTOM_LOCATION + string + prompt "Full path to custom gcc source" + default "" + help + Enter the path to the directory (or tarball) of your source for gcc, + or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/gcc + +endif #CC_CUSTOM + config CC_GCC_4_2 bool select CC_GCC_4_2_or_later @@ -484,6 +502,7 @@ config CC_VERSION default "4.1.2" if CC_V_4_1_2 default "4.0.4" if CC_V_4_0_4 default "3.4.6" if CC_V_3_4_6 + default "custom" if CC_CUSTOM config CC_LANG_JAVA_USE_ECJ bool 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}" |