We tried to build jtreg at tag 4.2-b03.
$(J2SEJAVAC) -source 7 -target 7 creates a warning with recent jdk8's, and when combined with -Xlint -Werror, that leads to a build error.
I already see places in the jtreg sources where -Xlint was changed to -Xlint:all,-options but it seems this is incomplete. We found we needed to do this to get jtreg to build when J2SEHOME is a jdk8:
diff --git a/make/jtdiff.gmk b/make/jtdiff.gmk
--- a/make/jtdiff.gmk
+++ b/make/jtdiff.gmk
@@ -36,7 +36,7 @@
CLASSPATH="$(CLASSDIR)$(PS)$(JAVATEST_JAR)$(PS)$(JAVAHELP_JAR)$(PS)$(ANTHOME)/lib/ant.jar" \
$(J2SEJAVAC) -source $(J2SEJAVAC_SOURCE) -target $(J2SEJAVAC_TARGET) \
-d $(CLASSDIR) \
- -Xlint -Werror \
+ -Xlint:all,-options -Werror \
-encoding ISO8859-1 \
$(JAVAFILES.com.sun.javatest.diff)
echo "classes built at `date`" > $@
diff --git a/make/jtreg.gmk b/make/jtreg.gmk
--- a/make/jtreg.gmk
+++ b/make/jtreg.gmk
@@ -73,7 +73,7 @@
CLASSPATH="$(CLASSDIR)$(PS)$(ANTHOME)/lib/ant.jar$(PS)$(JAVATEST_JAR)$(PS)$(JUNIT_JAR)$(PS)$(TESTNG_JAR)" \
$(J2SEJAVAC) -source $(J2SEJAVAC_SOURCE) -target $(J2SEJAVAC_TARGET) \
-d $(CLASSDIR) \
- -Xlint -Werror \
+ -Xlint:all,-options -Werror \
-encoding ISO8859-1 \
$(JAVAFILES.com.sun.javatest.regtest-tools)
echo "classes built at `date`" > $@
There may be more places in need of changing. I didn't try running jtreg's own regression tests.
Taking another look, I see this commit after 4.2-b03 (which confuses me):
changeset: 284:5af630cbe724
user: jvanek
date: 2016-08-10 19:21 -0700
fix default -source/-target to JDK 1.7
$(J2SEJAVAC) -source 7 -target 7 creates a warning with recent jdk8's, and when combined with -Xlint -Werror, that leads to a build error.
I already see places in the jtreg sources where -Xlint was changed to -Xlint:all,-options but it seems this is incomplete. We found we needed to do this to get jtreg to build when J2SEHOME is a jdk8:
diff --git a/make/jtdiff.gmk b/make/jtdiff.gmk
--- a/make/jtdiff.gmk
+++ b/make/jtdiff.gmk
@@ -36,7 +36,7 @@
CLASSPATH="$(CLASSDIR)$(PS)$(JAVATEST_JAR)$(PS)$(JAVAHELP_JAR)$(PS)$(ANTHOME)/lib/ant.jar" \
$(J2SEJAVAC) -source $(J2SEJAVAC_SOURCE) -target $(J2SEJAVAC_TARGET) \
-d $(CLASSDIR) \
- -Xlint -Werror \
+ -Xlint:all,-options -Werror \
-encoding ISO8859-1 \
$(JAVAFILES.com.sun.javatest.diff)
echo "classes built at `date`" > $@
diff --git a/make/jtreg.gmk b/make/jtreg.gmk
--- a/make/jtreg.gmk
+++ b/make/jtreg.gmk
@@ -73,7 +73,7 @@
CLASSPATH="$(CLASSDIR)$(PS)$(ANTHOME)/lib/ant.jar$(PS)$(JAVATEST_JAR)$(PS)$(JUNIT_JAR)$(PS)$(TESTNG_JAR)" \
$(J2SEJAVAC) -source $(J2SEJAVAC_SOURCE) -target $(J2SEJAVAC_TARGET) \
-d $(CLASSDIR) \
- -Xlint -Werror \
+ -Xlint:all,-options -Werror \
-encoding ISO8859-1 \
$(JAVAFILES.com.sun.javatest.regtest-tools)
echo "classes built at `date`" > $@
There may be more places in need of changing. I didn't try running jtreg's own regression tests.
Taking another look, I see this commit after 4.2-b03 (which confuses me):
changeset: 284:5af630cbe724
user: jvanek
date: 2016-08-10 19:21 -0700
fix default -source/-target to JDK 1.7