changeset 2810:a3dbf73342b5

PR2172: --enable-jamvm builds broken, missing JVM_GetTemporaryDirectory impl 2015-07-13 Andrew John Hughes <gnu_andrew@member.fsf.org> PR2172: --enable-jamvm builds broken, missing JVM_GetTemporaryDirectory impl * Makefile.am: (ICEDTEA_PATCHES): Add PR2172 patch. * NEWS: Updated. * patches/jamvm/pr2172-tempdir.patch: Implement JVM_GetTemporaryDirectory.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Mon, 13 Jul 2015 15:12:51 +0100
parents e3ceb97f3089
children c963ccc12877
files ChangeLog Makefile.am NEWS patches/jamvm/pr2172-tempdir.patch
diffstat 4 files changed, 38 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jul 13 11:27:42 2015 +0100
+++ b/ChangeLog	Mon Jul 13 15:12:51 2015 +0100
@@ -1,3 +1,13 @@
+2015-07-13  Andrew John Hughes  <gnu_andrew@member.fsf.org>
+
+	PR2172: --enable-jamvm builds broken, missing
+	JVM_GetTemporaryDirectory impl
+	* Makefile.am:
+	(ICEDTEA_PATCHES): Add PR2172 patch.
+	* NEWS: Updated.
+	* patches/jamvm/pr2172-tempdir.patch:
+	Implement JVM_GetTemporaryDirectory.
+
 2015-07-13  Andrew John Hughes  <gnu_andrew@member.fsf.org>
 
 	* AUTHORS: Add James.
--- a/Makefile.am	Mon Jul 13 11:27:42 2015 +0100
+++ b/Makefile.am	Mon Jul 13 15:12:51 2015 +0100
@@ -271,7 +271,8 @@
 
 if BUILD_JAMVM
 ICEDTEA_PATCHES += \
-	patches/jamvm/find_class_from_caller.patch
+	patches/jamvm/find_class_from_caller.patch \
+	patches/jamvm/pr2172-tempdir.patch
 endif
 
 if ENABLE_NSS
--- a/NEWS	Mon Jul 13 11:27:42 2015 +0100
+++ b/NEWS	Mon Jul 13 15:12:51 2015 +0100
@@ -439,6 +439,8 @@
   - PR2380: Raise javadoc and JAVAC_FLAGS memory limits for CACAO
   - PR2519: Update to latest CACAO
   - PR2520: --enable-cacao builds broken, missing JVM_GetTemporaryDirectory impl.
+* JamVM
+  - PR2172: --enable-jamvm builds broken, missing JVM_GetTemporaryDirectory impl
 * ARM32 port
   - PR2228: Add ARM32 JIT
   - PR2297: Use the IcedTea 2.6.0 HotSpot on ARM32 by default
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/jamvm/pr2172-tempdir.patch	Mon Jul 13 15:12:51 2015 +0100
@@ -0,0 +1,24 @@
+diff --git a/src/classlib/openjdk/jvm.c b/src/classlib/openjdk/jvm.c
+index 971ac75..b5f4cae 100644
+--- jamvm.old/jamvm/src/classlib/openjdk/jvm.c
++++ jamvm/jamvm/src/classlib/openjdk/jvm.c
+@@ -3038,3 +3038,19 @@ jint JVM_FindSignal(const char *name) {
+ 
+     return signals[i].number;
+ }
++
++/* JVM_GetTemporaryDirectory
++ * Return the temporary directory that the VM uses for the attach
++ * and perf data files.
++ *
++ * It is important that this directory is well-known and the
++ * same for all VM instances. It cannot be affected by configuration
++ * variables such as java.io.tmpdir.
++ */
++jstring JVM_GetTemporaryDirectory(JNIEnv *env) {
++    TRACE("JVM_GetTemporaryDirectory(env=%p)", env);
++
++// This must be hard coded because it's the system's temporary
++// directory not the java application's temp directory, ala java.io.tmpdir.
++    return createString("/tmp");
++}