summaryrefslogtreecommitdiff
path: root/scripts/build/cc/gcc.sh
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-01-06 22:10:17 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2009-01-06 22:10:17 (GMT)
commit0cd8441a97651e1a180a34ad82f927f31b04daaf (patch)
tree3918b0974d4caf853cda51030236c204be1f8f94 /scripts/build/cc/gcc.sh
parent0b28fc00e162be1e5449762ee51807377ddb7ba0 (diff)
Add the Eclipse Java Compiler to be able to compile Java.
Andy JOHNSON wrote: The Java compiler for GCC versions 4.3.0 and up requires the Eclipse compiler "ecj1" to be built as well. I added "gcj" to the list of utilities to make the initial link. /trunk/scripts/build/cc/gcc.sh | 12 12 0 0 ++++++++++++ /trunk/scripts/crosstool.sh | 2 1 1 0 +- /trunk/config/cc/gcc.in | 6 6 0 0 ++++++ 3 files changed, 19 insertions(+), 1 deletion(-)
Diffstat (limited to 'scripts/build/cc/gcc.sh')
-rw-r--r--scripts/build/cc/gcc.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
index 1263e76..3274abc 100644
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -12,12 +12,24 @@ do_cc_get() {
# 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
+ if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" ]; then
+ CT_GetFile ecj-latest .jar ftp://gcc.gnu.org/pub/java \
+ ftp://sourceware.org/pub/java
+ fi
}
# 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
+ if [ "${CT_CC_LANG_JAVA_USE_ECJ}" = "y" ]; then
+ CT_DoExecLog ALL cp -v "${CT_TARBALLS_DIR}/ecj-latest.jar" "${CT_SRC_DIR}/gcc-${CT_CC_VERSION}/ecj.jar"
+ fi
}
#------------------------------------------------------------------------------