Mercurial > hg > release > icedtea7-2.5
changeset 2696:bf2f5ea62322
Perform configure checks using ecj.jar if native ecj is enabled.
2014-03-26 Andrew John Hughes <gnu.andrew@member.fsf.org>
Perform configure checks using ecj.jar
if native ecj is enabled.
* Makefile.am:
(native-ecj): Link against gcj explicitly.
* acinclude.m4:
(IT_FIND_COMPILER): Run IT_WITH_GCJ
and set JAVAC to an invocation of the ECJ_JAR
if native ecj is used. Depend on IT_FIND_JAVA
and IT_FIND_ECJ_JAR for this.
(IT_FIND_ECJ_JAR): Define only once.
(IT_WITH_GCJ): Likewise.
(IT_DIAMOND_CHECK): Depend on IT_CHECK_JAVA_AND_JAVAC_WORK.
* configure.ac: Remove invocation of IT_WITH_GCJ.
author | Andrew John Hughes <gnu_andrew@member.fsf.org> |
---|---|
date | Thu, 27 Mar 2014 03:50:20 +0000 |
parents | 80573ab16562 |
children | 6ef5523cf948 |
files | ChangeLog Makefile.am acinclude.m4 configure.ac |
diffstat | 4 files changed, 28 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Mar 24 16:41:29 2014 -0400 +++ b/ChangeLog Thu Mar 27 03:50:20 2014 +0000 @@ -1,3 +1,19 @@ +2014-03-26 Andrew John Hughes <gnu.andrew@member.fsf.org> + + Perform configure checks using ecj.jar + if native ecj is enabled. + * Makefile.am: + (native-ecj): Link against gcj explicitly. + * acinclude.m4: + (IT_FIND_COMPILER): Run IT_WITH_GCJ + and set JAVAC to an invocation of the ECJ_JAR + if native ecj is used. Depend on IT_FIND_JAVA + and IT_FIND_ECJ_JAR for this. + (IT_FIND_ECJ_JAR): Define only once. + (IT_WITH_GCJ): Likewise. + (IT_DIAMOND_CHECK): Depend on IT_CHECK_JAVA_AND_JAVAC_WORK. + * configure.ac: Remove invocation of IT_WITH_GCJ. + 2014-03-24 Pavel Tisnovsky <ptisnovs@redhat.com> * contrib/jck/compile-native-code.sh:
--- a/Makefile.am Mon Mar 24 16:41:29 2014 -0400 +++ b/Makefile.am Thu Mar 27 03:50:20 2014 +0000 @@ -1584,7 +1584,7 @@ mkdir -p stamps if BUILD_NATIVE_ECJ ${GCJ} $(IT_CFLAGS) -Wl,-Bsymbolic -findirect-dispatch -o native-ecj \ - --main=org.eclipse.jdt.internal.compiler.batch.Main ${ECJ_JAR} + --main=org.eclipse.jdt.internal.compiler.batch.Main -lgcj ${ECJ_JAR} endif touch $@
--- a/acinclude.m4 Mon Mar 24 16:41:29 2014 -0400 +++ b/acinclude.m4 Thu Mar 27 03:50:20 2014 +0000 @@ -126,9 +126,17 @@ AC_DEFUN([IT_FIND_COMPILER], [ + AC_REQUIRE([IT_FIND_JAVA]) + AC_REQUIRE([IT_FIND_ECJ_JAR]) + IT_FIND_JAVAC IT_FIND_ECJ IT_USING_ECJ + IT_WITH_GCJ + + if test x"${GCJ}" != xno ; then + JAVAC="${JAVA} -classpath ${ECJ_JAR} org.eclipse.jdt.internal.compiler.batch.Main" + fi AC_SUBST(ECJ) AC_SUBST(JAVAC) @@ -315,7 +323,7 @@ AM_CONDITIONAL([SRC_DIR_HARDLINKABLE], test x"${it_cv_hardlink_src}" = "xyes") ]) -AC_DEFUN([IT_FIND_ECJ_JAR], +AC_DEFUN_ONCE([IT_FIND_ECJ_JAR], [ AC_MSG_CHECKING([for an ecj JAR file]) AC_ARG_WITH([ecj-jar], @@ -922,7 +930,7 @@ AM_CONDITIONAL([USE_JDK7], test x"${project}" = "xjdk7") ]) -AC_DEFUN([IT_WITH_GCJ], +AC_DEFUN_ONCE([IT_WITH_GCJ], [ AC_MSG_CHECKING([whether to compile ecj natively]) AC_ARG_WITH([gcj], @@ -1774,6 +1782,7 @@ ]) AC_DEFUN([IT_DIAMOND_CHECK],[ + AC_REQUIRE([IT_CHECK_JAVA_AND_JAVAC_WORK]) AC_CACHE_CHECK([if javac lacks support for the diamond operator], it_cv_diamond, [ CLASS=Test.java BYTECODE=$(echo $CLASS|sed 's#\.java##')