diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-11-29 15:47:51 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-11-29 18:02:57 +0200 |
commit | 5c159626c6b3ace5becf03aad5ed9a1851065c15 (patch) | |
tree | e771149151c933ce8eb58a431825db472bc34c0b /configure.ac | |
parent | 70626249cd247d9acdad417b8eaf252bae22c059 (diff) |
Always use Java target version 1.5
It has been way too common for people to accidentally have a javac
from JDK 7 create class files that are of the newest version, which
older JREs and Android's dex then don't understand.
As many of the distro-configs files specified
--with-java-target-version=1.5 anyway, let's just hardcode that for
now.
Change-Id: I0853820dc56a062f053b5c2c30097bf1ff3798c1
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/configure.ac b/configure.ac index c40e5232b387..de685d69bdaf 100644 --- a/configure.ac +++ b/configure.ac @@ -1724,18 +1724,6 @@ AC_ARG_WITH(java, [ with_java=java ] ) -AC_ARG_WITH(java-target-version, - AS_HELP_STRING([--with-java-target-version], - [Generate class files that will work on JVMs with the specified version. - For example, use --with-java-target-version=1.5 to make sure that the - application will work with JVM 1.5 even when compiled with JDK 1.6.]) - [ - This option is ignored when you compile with gcj/gij. - - Usage: --with-java-target-version=<jvm version> - ], -,) - AC_ARG_WITH(jvm-path, AS_HELP_STRING([--with-jvm-path], [Use a specific JVM search path at runtime.]) @@ -5979,25 +5967,10 @@ else fi dnl =================================================================== -dnl Check for target Java bytecode version +dnl Set target Java bytecode version dnl =================================================================== if test "$SOLAR_JAVA" != ""; then - AC_MSG_CHECKING([for target Java bytecode version]) - if test "$JDK" = "gcj" -o "$JDK" = "kaffe"; then - _java_target_ver="1.5" - AC_MSG_RESULT([default by $JDK]) - if test -n "$with_java_target_version" -a "$with_java_target_version" != "no"; then - AC_MSG_WARN([Value defined by --with-java-target-version is ignored!]) - fi - elif test -n "$with_java_target_version" -a "$with_java_target_version" != "no"; then - _java_target_ver="$with_java_target_version" - AC_MSG_RESULT([$_java_target_ver]) - elif test $_jdk_ver -gt 10000; then - _java_target_ver=`echo "$_jdk_ver" | $AWK '{ maj=substr($0,1,1); min=substr($0,2,2); print int(maj)"."int(min) }'` - AC_MSG_RESULT([$_java_target_ver]) - else - AC_MSG_ERROR([Unable to guess Java bytecode version from Java version!]) - fi + _java_target_ver="1.5" JAVA_SOURCE_VER="$_java_target_ver" JAVA_TARGET_VER="$_java_target_ver" |