From: "Guillermo Rodríguez" <guille.rodriguez@gmail.com>
To: ptxdist@pengutronix.de
Cc: "Guillermo Rodríguez" <guille.rodriguez@gmail.com>
Subject: [ptxdist] [PATCH v2 1/2] classpath: Fix for building with OpenJDK-1.8 (again)
Date: Tue, 20 Nov 2018 16:51:51 +0100 [thread overview]
Message-ID: <1542729112-28248-1-git-send-email-guille.rodriguez@gmail.com> (raw)
In-Reply-To: <1542367218-2735-1-git-send-email-guille.rodriguez@gmail.com>
Commit bbc978e623cafc added a patch intended to fix building
with OpenJDK 1.8, however that commit was not complete. Update
-source/-target in Makefiles and run autogen.sh so that the
configure script is regenerated and the patched m4 macros are
used.
Signed-off-by: Guillermo Rodriguez <guille.rodriguez@gmail.com>
---
.../0001-Fix-building-with-OpenJDK-1.8.patch | 57 ++++++++++++++++++++--
patches/classpath-0.99/autogen.sh | 2 +
rules/classpath.in | 1 +
3 files changed, 57 insertions(+), 3 deletions(-)
create mode 100755 patches/classpath-0.99/autogen.sh
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
index fe7d3ba..5ed03e8 100644
--- 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
@@ -7,14 +7,49 @@ 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.
+- Use -source/-target 1.6 instead of 1.5, as the latter is
+deprecated in Java 8.
---
+ examples/Makefile.am | 4 ++--
+ lib/Makefile.am | 4 ++--
m4/ac_prog_java_works.m4 | 3 ++-
m4/ac_prog_javac_works.m4 | 4 ++--
- 2 files changed, 4 insertions(+), 3 deletions(-)
+ tools/Makefile.am | 4 ++--
+ 5 files changed, 10 insertions(+), 9 deletions(-)
+diff --git a/examples/Makefile.am b/examples/Makefile.am
+index ff47801..ba40c08 100644
+--- a/examples/Makefile.am
++++ b/examples/Makefile.am
+@@ -2,9 +2,9 @@
+ GLIBJ_CLASSPATH='$(top_builddir)/lib/glibj.zip:$(top_builddir)/lib'
+
+ if GCJ_JAVAC
+-JCOMPILER = $(JAVAC) $(JAVACFLAGS) -fsource=1.5 -ftarget=1.5 --encoding=UTF-8 --bootclasspath=$(GLIBJ_CLASSPATH) --classpath='$(top_builddir)/tools/tools.zip'
++JCOMPILER = $(JAVAC) $(JAVACFLAGS) -fsource=1.6 -ftarget=1.6 --encoding=UTF-8 --bootclasspath=$(GLIBJ_CLASSPATH) --classpath='$(top_builddir)/tools/tools.zip'
+ else
+-JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_CLASSPATH) -classpath '$(top_builddir)/tools/tools.zip'
++JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.6 -target 1.6 -encoding UTF-8 -bootclasspath $(GLIBJ_CLASSPATH) -classpath '$(top_builddir)/tools/tools.zip'
+ endif
+
+ # All our example java source files
+diff --git a/lib/Makefile.am b/lib/Makefile.am
+index 50d1baa..97a8b69 100644
+--- a/lib/Makefile.am
++++ b/lib/Makefile.am
+@@ -9,9 +9,9 @@ compile_classpath = $(vm_classes):$(top_srcdir):$(top_srcdir)/external/w3c_dom:$
+
+ # handling source to bytecode compiler programs like gcj, jikes and kjc
+ if GCJ_JAVAC
+-JCOMPILER = $(JAVAC) $(JAVACFLAGS) -fsource=1.5 -ftarget=1.5 --bootclasspath='' --classpath=$(compile_classpath) -d . @classes
++JCOMPILER = $(JAVAC) $(JAVACFLAGS) -fsource=1.6 -ftarget=1.6 --bootclasspath='' --classpath=$(compile_classpath) -d . @classes
+ else
+-JCOMPILER = $(JAVAC) $(JAVACFLAGS) $(JAVAC_MEM_OPT) -source 1.5 -target 1.5 -bootclasspath '' -classpath $(compile_classpath) -d . @classes
++JCOMPILER = $(JAVAC) $(JAVACFLAGS) $(JAVAC_MEM_OPT) -source 1.6 -target 1.6 -bootclasspath '' -classpath $(compile_classpath) -d . @classes
+ endif
+
+ if CREATE_COLLECTIONS
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
@@ -45,6 +80,22 @@ index 7fb298d..fbe24ce 100644
fi
if AC_TRY_COMMAND($CMD) >/dev/null 2>&1; then
ac_cv_prog_javac_works=yes
+diff --git a/tools/Makefile.am b/tools/Makefile.am
+index c5db7cd..54cd2ce 100755
+--- a/tools/Makefile.am
++++ b/tools/Makefile.am
+@@ -14,9 +14,9 @@ GLIBJ_CLASSPATH=asm:$(ANTLR_CLASSPATH)
+
+ # Setup the compiler to use the GNU Classpath library we just built.
+ if GCJ_JAVAC
+-JCOMPILER = $(JAVAC) $(JAVACFLAGS) -fsource=1.5 -ftarget=1.5 --encoding=UTF-8 --bootclasspath=$(GLIBJ_BOOTCLASSPATH) --classpath=$(GLIBJ_CLASSPATH)
++JCOMPILER = $(JAVAC) $(JAVACFLAGS) -fsource=1.6 -ftarget=1.6 --encoding=UTF-8 --bootclasspath=$(GLIBJ_BOOTCLASSPATH) --classpath=$(GLIBJ_CLASSPATH)
+ else
+-JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_BOOTCLASSPATH) -classpath $(GLIBJ_CLASSPATH)
++JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.6 -target 1.6 -encoding UTF-8 -bootclasspath $(GLIBJ_BOOTCLASSPATH) -classpath $(GLIBJ_CLASSPATH)
+ endif
+
+ if CREATE_WRAPPERS
--
1.9.1
diff --git a/patches/classpath-0.99/autogen.sh b/patches/classpath-0.99/autogen.sh
new file mode 100755
index 0000000..9ca025f
--- /dev/null
+++ b/patches/classpath-0.99/autogen.sh
@@ -0,0 +1,2 @@
+#!/bin/bash
+exec ./autogen.sh
diff --git a/rules/classpath.in b/rules/classpath.in
index 16017b2..271a917 100644
--- a/rules/classpath.in
+++ b/rules/classpath.in
@@ -5,6 +5,7 @@ config CLASSPATH
prompt "classpath"
select GCCLIBS_GCC_S
select HOST_SYSTEM_JDK
+ select HOST_GETTEXT
help
GNU Classpath, Essential Libraries for Java, is a GNU project to create
free core class libraries for use with virtual machines and compilers
--
1.9.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2018-11-20 15:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-16 11:20 [ptxdist] [PATCH] " Guillermo Rodríguez
2018-11-16 17:01 ` Michael Olbrich
2018-11-17 0:33 ` Guillermo Rodriguez Garcia
2018-11-17 13:49 ` Michael Olbrich
2018-11-19 9:30 ` Guillermo Rodriguez Garcia
2018-11-22 5:57 ` Michael Olbrich
2018-11-20 15:51 ` Guillermo Rodríguez [this message]
2018-11-20 15:51 ` [ptxdist] [PATCH v2 2/2] classpath: Fix building when default locale is not UTF-8 Guillermo Rodríguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1542729112-28248-1-git-send-email-guille.rodriguez@gmail.com \
--to=guille.rodriguez@gmail.com \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox