diff options
-rw-r--r-- | bootstrap/classpath-0.93/APKBUILD | 46 | ||||
-rw-r--r-- | bootstrap/classpath-0.93/add-aarch64-endianness.patch | 29 | ||||
-rw-r--r-- | bootstrap/classpath-0.93/em64t-vmfile-return.patch | 71 |
3 files changed, 146 insertions, 0 deletions
diff --git a/bootstrap/classpath-0.93/APKBUILD b/bootstrap/classpath-0.93/APKBUILD new file mode 100644 index 000000000..8ef9df182 --- /dev/null +++ b/bootstrap/classpath-0.93/APKBUILD @@ -0,0 +1,46 @@ +# Maintainer: Horst Burkhardt <horst@adelielinux.org> +pkgname=classpath +pkgver=0.93 +pkgrel=0 +pkgdesc="GNU Classpath Java Class Library" +url="https://www.gnu.org/software/classpath/" +arch="all" +options="!check" +license="GPL-2.0-with-classpath-exception" +depends="" +makedepends="zlib-dev fastjar jikes libltdl" +subpackages="$pkgname-dev $pkgname-doc" +source="ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.gz + add-aarch64-endianness.patch + em64t-vmfile-return.patch" +builddir="$srcdir/" + +prepare() { + default_prepare + } + +build() { + export JAVAC="/usr/bin/jikes" + export BOOTCLASSPATH="none" + ./configure \ + --disable-Werror \ + --disable-gmp \ + --disable-gtk-peer \ + --disable-gconf-peer \ + --disable-plugin \ + --disable-dssi \ + --disable-alsa \ + --disable-gjdoc \ + --bindir=/usr/libexec/classpath \ + --with-glibj-dir=/usr/share/classpath \ + --includedir=/usr/include/classpath + make DESTDIR=/usr + } + +package() { + make DESTDIR=/usr install + } + +sha512sums="69d831361085514bb7c5607fa694914cc01bc9fe589b7744d5534c97d434722193a1b68a336642d0dba9a3b50e9acea0364741790e9f19d196e5956a51c320b0 classpath-0.93.tar.gz +d3aeabaa4e7adcacc15d0122a0bd27621e89e2ec58d1af3ace620f7d923676e9d323c27f387790a66fec68db91174f9b14df4697f04ad270820259f749a1ae51 add-aarch64-endianness.patch +5cb45b3cb4bb18ea4befeec9b29c162dcf8c20ce5207e1b28986d7a7584e7ba32a0cc5489c5c22fa45821375936cf3f7dc9288b8711c26d044bcc53e084f48dd em64t-vmfile-return.patch" diff --git a/bootstrap/classpath-0.93/add-aarch64-endianness.patch b/bootstrap/classpath-0.93/add-aarch64-endianness.patch new file mode 100644 index 000000000..6fdac0c4f --- /dev/null +++ b/bootstrap/classpath-0.93/add-aarch64-endianness.patch @@ -0,0 +1,29 @@ +This is modeled after the ia64 support. Aarch64 can be either big endian +or little endian, so we add the case for both. + +--- + native/fdlibm/ieeefp.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/native/fdlibm/ieeefp.h b/native/fdlibm/ieeefp.h +index 1a9740f..73455c0 100644 +--- a/native/fdlibm/ieeefp.h ++++ b/native/fdlibm/ieeefp.h +@@ -27,6 +27,14 @@ + #endif + #endif + ++#ifdef __aarch64__ ++#ifdef __BIG_ENDIAN__ ++#define __IEEE_BIG_ENDIAN ++#else ++#define __IEEE_LITTLE_ENDIAN ++#endif ++#endif ++ + #ifdef __hppa__ + #define __IEEE_BIG_ENDIAN + #endif +-- +2.16.3 + diff --git a/bootstrap/classpath-0.93/em64t-vmfile-return.patch b/bootstrap/classpath-0.93/em64t-vmfile-return.patch new file mode 100644 index 000000000..c3a569ea4 --- /dev/null +++ b/bootstrap/classpath-0.93/em64t-vmfile-return.patch @@ -0,0 +1,71 @@ +For some reason, the original code gets miscompiled on x86_64, leading +'Java_java_io_VMFile_isFile' to return true when the return value of +'cpio_checkType' is ENOENT (= 2). + +See <https://issues.guix.gnu.org/issue/36685> +and <https://issues.guix.gnu.org/49990>. + +diff --git a/native/jni/java-io/java_io_VMFile.c b/native/jni/java-io/java_io_VMFile.c +index de1320b..6695e1f 100644 +--- a/native/jni/java-io/java_io_VMFile.c ++++ b/native/jni/java-io/java_io_VMFile.c +@@ -240,6 +240,7 @@ Java_java_io_VMFile_exists (JNIEnv * env, + #ifndef WITHOUT_FILESYSTEM + const char *filename; + int result; ++ jboolean exists; + + /* Don't use the JCL convert function because it throws an exception + on failure */ +@@ -250,9 +251,10 @@ Java_java_io_VMFile_exists (JNIEnv * env, + } + + result = cpio_isFileExists (filename); ++ exists = (result == CPNATIVE_OK ? 1 : 0); + (*env)->ReleaseStringUTFChars (env, name, filename); + +- return result == CPNATIVE_OK ? 1 : 0; ++ return exists; + #else /* not WITHOUT_FILESYSTEM */ + return 0; + #endif /* not WITHOUT_FILESYSTEM */ +@@ -278,6 +280,7 @@ Java_java_io_VMFile_isFile (JNIEnv * env, + const char *filename; + int result; + jint entryType; ++ jboolean isfile; + + /* Don't use the JCL convert function because it throws an exception + on failure */ +@@ -288,9 +291,10 @@ Java_java_io_VMFile_isFile (JNIEnv * env, + } + + result = cpio_checkType (filename, &entryType); ++ isfile = (result == CPNATIVE_OK && entryType == CPFILE_FILE ? 1 : 0); + (*env)->ReleaseStringUTFChars (env, name, filename); + +- return result == CPNATIVE_OK && entryType == CPFILE_FILE ? 1 : 0; ++ return isfile; + #else /* not WITHOUT_FILESYSTEM */ + return 0; + #endif /* not WITHOUT_FILESYSTEM */ +@@ -315,6 +319,7 @@ Java_java_io_VMFile_isDirectory (JNIEnv * env, + const char *filename; + int result; + jint entryType; ++ jboolean isdirectory; + + /* Don't use the JCL convert function because it throws an exception + on failure */ +@@ -325,9 +330,10 @@ Java_java_io_VMFile_isDirectory (JNIEnv * env, + } + + result = cpio_checkType (filename, &entryType); ++ isdirectory = (result == CPNATIVE_OK && entryType == CPFILE_DIRECTORY ? 1 : 0); + (*env)->ReleaseStringUTFChars (env, name, filename); + +- return result == CPNATIVE_OK && entryType == CPFILE_DIRECTORY ? 1 : 0; ++ return isdirectory; + #else /* not WITHOUT_FILESYSTEM */ + return 0; + #endif /* not WITHOUT_FILESYSTEM */ |