1.1 --- a/common/autoconf/platform.m4 Wed May 30 13:15:53 2018 +0800 1.2 +++ b/common/autoconf/platform.m4 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 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. 1.14 # Converts autoconf style CPU name to OpenJDK style, into 1.15 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN. 1.16 @@ -96,6 +102,12 @@ 1.17 VAR_CPU_BITS=64 1.18 VAR_CPU_ENDIAN=big 1.19 ;; 1.20 + mips64el) 1.21 + VAR_CPU=mips64 1.22 + VAR_CPU_ARCH=mips 1.23 + VAR_CPU_BITS=64 1.24 + VAR_CPU_ENDIAN=little 1.25 + ;; 1.26 *) 1.27 AC_MSG_ERROR([unsupported cpu $1]) 1.28 ;; 1.29 @@ -314,6 +326,10 @@ 1.30 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then 1.31 # On all platforms except macosx, we replace x86_64 with amd64. 1.32 OPENJDK_TARGET_CPU_OSARCH="amd64" 1.33 + elif test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xmips64; then 1.34 + # Jin: to be exactly same with OpenJDK 6(mips64) 1.35 + # System.getProperty("os.arch"): mips64 -> mips64el 1.36 + OPENJDK_TARGET_CPU_OSARCH="mips64el" 1.37 fi 1.38 AC_SUBST(OPENJDK_TARGET_CPU_OSARCH) 1.39 1.40 @@ -546,3 +562,39 @@ 1.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)]) 1.42 fi 1.43 ]) 1.44 + 1.45 +AC_DEFUN([GET_BUILDER_AND_HOST_DATA], 1.46 +[ 1.47 +BUILDER_NAME="$build_os" 1.48 +BUILDER_ID="Custom build ($(date))" 1.49 +if test -f /etc/issue; then 1.50 + etc_issue_info=`cat /etc/issue` 1.51 + if test -n "$etc_issue_info"; then 1.52 + BUILDER_NAME=`cat /etc/issue | head -n 1 | cut -d " " -f 1` 1.53 + fi 1.54 +fi 1.55 +if test -f /etc/neokylin-release; then 1.56 + etc_issue_info=`cat /etc/neokylin-release` 1.57 + if test -n "$etc_issue_info"; then 1.58 + BUILDER_NAME=`cat /etc/neokylin-release | head -n 1 | cut -d " " -f 1` 1.59 + fi 1.60 +fi 1.61 +if test -z "$BUILDER_NAME"; then 1.62 + BUILDER_NAME="unknown" 1.63 +fi 1.64 +if test -n "$OPENJDK_TARGET_CPU_OSARCH"; then 1.65 + HOST_NAME="$OPENJDK_TARGET_CPU_OSARCH" 1.66 +else 1.67 + HOST_NAME="unknown" 1.68 +fi 1.69 +if test -f "/usr/bin/cpp"; then 1.70 + # gcc_with_arch_info=`gcc -v 2>&1 | grep '\-\-with-arch=' | sed 's/.*--with-arch=//;s/ .*$//'` 1.71 + gcc_with_arch_info=`cpp -dM /dev/null | grep '\<_MIPS_ARCH\>' | sed 's/^#define _MIPS_ARCH "//;s/"$//'` 1.72 + if test -n "$gcc_with_arch_info"; then 1.73 + HOST_NAME="$gcc_with_arch_info" 1.74 + fi 1.75 +fi 1.76 +AC_SUBST(BUILDER_ID) 1.77 +AC_SUBST(BUILDER_NAME) 1.78 +AC_SUBST(HOST_NAME) 1.79 +])