Tue, 24 Jul 2018 13:19:47 +0800
#6580 added Loongson release info to java -version output
Summary: info includes Loongson OpenJDK version, host name and build OS name
Reviewed-by: zhaixiang
1.1 --- a/common/autoconf/configure.ac Wed May 30 13:15:53 2018 +0800 1.2 +++ b/common/autoconf/configure.ac Tue Jul 24 13:19:47 2018 +0800 1.3 @@ -23,6 +23,12 @@ 1.4 # questions. 1.5 # 1.6 1.7 +# 1.8 +# This file has been modified by Loongson Technology in 2018. These 1.9 +# modifications are Copyright (c) 2018 Loongson Technology, and are made 1.10 +# available on the same license terms set forth above. 1.11 +# 1.12 + 1.13 ############################################################################### 1.14 # 1.15 # Includes and boilerplate 1.16 @@ -163,6 +169,7 @@ 1.17 # And we can test some aspects on the target using configure macros. 1.18 PLATFORM_SETUP_OPENJDK_TARGET_BITS 1.19 PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS 1.20 +GET_BUILDER_AND_HOST_DATA 1.21 1.22 # Configure flags for the tools 1.23 TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS
2.1 --- a/common/autoconf/generated-configure.sh Wed May 30 13:15:53 2018 +0800 2.2 +++ b/common/autoconf/generated-configure.sh Tue Jul 24 13:19:47 2018 +0800 2.3 @@ -14,12 +14,6 @@ 2.4 ## M4sh Initialization. ## 2.5 ## -------------------- ## 2.6 2.7 -# 2.8 -# This file has been modified by Loongson Technology in 2015. These 2.9 -# modifications are Copyright (c) 2015 Loongson Technology, and are made 2.10 -# available on the same license terms set forth above. 2.11 -# 2.12 - 2.13 # Be more Bourne compatible 2.14 DUALCASE=1; export DUALCASE # for MKS sh 2.15 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 2.16 @@ -718,6 +712,9 @@ 2.17 SHARED_LIBRARY 2.18 OBJ_SUFFIX 2.19 COMPILER_NAME 2.20 +HOST_NAME 2.21 +BUILDER_NAME 2.22 +BUILDER_ID 2.23 JT_HOME 2.24 JTREGEXE 2.25 ac_ct_OBJDUMP 2.26 @@ -3707,6 +3704,12 @@ 2.27 # questions. 2.28 # 2.29 2.30 +# 2.31 +# This file has been modified by Loongson Technology in 2018. These 2.32 +# modifications are Copyright (c) 2018 Loongson Technology, and are made 2.33 +# available on the same license terms set forth above. 2.34 +# 2.35 + 2.36 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. 2.37 # Converts autoconf style CPU name to OpenJDK style, into 2.38 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN. 2.39 @@ -3749,6 +3752,8 @@ 2.40 2.41 2.42 2.43 + 2.44 + 2.45 # 2.46 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 2.47 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 2.48 @@ -3918,7 +3923,7 @@ 2.49 #CUSTOM_AUTOCONF_INCLUDE 2.50 2.51 # Do not change or remove the following line, it is needed for consistency checks: 2.52 -DATE_WHEN_GENERATED=1521483882 2.53 +DATE_WHEN_GENERATED=1532409520 2.54 2.55 ############################################################################### 2.56 # 2.57 @@ -7220,8 +7225,8 @@ 2.58 # On all platforms except macosx, we replace x86_64 with amd64. 2.59 OPENJDK_TARGET_CPU_OSARCH="amd64" 2.60 elif test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xmips64; then 2.61 - # 2013/11/13 Jin: to be exactly same with OpenJDK 6(mips64) 2.62 - # System.getProperty("os.arch"): mips64 -> mips64el 2.63 + # Jin: to be exactly same with OpenJDK 6(mips64) 2.64 + # System.getProperty("os.arch"): mips64 -> mips64el 2.65 OPENJDK_TARGET_CPU_OSARCH="mips64el" 2.66 fi 2.67 2.68 @@ -29363,6 +29368,40 @@ 2.69 fi 2.70 2.71 2.72 +BUILDER_NAME="$build_os" 2.73 +BUILDER_ID="Custom build ($(date))" 2.74 +if test -f /etc/issue; then 2.75 + etc_issue_info=`cat /etc/issue` 2.76 + if test -n "$etc_issue_info"; then 2.77 + BUILDER_NAME=`cat /etc/issue | head -n 1 | cut -d " " -f 1` 2.78 + fi 2.79 +fi 2.80 +if test -f /etc/neokylin-release; then 2.81 + etc_issue_info=`cat /etc/neokylin-release` 2.82 + if test -n "$etc_issue_info"; then 2.83 + BUILDER_NAME=`cat /etc/neokylin-release | head -n 1 | cut -d " " -f 1` 2.84 + fi 2.85 +fi 2.86 +if test -z "$BUILDER_NAME"; then 2.87 + BUILDER_NAME="unknown" 2.88 +fi 2.89 +if test -n "$OPENJDK_TARGET_CPU_OSARCH"; then 2.90 + HOST_NAME="$OPENJDK_TARGET_CPU_OSARCH" 2.91 +else 2.92 + HOST_NAME="unknown" 2.93 +fi 2.94 +if test -f "/usr/bin/cpp"; then 2.95 + # gcc_with_arch_info=`gcc -v 2>&1 | grep '\-\-with-arch=' | sed 's/.*--with-arch=//;s/ .*$//'` 2.96 + gcc_with_arch_info=`cpp -dM /dev/null | grep '\<_MIPS_ARCH\>' | sed 's/^#define _MIPS_ARCH "//;s/"$//'` 2.97 + if test -n "$gcc_with_arch_info"; then 2.98 + HOST_NAME="$gcc_with_arch_info" 2.99 + fi 2.100 +fi 2.101 + 2.102 + 2.103 + 2.104 + 2.105 + 2.106 # Configure flags for the tools 2.107 2.108
3.1 --- a/common/autoconf/platform.m4 Wed May 30 13:15:53 2018 +0800 3.2 +++ b/common/autoconf/platform.m4 Tue Jul 24 13:19:47 2018 +0800 3.3 @@ -23,6 +23,12 @@ 3.4 # questions. 3.5 # 3.6 3.7 +# 3.8 +# This file has been modified by Loongson Technology in 2018. These 3.9 +# modifications are Copyright (c) 2018 Loongson Technology, and are made 3.10 +# available on the same license terms set forth above. 3.11 +# 3.12 + 3.13 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. 3.14 # Converts autoconf style CPU name to OpenJDK style, into 3.15 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN. 3.16 @@ -96,6 +102,12 @@ 3.17 VAR_CPU_BITS=64 3.18 VAR_CPU_ENDIAN=big 3.19 ;; 3.20 + mips64el) 3.21 + VAR_CPU=mips64 3.22 + VAR_CPU_ARCH=mips 3.23 + VAR_CPU_BITS=64 3.24 + VAR_CPU_ENDIAN=little 3.25 + ;; 3.26 *) 3.27 AC_MSG_ERROR([unsupported cpu $1]) 3.28 ;; 3.29 @@ -314,6 +326,10 @@ 3.30 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 3.31 # On all platforms except macosx, we replace x86_64 with amd64. 3.32 OPENJDK_TARGET_CPU_OSARCH="amd64" 3.33 + elif test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xmips64; then 3.34 + # Jin: to be exactly same with OpenJDK 6(mips64) 3.35 + # System.getProperty("os.arch"): mips64 -> mips64el 3.36 + OPENJDK_TARGET_CPU_OSARCH="mips64el" 3.37 fi 3.38 AC_SUBST(OPENJDK_TARGET_CPU_OSARCH) 3.39 3.40 @@ -546,3 +562,39 @@ 3.41 AC_MSG_ERROR([The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)]) 3.42 fi 3.43 ]) 3.44 + 3.45 +AC_DEFUN([GET_BUILDER_AND_HOST_DATA], 3.46 +[ 3.47 +BUILDER_NAME="$build_os" 3.48 +BUILDER_ID="Custom build ($(date))" 3.49 +if test -f /etc/issue; then 3.50 + etc_issue_info=`cat /etc/issue` 3.51 + if test -n "$etc_issue_info"; then 3.52 + BUILDER_NAME=`cat /etc/issue | head -n 1 | cut -d " " -f 1` 3.53 + fi 3.54 +fi 3.55 +if test -f /etc/neokylin-release; then 3.56 + etc_issue_info=`cat /etc/neokylin-release` 3.57 + if test -n "$etc_issue_info"; then 3.58 + BUILDER_NAME=`cat /etc/neokylin-release | head -n 1 | cut -d " " -f 1` 3.59 + fi 3.60 +fi 3.61 +if test -z "$BUILDER_NAME"; then 3.62 + BUILDER_NAME="unknown" 3.63 +fi 3.64 +if test -n "$OPENJDK_TARGET_CPU_OSARCH"; then 3.65 + HOST_NAME="$OPENJDK_TARGET_CPU_OSARCH" 3.66 +else 3.67 + HOST_NAME="unknown" 3.68 +fi 3.69 +if test -f "/usr/bin/cpp"; then 3.70 + # gcc_with_arch_info=`gcc -v 2>&1 | grep '\-\-with-arch=' | sed 's/.*--with-arch=//;s/ .*$//'` 3.71 + gcc_with_arch_info=`cpp -dM /dev/null | grep '\<_MIPS_ARCH\>' | sed 's/^#define _MIPS_ARCH "//;s/"$//'` 3.72 + if test -n "$gcc_with_arch_info"; then 3.73 + HOST_NAME="$gcc_with_arch_info" 3.74 + fi 3.75 +fi 3.76 +AC_SUBST(BUILDER_ID) 3.77 +AC_SUBST(BUILDER_NAME) 3.78 +AC_SUBST(HOST_NAME) 3.79 +])
4.1 --- a/common/autoconf/spec.gmk.in Wed May 30 13:15:53 2018 +0800 4.2 +++ b/common/autoconf/spec.gmk.in Tue Jul 24 13:19:47 2018 +0800 4.3 @@ -23,6 +23,12 @@ 4.4 # questions. 4.5 # 4.6 4.7 +# 4.8 +# This file has been modified by Loongson Technology in 2018. These 4.9 +# modifications are Copyright (c) 2018 Loongson Technology, and are made 4.10 +# available on the same license terms set forth above. 4.11 +# 4.12 + 4.13 # Configured @DATE_WHEN_CONFIGURED@ to build 4.14 # for target system @OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU@ 4.15 # (called @OPENJDK_TARGET_AUTOCONF_NAME@ by autoconf) 4.16 @@ -108,6 +114,11 @@ 4.17 REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@ 4.18 REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@ 4.19 4.20 +# Build OS and host values for use in Loongson OpenJDK release 4.21 +BUILDER_ID = @BUILDER_ID@ 4.22 +BUILDER_NAME = @BUILDER_NAME@ 4.23 +HOST_NAME = @HOST_NAME@ 4.24 + 4.25 @SET_OPENJDK@ 4.26 LIBM:=-lm 4.27 LIBDL:=@LIBDL@