# HG changeset patch # User aoqi # Date 1532409587 -28800 # Node ID e50b76885c1680fb8e19c1abeb1d37bd31f374ee # Parent 9dc587b6adf97b3226843291d8999b19c21024c1 #6580 added Loongson release info to java -version output Summary: info includes Loongson OpenJDK version, host name and build OS name Reviewed-by: zhaixiang diff -r 9dc587b6adf9 -r e50b76885c16 common/autoconf/configure.ac --- a/common/autoconf/configure.ac Wed May 30 13:15:53 2018 +0800 +++ b/common/autoconf/configure.ac Tue Jul 24 13:19:47 2018 +0800 @@ -23,6 +23,12 @@ # questions. # +# +# This file has been modified by Loongson Technology in 2018. These +# modifications are Copyright (c) 2018 Loongson Technology, and are made +# available on the same license terms set forth above. +# + ############################################################################### # # Includes and boilerplate @@ -163,6 +169,7 @@ # And we can test some aspects on the target using configure macros. PLATFORM_SETUP_OPENJDK_TARGET_BITS PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS +GET_BUILDER_AND_HOST_DATA # Configure flags for the tools TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS diff -r 9dc587b6adf9 -r e50b76885c16 common/autoconf/generated-configure.sh --- a/common/autoconf/generated-configure.sh Wed May 30 13:15:53 2018 +0800 +++ b/common/autoconf/generated-configure.sh Tue Jul 24 13:19:47 2018 +0800 @@ -14,12 +14,6 @@ ## M4sh Initialization. ## ## -------------------- ## -# -# This file has been modified by Loongson Technology in 2015. These -# modifications are Copyright (c) 2015 Loongson Technology, and are made -# available on the same license terms set forth above. -# - # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : @@ -718,6 +712,9 @@ SHARED_LIBRARY OBJ_SUFFIX COMPILER_NAME +HOST_NAME +BUILDER_NAME +BUILDER_ID JT_HOME JTREGEXE ac_ct_OBJDUMP @@ -3707,6 +3704,12 @@ # questions. # +# +# This file has been modified by Loongson Technology in 2018. These +# modifications are Copyright (c) 2018 Loongson Technology, and are made +# available on the same license terms set forth above. +# + # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. # Converts autoconf style CPU name to OpenJDK style, into # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN. @@ -3749,6 +3752,8 @@ + + # # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -3918,7 +3923,7 @@ #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1521483882 +DATE_WHEN_GENERATED=1532409520 ############################################################################### # @@ -7220,8 +7225,8 @@ # On all platforms except macosx, we replace x86_64 with amd64. OPENJDK_TARGET_CPU_OSARCH="amd64" elif test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xmips64; then - # 2013/11/13 Jin: to be exactly same with OpenJDK 6(mips64) - # System.getProperty("os.arch"): mips64 -> mips64el + # Jin: to be exactly same with OpenJDK 6(mips64) + # System.getProperty("os.arch"): mips64 -> mips64el OPENJDK_TARGET_CPU_OSARCH="mips64el" fi @@ -29363,6 +29368,40 @@ fi +BUILDER_NAME="$build_os" +BUILDER_ID="Custom build ($(date))" +if test -f /etc/issue; then + etc_issue_info=`cat /etc/issue` + if test -n "$etc_issue_info"; then + BUILDER_NAME=`cat /etc/issue | head -n 1 | cut -d " " -f 1` + fi +fi +if test -f /etc/neokylin-release; then + etc_issue_info=`cat /etc/neokylin-release` + if test -n "$etc_issue_info"; then + BUILDER_NAME=`cat /etc/neokylin-release | head -n 1 | cut -d " " -f 1` + fi +fi +if test -z "$BUILDER_NAME"; then + BUILDER_NAME="unknown" +fi +if test -n "$OPENJDK_TARGET_CPU_OSARCH"; then + HOST_NAME="$OPENJDK_TARGET_CPU_OSARCH" +else + HOST_NAME="unknown" +fi +if test -f "/usr/bin/cpp"; then + # gcc_with_arch_info=`gcc -v 2>&1 | grep '\-\-with-arch=' | sed 's/.*--with-arch=//;s/ .*$//'` + gcc_with_arch_info=`cpp -dM /dev/null | grep '\<_MIPS_ARCH\>' | sed 's/^#define _MIPS_ARCH "//;s/"$//'` + if test -n "$gcc_with_arch_info"; then + HOST_NAME="$gcc_with_arch_info" + fi +fi + + + + + # Configure flags for the tools diff -r 9dc587b6adf9 -r e50b76885c16 common/autoconf/platform.m4 --- a/common/autoconf/platform.m4 Wed May 30 13:15:53 2018 +0800 +++ b/common/autoconf/platform.m4 Tue Jul 24 13:19:47 2018 +0800 @@ -23,6 +23,12 @@ # questions. # +# +# This file has been modified by Loongson Technology in 2018. These +# modifications are Copyright (c) 2018 Loongson Technology, and are made +# available on the same license terms set forth above. +# + # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. # Converts autoconf style CPU name to OpenJDK style, into # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN. @@ -96,6 +102,12 @@ VAR_CPU_BITS=64 VAR_CPU_ENDIAN=big ;; + mips64el) + VAR_CPU=mips64 + VAR_CPU_ARCH=mips + VAR_CPU_BITS=64 + VAR_CPU_ENDIAN=little + ;; *) AC_MSG_ERROR([unsupported cpu $1]) ;; @@ -314,6 +326,10 @@ elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then # On all platforms except macosx, we replace x86_64 with amd64. OPENJDK_TARGET_CPU_OSARCH="amd64" + elif test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xmips64; then + # Jin: to be exactly same with OpenJDK 6(mips64) + # System.getProperty("os.arch"): mips64 -> mips64el + OPENJDK_TARGET_CPU_OSARCH="mips64el" fi AC_SUBST(OPENJDK_TARGET_CPU_OSARCH) @@ -546,3 +562,39 @@ 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)]) fi ]) + +AC_DEFUN([GET_BUILDER_AND_HOST_DATA], +[ +BUILDER_NAME="$build_os" +BUILDER_ID="Custom build ($(date))" +if test -f /etc/issue; then + etc_issue_info=`cat /etc/issue` + if test -n "$etc_issue_info"; then + BUILDER_NAME=`cat /etc/issue | head -n 1 | cut -d " " -f 1` + fi +fi +if test -f /etc/neokylin-release; then + etc_issue_info=`cat /etc/neokylin-release` + if test -n "$etc_issue_info"; then + BUILDER_NAME=`cat /etc/neokylin-release | head -n 1 | cut -d " " -f 1` + fi +fi +if test -z "$BUILDER_NAME"; then + BUILDER_NAME="unknown" +fi +if test -n "$OPENJDK_TARGET_CPU_OSARCH"; then + HOST_NAME="$OPENJDK_TARGET_CPU_OSARCH" +else + HOST_NAME="unknown" +fi +if test -f "/usr/bin/cpp"; then + # gcc_with_arch_info=`gcc -v 2>&1 | grep '\-\-with-arch=' | sed 's/.*--with-arch=//;s/ .*$//'` + gcc_with_arch_info=`cpp -dM /dev/null | grep '\<_MIPS_ARCH\>' | sed 's/^#define _MIPS_ARCH "//;s/"$//'` + if test -n "$gcc_with_arch_info"; then + HOST_NAME="$gcc_with_arch_info" + fi +fi +AC_SUBST(BUILDER_ID) +AC_SUBST(BUILDER_NAME) +AC_SUBST(HOST_NAME) +]) diff -r 9dc587b6adf9 -r e50b76885c16 common/autoconf/spec.gmk.in --- a/common/autoconf/spec.gmk.in Wed May 30 13:15:53 2018 +0800 +++ b/common/autoconf/spec.gmk.in Tue Jul 24 13:19:47 2018 +0800 @@ -23,6 +23,12 @@ # questions. # +# +# This file has been modified by Loongson Technology in 2018. These +# modifications are Copyright (c) 2018 Loongson Technology, and are made +# available on the same license terms set forth above. +# + # Configured @DATE_WHEN_CONFIGURED@ to build # for target system @OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU@ # (called @OPENJDK_TARGET_AUTOCONF_NAME@ by autoconf) @@ -108,6 +114,11 @@ REQUIRED_OS_NAME:=@REQUIRED_OS_NAME@ REQUIRED_OS_VERSION:=@REQUIRED_OS_VERSION@ +# Build OS and host values for use in Loongson OpenJDK release +BUILDER_ID = @BUILDER_ID@ +BUILDER_NAME = @BUILDER_NAME@ +HOST_NAME = @HOST_NAME@ + @SET_OPENJDK@ LIBM:=-lm LIBDL:=@LIBDL@