# HG changeset patch # User Bruno Haible # Date 1521892542 -3600 # Node ID f4ca00710ecf2976edef078272f30502e4580eeb # Parent aa7bb6bee927f85a6ff2552f074a3486acd61eec javacomp-script, javacomp: Update comments. * m4/javacomp.m4: Update comments regarding gcj. * lib/javacomp.h: Likewise. diff -r aa7bb6bee927 -r f4ca00710ecf ChangeLog --- a/ChangeLog Sat Mar 24 12:54:42 2018 +0100 +++ b/ChangeLog Sat Mar 24 12:55:42 2018 +0100 @@ -1,3 +1,9 @@ +2018-03-24 Bruno Haible + + javacomp-script, javacomp: Update comments. + * m4/javacomp.m4: Update comments regarding gcj. + * lib/javacomp.h: Likewise. + 2018-03-24 Bruno Haible javacomp-script, javacomp: Fix support for Java 7, 8, 9. diff -r aa7bb6bee927 -r f4ca00710ecf lib/javacomp.h --- a/lib/javacomp.h Sat Mar 24 12:54:42 2018 +0100 +++ b/lib/javacomp.h Sat Mar 24 12:55:42 2018 +0100 @@ -57,9 +57,11 @@ because even Sun's/Oracle's javac doesn't support these combinations. It is redundant to ask for a target_version > source_version, since the smaller target_version = source_version will also always work and newer JVMs - support the older target_versions too. Except for the case - target_version = 1.4, source_version = 1.3, which allows gcj versions 3.0 - to 3.2 to be used. + support the older target_versions too. Except for the cases + - target_version = 1.4, source_version = 1.3, which allows gcj versions 3.0 + to 3.2 to be used, + - target-version = 1.6, source-version = 1.5, which allows gcj versions + >= 4.3 to be used. directory is the target directory. The .class file for class X.Y.Z is written at directory/X/Y/Z.class. If directory is NULL, the .class diff -r aa7bb6bee927 -r f4ca00710ecf m4/javacomp.m4 --- a/m4/javacomp.m4 Sat Mar 24 12:54:42 2018 +0100 +++ b/m4/javacomp.m4 Sat Mar 24 12:55:42 2018 +0100 @@ -1,4 +1,4 @@ -# javacomp.m4 serial 14 +# javacomp.m4 serial 15 dnl Copyright (C) 2001-2003, 2006-2007, 2009-2018 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -42,15 +42,17 @@ # 1.1 JDK 1.1, jview # 1.2 JDK/JRE 1.2 # 1.3 JDK/JRE 1.3, gij 3.3, 3.4 -# 1.4 JDK/JRE 1.4, gij 4.0, 4.1 -# 1.5 JDK/JRE 5 +# 1.4 JDK/JRE 1.4, gij 4.0 ... 4.2 +# 1.5 JDK/JRE 5, gij 4.3 ... 6 # 1.6 JDK/JRE 6 # 1.7 JDK/JRE 7 # 1.8 JDK/JRE 8 # 9 JDK/JRE 9 # Note: gij >= 3.3 can in some cases handle classes compiled with -target 1.4, # and gij >= 4.1 can in some cases partially handle classes compiled with -# -target 1.5, but I have no idea how complete this support is. +# -target 1.5, but I have no idea how complete this support is. Similarly, +# gcj >= 4.3 supports -ftarget=1.6, and gij >= 4.3 can in some cases handle +# classes compiled with -target 1.6. # # Specifying target-version is useful when building a library (.jar) that is # useful outside the given package. Omitting target-version is useful when @@ -67,9 +69,11 @@ # # It is redundant to ask for a target-version > source-version, since the # smaller target-version = source-version will also always work and newer JVMs -# support the older target-versions too. Except for the case -# target-version = 1.4, source-version = 1.3, which allows gcj versions 3.0 -# to 3.2 to be used. +# support the older target-versions too. Except for the cases +# - target-version = 1.4, source-version = 1.3, which allows gcj versions 3.0 +# to 3.2 to be used, +# - target-version = 1.6, source-version = 1.5, which allows gcj versions +# >= 4.3 to be used. AC_DEFUN([gt_JAVACOMP], [ @@ -178,7 +182,8 @@ dnl bytecode, which crashes with a VerifyError when executed by Sun Java dnl 1.3.1. The bug is registered as java/7066, see dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=7066 - dnl gcj 4.3 and newer has an option -ftarget=1.X. + dnl gcj 4.3 and newer has an option -ftarget=1.X; the maximum supported + dnl target-version is 1.6. dnl dnl For gcj < 3.3, the source-version always is 1.3. dnl For 3.3 <= gcj < 4.3, the source-version defaults to 1.4; option