@@ -239,6 +239,12 @@
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 @@
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 @@
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
@@ -4,7 +4,14 @@
# Download gcc
do_cc_get() {
- if [ -n "${CT_CC_V_SVN}" ]; then
+ if [ "${CT_CC_CUSTOM}" = "y" ]; then
+ CT_TestAndAbort "Custom gcc: CT_CUSTOM_LOCATION_ROOT_DIR or CT_CC_CUSTOM_LOCATION must be set." \
+ -z "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_CC_CUSTOM_LOCATION}"
+ if [ -n "${CT_CUSTOM_LOCATION_ROOT_DIR}" -a -z "${CT_CC_CUSTOM_LOCATION}" ]; then
+ CT_CC_CUSTOM_LOCATION="${CT_CUSTOM_LOCATION_ROOT_DIR}/gcc"
+ fi
+ 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,7 +66,10 @@
# Extract gcc
do_cc_extract() {
- CT_Extract "gcc-${CT_CC_VERSION}"
+ if [ "${CT_CC_CUSTOM}" != "y" \
+ -o ! -d "${CT_CC_CUSTOM_LOCATION}" ]; then
+ CT_Extract "gcc-${CT_CC_VERSION}"
+ fi
CT_Patch "gcc" "${CT_CC_VERSION}"
# Copy ecj-latest.jar to ecj.jar at the top of the GCC source tree