Skip to content

Commit eeee073

Browse files
Support newer versions of javac
JamVM needs a java compiler when building for GNU Classpath, in order to compile the VM support classes (classes.zip). Currently, this breaks on JDK 9 or later, since the javac invocation uses -bootclasspath, which (on JDK 9+) needs explicit -source/-target. Fix by adding -source 1.6 -target 1.6 to javac options (same as used by GNU Classpath itself). While we are at this, also drop support for GCJ and Jikes. GCJ was officially discontinued in 2016 (removed from GCC 7). Jikes support was also removed from GNU Classpath long ago. Signed-off-by: Guillermo Rodríguez <grodriguez@ingelabs.com>
1 parent db96ce2 commit eeee073

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ if test "$using_clang" = yes; then
274274
interp_cflags="$interp_cflags -mllvm -tail-dup-limit=0"
275275
fi
276276

277-
AC_CHECK_PROGS(JAVAC, ecj jikes "gcj -C" javac)
277+
AC_CHECK_PROGS(JAVAC, ecj javac)
278278

279279
dnl Checks for libraries.
280280

src/classlib/gnuclasspath/lib/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ inst_classes.zip: classes.zip
5050

5151
classes.zip: $(JAVA_FILES)
5252
-mkdir classes
53-
$(JAVAC) -bootclasspath ${GLIBJ_ZIP} -d classes $(JAVA_FILES)
53+
$(JAVAC) -source 1.6 -target 1.6 -bootclasspath ${GLIBJ_ZIP} -d classes $(JAVA_FILES)
5454
cd classes && zip -r ../classes.zip .
5555
rm -rf classes
5656

0 commit comments

Comments
 (0)