summaryrefslogtreecommitdiffstats
path: root/patches/classpath-0.99
diff options
context:
space:
mode:
authorGuillermo Rodríguez <guille.rodriguez@gmail.com>2018-10-31 16:12:06 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2018-11-10 08:50:47 +0100
commitbbc978e623cafc1278118ee1edd24b8609b26227 (patch)
tree9da6db85677fb3c89cb655777b4d7421019b5f7d /patches/classpath-0.99
parentf0886f80d5885df2f7ddedc3532dc9a6f3f97acd (diff)
downloadptxdist-bbc978e623cafc1278118ee1edd24b8609b26227.tar.gz
ptxdist-bbc978e623cafc1278118ee1edd24b8609b26227.tar.xz
classpath: Fix building with OpenJDK 1.8
Also move back from staging. Signed-off-by: Guillermo Rodriguez <guille.rodriguez@gmail.com> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches/classpath-0.99')
-rw-r--r--patches/classpath-0.99/0001-Fix-building-with-OpenJDK-1.8.patch50
-rw-r--r--patches/classpath-0.99/series1
2 files changed, 51 insertions, 0 deletions
diff --git a/patches/classpath-0.99/0001-Fix-building-with-OpenJDK-1.8.patch b/patches/classpath-0.99/0001-Fix-building-with-OpenJDK-1.8.patch
new file mode 100644
index 000000000..fe7d3baa7
--- /dev/null
+++ b/patches/classpath-0.99/0001-Fix-building-with-OpenJDK-1.8.patch
@@ -0,0 +1,50 @@
+This patch makes it possible to build GNU Classpath using javac
+from OpenJDK 1.7 and 1.8.
+
+- From the javac docs: "Classes found through the classpath are
+subject to automatic recompilation if their sources are found."
+javac from OpenJDK 1.7+ will try (and fail) to recompile "standard"
+Java classes (e.g. java/lang/Object.java) when compiling the Java
+test class. Fix this by explicitly passing an empty -sourcepath.
+
+- Test for 1.6 instead of 1.5, as -source/-target 1.5 is deprecated
+in Java 8, and the Makefiles already use -source/-target 1.6 anyway.
+
+---
+ m4/ac_prog_java_works.m4 | 3 ++-
+ m4/ac_prog_javac_works.m4 | 4 ++--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/m4/ac_prog_java_works.m4 b/m4/ac_prog_java_works.m4
+index d3f2744..f36318b 100644
+--- a/m4/ac_prog_java_works.m4
++++ b/m4/ac_prog_java_works.m4
+@@ -62,7 +62,8 @@ EOF
+ changequote([, ])dnl
+ if test x$ac_cv_prog_uudecode_base64 != xyes; then
+ AC_REQUIRE([AC_PROG_JAVAC_WORKS])
+- if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) && test -s $CLASS_TEST; then
++ CMD="$JAVAC $JAVACFLAGS -sourcepath '' $JAVA_TEST"
++ if AC_TRY_COMMAND($CMD) && test -s $CLASS_TEST; then
+ :
+ else
+ echo "configure: failed program was:" >&AC_FD_CC
+diff --git a/m4/ac_prog_javac_works.m4 b/m4/ac_prog_javac_works.m4
+index 7fb298d..fbe24ce 100644
+--- a/m4/ac_prog_javac_works.m4
++++ b/m4/ac_prog_javac_works.m4
+@@ -33,9 +33,9 @@ public class Object
+ }
+ EOF
+ if test x$JAVAC_IS_GCJ = xyes; then
+- CMD="$JAVAC $JAVACFLAGS -fsource=1.5 -ftarget=1.5 $JAVA_TEST"
++ CMD="$JAVAC $JAVACFLAGS -fsource=1.6 -ftarget=1.6 $JAVA_TEST"
+ else
+- CMD="$JAVAC $JAVACFLAGS -source 1.5 -target 1.5 $JAVA_TEST"
++ CMD="$JAVAC $JAVACFLAGS -sourcepath '' -source 1.6 -target 1.6 $JAVA_TEST"
+ fi
+ if AC_TRY_COMMAND($CMD) >/dev/null 2>&1; then
+ ac_cv_prog_javac_works=yes
+--
+1.9.1
+
diff --git a/patches/classpath-0.99/series b/patches/classpath-0.99/series
new file mode 100644
index 000000000..1fffdbd87
--- /dev/null
+++ b/patches/classpath-0.99/series
@@ -0,0 +1 @@
+0001-Fix-building-with-OpenJDK-1.8.patch