8005545: Add System property to identify ARCH specific details such as ARM hard-float binaries
authorvladidan
Fri, 22 Feb 2013 17:12:35 -0500
changeset 16041 b9d38accf302
parent 16040 105e9859a548
child 16042 0bf6469a1cfb
child 16125 0d7b86607d78
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
jdk/makefiles/Images.gmk
jdk/src/share/native/java/lang/System.c
jdk/src/share/native/java/lang/java_props.h
jdk/src/solaris/native/java/lang/java_props_md.c
--- a/jdk/makefiles/Images.gmk	Wed Feb 27 20:34:12 2013 +0530
+++ b/jdk/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/jdk/src/share/native/java/lang/System.c	Wed Feb 27 20:34:12 2013 +0530
+++ b/jdk/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/jdk/src/share/native/java/lang/java_props.h	Wed Feb 27 20:34:12 2013 +0530
+++ b/jdk/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/jdk/src/solaris/native/java/lang/java_props_md.c	Wed Feb 27 20:34:12 2013 +0530
+++ b/jdk/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. */