From: muradm <mail@muradm.net>
To: 49990@debbugs.gnu.org
Subject: bug#49990: [PATCH] gnu: Fix classpath-bootstrap compilation
Date: Fri, 3 Sep 2021 01:27:49 +0300 [thread overview]
Message-ID: <20210902222749.28633-1-mail@muradm.net> (raw)
In-Reply-To: <20210810233801.02639bd8@tachikoma.lepiller.eu>
---
gnu/packages/java.scm | 3 +-
.../patches/classpath-instruction-order.patch | 35 +++++++++++++++++++
2 files changed, 37 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/classpath-instruction-order.patch
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 08ef7a8213..1e29cac401 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -230,7 +230,8 @@ only faster.")
(sha256
(base32
"0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
- (patches (search-patches "classpath-aarch64-support.patch"))))
+ (patches (search-patches "classpath-aarch64-support.patch"
+ "classpath-instruction-order.patch"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
diff --git a/gnu/packages/patches/classpath-instruction-order.patch b/gnu/packages/patches/classpath-instruction-order.patch
new file mode 100644
index 0000000000..278ae912c7
--- /dev/null
+++ b/gnu/packages/patches/classpath-instruction-order.patch
@@ -0,0 +1,35 @@
+diff -ruN ../classpath/classpath-0.93/native/jni/java-io/java_io_VMFile.c ./native/jni/java-io/java_io_VMFile.c
+--- ../classpath/classpath-0.93/native/jni/java-io/java_io_VMFile.c 2006-09-23 08:17:45.000000000 +0300
++++ ./native/jni/java-io/java_io_VMFile.c 2021-09-03 01:08:17.073644627 +0300
+@@ -278,6 +278,7 @@
+ const char *filename;
+ int result;
+ jint entryType;
++ int fres;
+
+ /* Don't use the JCL convert function because it throws an exception
+ on failure */
+@@ -288,9 +289,22 @@
+ }
+
+ result = cpio_checkType (filename, &entryType);
++
++ fres = 1;
++
++ if (result != CPNATIVE_OK)
++ {
++ fres = 0;
++ }
++
++ if (entryType != CPFILE_FILE)
++ {
++ fres = 0;
++ }
++
+ (*env)->ReleaseStringUTFChars (env, name, filename);
+
+- return result == CPNATIVE_OK && entryType == CPFILE_FILE ? 1 : 0;
++ return fres;
+ #else /* not WITHOUT_FILESYSTEM */
+ return 0;
+ #endif /* not WITHOUT_FILESYSTEM */
--
2.33.0
next prev parent reply other threads:[~2021-09-02 22:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-10 21:38 bug#49990: [core-updates-frozen] Ant-bootstrap broken by classpath-bootstrap Julien Lepiller
2021-08-30 11:51 ` Efraim Flashner
2021-08-31 22:32 ` Ludovic Courtès
2021-09-01 1:02 ` Julien Lepiller
2021-09-01 13:53 ` Ludovic Courtès
2021-09-02 14:15 ` Maxime Devos
2021-09-02 14:57 ` Julien Lepiller
2021-09-03 10:11 ` Ludovic Courtès
2021-09-02 22:27 ` muradm [this message]
2021-09-02 22:38 ` bug#49990: [PATCH] gnu: Fix classpath-bootstrap compilation muradm
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210902222749.28633-1-mail@muradm.net \
--to=mail@muradm.net \
--cc=49990@debbugs.gnu.org \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).