Index: crosstool-ng/trunk/scripts/build/cc/gcc.sh =================================================================== --- crosstool-ng/trunk/scripts/build/cc/gcc.sh (revision 1294) +++ crosstool-ng/trunk/scripts/build/cc/gcc.sh (working copy) @@ -12,12 +12,21 @@ # subdirectory! You bastard! CT_GetFile "gcc-${CT_CC_VERSION}" \ {ftp,http}://ftp.gnu.org/gnu/gcc{,{,/releases}/gcc-${CT_CC_VERSION}} + # Starting with GCC 4.3, ecj is used for Java, and will only be + # built if the configure script finds ecj.jar at the top of the + # GCC source tree, which will not be there unless we get it and + # put it there ourselves + [ "${CC_LANG_JAVA_USE_ECJ}" = "y" ] && \ + CT_GetFile "ecj-latest.jar" ftp://gcc.gnu.org/pub/java } # Extract gcc do_cc_extract() { CT_Extract "gcc-${CT_CC_VERSION}" CT_Patch "gcc-${CT_CC_VERSION}" + # Copy ecj-latest.jar to ecj.jar at the top of the GCC source tree + [ "${CC_LANG_JAVA_USE_ECJ}" = "y" ] && \ + CT_DoExecLog ALL cp ${CT_LOCAL_TARBALLS_DIR}/ecj-latest.jar ${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/ecj.jar } #------------------------------------------------------------------------------ Index: crosstool-ng/trunk/config/cc/gcc.in =================================================================== --- crosstool-ng/trunk/config/cc/gcc.in (revision 1294) +++ crosstool-ng/trunk/config/cc/gcc.in (working copy) @@ -106,6 +106,12 @@ prompt "4.3.2" select CC_GCC_4_3_or_later +config CC_LANG_JAVA_USE_ECJ + bool + default y + depends on CC_LANG_JAVA + depends on CC_GCC_4_3_or_later + # CT_INSERT_VERSION_ABOVE # Don't remove above line! endchoice