From db0c14d74238bc9fb48d88514acb525a268467e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xerxes=20R=C3=A5nby?= Date: Wed, 5 Sep 2012 14:31:30 +0200 Subject: [PATCH] Set java.vm.info based on makefile info= and set java.vm.version based on makefile version= in order to display relevant OpenJDK -version information. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Matthias Klose Signed-off-by: Xerxes RĂ„nby --- makefile | 1 + src/classpath-openjdk.cpp | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/makefile b/makefile index 7782850780..2dceb23b93 100755 --- a/makefile +++ b/makefile @@ -194,6 +194,7 @@ target-cflags = -DTARGET_BYTES_PER_WORD=$(pointer-size) common-cflags = $(warnings) -fno-rtti -fno-exceptions -I$(classpath-src) \ "-I$(JAVA_HOME)/include" -idirafter $(src) -I$(build) $(classpath-cflags) \ -D__STDC_LIMIT_MACROS -D_JNI_IMPLEMENTATION_ -DAVIAN_VERSION=\"$(version)\" \ + -DAVIAN_INFO="\"$(info)\"" \ -DUSE_ATOMIC_OPERATIONS -DAVIAN_JAVA_HOME=\"$(javahome)\" \ -DAVIAN_EMBED_PREFIX=\"$(embed-prefix)\" $(target-cflags) diff --git a/src/classpath-openjdk.cpp b/src/classpath-openjdk.cpp index 97c5a3372e..003b2ef1e2 100644 --- a/src/classpath-openjdk.cpp +++ b/src/classpath-openjdk.cpp @@ -3006,6 +3006,12 @@ jvmInitProperties(Thread* t, uintptr_t* arguments) "Avian Contributors"); local::setProperty(t, method, *properties, "java.vm.name","Avian"); +#ifdef AVIAN_VERSION + local::setProperty(t, method, *properties, "java.vm.version",AVIAN_VERSION); +#endif +#ifdef AVIAN_INFO + local::setProperty(t, method, *properties, "java.vm.info",AVIAN_INFO); +#endif local::setProperty (t, method, *properties, "java.home",