diff --git a/makefiles/Images.gmk b/makefiles/Images.gmk index 28322675559a05e3ebf711f091d20510b691d967..029a488f0f0c3e852669267c4a290cf7318741ea 100644 --- a/makefiles/Images.gmk +++ b/makefiles/Images.gmk @@ -602,6 +602,7 @@ define create-info-file $(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 diff --git a/src/share/native/java/lang/System.c b/src/share/native/java/lang/System.c index 8efd95e09b7b44cf41a1b29817be8235ca50d4dc..faef4b09314b4f86dbcd1763f7369db0fc7c6946 100644 --- a/src/share/native/java/lang/System.c +++ b/src/share/native/java/lang/System.c @@ -212,6 +212,10 @@ Java_java_lang_System_initProperties(JNIEnv *env, jclass cla, jobject props) 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); diff --git a/src/share/native/java/lang/java_props.h b/src/share/native/java/lang/java_props.h index e6c11c262c011b26e0c42359ea3b16bcfbe4a5c1..86a69d7a1241e82d0b85bda4a9466543e6e3e064 100644 --- a/src/share/native/java/lang/java_props.h +++ b/src/share/native/java/lang/java_props.h @@ -41,6 +41,10 @@ typedef struct { 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; diff --git a/src/solaris/native/java/lang/java_props_md.c b/src/solaris/native/java/lang/java_props_md.c index c7d3ba6eff5fe768b0bc577b83ada10e09518506..c8c189825859aad892322557d89663ef54c32da2 100644 --- a/src/solaris/native/java/lang/java_props_md.c +++ b/src/solaris/native/java/lang/java_props_md.c @@ -514,6 +514,11 @@ GetJavaProperties(JNIEnv *env) } } + /* 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. */