19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
19 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
20 # |
20 # |
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
21 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 # or visit www.oracle.com if you need additional information or have any |
22 # or visit www.oracle.com if you need additional information or have any |
23 # questions. |
23 # questions. |
|
24 # |
|
25 |
|
26 # |
|
27 # This file has been modified by Loongson Technology in 2018. These |
|
28 # modifications are Copyright (c) 2018 Loongson Technology, and are made |
|
29 # available on the same license terms set forth above. |
24 # |
30 # |
25 |
31 |
26 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. |
32 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD. |
27 # Converts autoconf style CPU name to OpenJDK style, into |
33 # Converts autoconf style CPU name to OpenJDK style, into |
28 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN. |
34 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN. |
312 # On linux only, we replace x86 with i386. |
324 # On linux only, we replace x86 with i386. |
313 OPENJDK_TARGET_CPU_OSARCH="i386" |
325 OPENJDK_TARGET_CPU_OSARCH="i386" |
314 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then |
326 elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then |
315 # On all platforms except macosx, we replace x86_64 with amd64. |
327 # On all platforms except macosx, we replace x86_64 with amd64. |
316 OPENJDK_TARGET_CPU_OSARCH="amd64" |
328 OPENJDK_TARGET_CPU_OSARCH="amd64" |
|
329 elif test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xmips64; then |
|
330 # Jin: to be exactly same with OpenJDK 6(mips64) |
|
331 # System.getProperty("os.arch"): mips64 -> mips64el |
|
332 OPENJDK_TARGET_CPU_OSARCH="mips64el" |
317 fi |
333 fi |
318 AC_SUBST(OPENJDK_TARGET_CPU_OSARCH) |
334 AC_SUBST(OPENJDK_TARGET_CPU_OSARCH) |
319 |
335 |
320 OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU" |
336 OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU" |
321 if test "x$OPENJDK_TARGET_CPU" = xx86; then |
337 if test "x$OPENJDK_TARGET_CPU" = xx86; then |
544 fi |
560 fi |
545 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then |
561 if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then |
546 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)]) |
562 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)]) |
547 fi |
563 fi |
548 ]) |
564 ]) |
|
565 |
|
566 AC_DEFUN([GET_BUILDER_AND_HOST_DATA], |
|
567 [ |
|
568 BUILDER_NAME="$build_os" |
|
569 BUILDER_ID="Custom build ($(date))" |
|
570 if test -f /etc/issue; then |
|
571 etc_issue_info=`cat /etc/issue` |
|
572 if test -n "$etc_issue_info"; then |
|
573 BUILDER_NAME=`cat /etc/issue | head -n 1 | cut -d " " -f 1` |
|
574 fi |
|
575 fi |
|
576 if test -f /etc/neokylin-release; then |
|
577 etc_issue_info=`cat /etc/neokylin-release` |
|
578 if test -n "$etc_issue_info"; then |
|
579 BUILDER_NAME=`cat /etc/neokylin-release | head -n 1 | cut -d " " -f 1` |
|
580 fi |
|
581 fi |
|
582 if test -z "$BUILDER_NAME"; then |
|
583 BUILDER_NAME="unknown" |
|
584 fi |
|
585 if test -n "$OPENJDK_TARGET_CPU_OSARCH"; then |
|
586 HOST_NAME="$OPENJDK_TARGET_CPU_OSARCH" |
|
587 else |
|
588 HOST_NAME="unknown" |
|
589 fi |
|
590 if test -f "/usr/bin/cpp"; then |
|
591 # gcc_with_arch_info=`gcc -v 2>&1 | grep '\-\-with-arch=' | sed 's/.*--with-arch=//;s/ .*$//'` |
|
592 gcc_with_arch_info=`cpp -dM /dev/null | grep '\<_MIPS_ARCH\>' | sed 's/^#define _MIPS_ARCH "//;s/"$//'` |
|
593 if test -n "$gcc_with_arch_info"; then |
|
594 HOST_NAME="$gcc_with_arch_info" |
|
595 fi |
|
596 fi |
|
597 AC_SUBST(BUILDER_ID) |
|
598 AC_SUBST(BUILDER_NAME) |
|
599 AC_SUBST(HOST_NAME) |
|
600 ]) |