changeset 7060:093fdf8937bd

8005545: Add System property to identify ARCH specific details such as ARM hard-float binaries Summary: Adding sun.os.abi Java Property support Reviewed-by: bobv, alanb, dholmes
author vladidan
date Fri, 22 Feb 2013 17:12:35 -0500
parents 1b3173c326e6
children f4b01f4e8f35 36ff48ae6ffe
files makefiles/Images.gmk src/share/native/java/lang/System.c src/share/native/java/lang/java_props.h src/solaris/native/java/lang/java_props_md.c
diffstat 4 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/makefiles/Images.gmk	Wed Feb 27 20:34:12 2013 +0530
+++ b/makefiles/Images.gmk	Fri Feb 22 17:12:35 2013 -0500
@@ -602,6 +602,7 @@
 	$(call info-file-item, "OS_NAME",      "$(REQUIRED_OS_NAME)")
 	$(call info-file-item, "OS_VERSION",   "$(REQUIRED_OS_VERSION)")
 	$(call info-file-item, "OS_ARCH",      "$(OPENJDK_TARGET_CPU_LEGACY)")
+	if [ -n "$(JDK_ARCH_ABI_PROP_NAME)" ]; then $(call info-file-item, "SUN_ARCH_ABI", "$(JDK_ARCH_ABI_PROP_NAME)"); fi
 	$(call info-file-item, "SOURCE",       "$(ALL_SOURCE_TIPS)")
 endef
 
--- a/src/share/native/java/lang/System.c	Wed Feb 27 20:34:12 2013 +0530
+++ b/src/share/native/java/lang/System.c	Fri Feb 22 17:12:35 2013 -0500
@@ -212,6 +212,10 @@
     PUTPROP(props, "os.version", sprops->os_version);
     PUTPROP(props, "os.arch", sprops->os_arch);
 
+#ifdef JDK_ARCH_ABI_PROP_NAME
+    PUTPROP(props, "sun.arch.abi", sprops->sun_arch_abi);
+#endif
+
     /* file system properties */
     PUTPROP(props, "file.separator", sprops->file_separator);
     PUTPROP(props, "path.separator", sprops->path_separator);
--- a/src/share/native/java/lang/java_props.h	Wed Feb 27 20:34:12 2013 +0530
+++ b/src/share/native/java/lang/java_props.h	Fri Feb 22 17:12:35 2013 -0500
@@ -41,6 +41,10 @@
     char *os_version;
     char *os_arch;
 
+#ifdef JDK_ARCH_ABI_PROP_NAME
+    char *sun_arch_abi;
+#endif
+
     nchar *tmp_dir;
     nchar *font_dir;
     nchar *user_dir;
--- a/src/solaris/native/java/lang/java_props_md.c	Wed Feb 27 20:34:12 2013 +0530
+++ b/src/solaris/native/java/lang/java_props_md.c	Fri Feb 22 17:12:35 2013 -0500
@@ -514,6 +514,11 @@
         }
     }
 
+    /* ABI property (optional) */
+#ifdef JDK_ARCH_ABI_PROP_NAME
+    sprops.sun_arch_abi = JDK_ARCH_ABI_PROP_NAME;
+#endif
+
     /* Determine the language, country, variant, and encoding from the host,
      * and store these in the user.language, user.country, user.variant and
      * file.encoding system properties. */