common/autoconf/platform.m4
author katleman
Thu, 02 Aug 2012 15:32:36 -0700
changeset 13330 3cb655c7a1f2
parent 13132 bd88bb8dd3af
child 13697 5262b00bc10c
permissions -rw-r--r--
Added tag jdk8-b50 for changeset 3d3a1c3550f3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     1
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     2
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     4
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     7
# published by the Free Software Foundation.  Oracle designates this
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     8
# particular file as subject to the "Classpath" exception as provided
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
     9
# by Oracle in the LICENSE file that accompanied this code.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    10
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    11
# This code is distributed in the hope that it will be useful, but WITHOUT
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    14
# version 2 for more details (a copy is included in the LICENSE file that
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    15
# accompanied this code).
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    16
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    17
# You should have received a copy of the GNU General Public License version
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    18
# 2 along with this work; if not, write to the Free Software Foundation,
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    20
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    22
# or visit www.oracle.com if you need additional information or have any
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    23
# questions.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    24
#
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    25
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    26
AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD_AND_LEGACY_VARS],
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    27
[
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    28
    # Expects $host_os $host_cpu $build_os and $build_cpu
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    29
    # and $with_target_bits to have been setup!
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    30
    #
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    31
    # Translate the standard triplet(quadruplet) definition
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    32
    # of the target/build system into
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    33
    # OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    34
    # OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    35
    # OPENJDK_TARGET_OS_API=posix,winapi
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    36
    # 
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    37
    # OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    38
    # OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    39
    # OPENJDK_TARGET_CPU_BITS=32,64
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    40
    # OPENJDK_TARGET_CPU_ENDIAN=big,little
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    41
    #
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    42
    # The same values are setup for BUILD_...
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    43
    # 
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    44
    # And the legacy variables, for controlling the old makefiles.
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    45
    # LEGACY_OPENJDK_TARGET_CPU1=i586,amd64/x86_64,sparc,sparcv9,arm,arm64...
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    46
    # LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,sparc,sparcv9,arm,arm64...
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    47
    # LEGACY_OPENJDK_TARGET_CPU3=sparcv9,amd64 (but only on solaris)
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    48
    # LEGACY_OPENJDK_TARGET_OS_API=solaris,windows
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    49
    #
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    50
    # We also copy the autoconf trip/quadruplet
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    51
    # verbatim to OPENJDK_TARGET_SYSTEM (from the autoconf "host") and OPENJDK_BUILD_SYSTEM
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    52
    OPENJDK_TARGET_SYSTEM="$host"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    53
    OPENJDK_BUILD_SYSTEM="$build"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    54
    AC_SUBST(OPENJDK_TARGET_SYSTEM)
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    55
    AC_SUBST(OPENJDK_BUILD_SYSTEM)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    56
    
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    57
    PLATFORM_EXTRACT_VARS_FROM_OS_TO(OPENJDK_TARGET,$host_os)
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    58
    PLATFORM_EXTRACT_VARS_FROM_CPU_TO(OPENJDK_TARGET,$host_cpu)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    59
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    60
    PLATFORM_EXTRACT_VARS_FROM_OS_TO(OPENJDK_BUILD,$build_os)
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    61
    PLATFORM_EXTRACT_VARS_FROM_CPU_TO(OPENJDK_BUILD,$build_cpu)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    62
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    63
    if test "x$OPENJDK_TARGET_OS" != xsolaris; then
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    64
        LEGACY_OPENJDK_TARGET_CPU3=""
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    65
        LEGACY_OPENJDK_BUILD_CPU3=""
12801
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
    66
    fi
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
    67
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    68
    # On MacOSX and MacOSX only, we have a different name for the x64 CPU in ARCH (LEGACY_OPENJDK_TARGET_CPU1) ...
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    69
    if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$OPENJDK_TARGET_CPU" = xx64; then
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    70
        LEGACY_OPENJDK_TARGET_CPU1="x86_64"
12801
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
    71
    fi
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
    72
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    73
    PLATFORM_SET_RELEASE_FILE_OS_VALUES
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    74
])
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    75
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    76
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS_TO],
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    77
[
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    78
    PLATFORM_EXTRACT_VARS_FROM_OS($2)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    79
    $1_OS="$VAR_OS"
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    80
    $1_OS_FAMILY="$VAR_OS_FAMILY"
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    81
    $1_OS_API="$VAR_OS_API"
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    82
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    83
    AC_SUBST($1_OS)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    84
    AC_SUBST($1_OS_FAMILY)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    85
    AC_SUBST($1_OS_API)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    86
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    87
    if test "x$$1_OS_API" = xposix; then
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    88
        LEGACY_$1_OS_API="solaris"
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    89
    fi
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    90
    if test "x$$1_OS_API" = xwinapi; then
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    91
        LEGACY_$1_OS_API="windows"
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    92
    fi
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    93
    AC_SUBST(LEGACY_$1_OS_API)    
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    94
])
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    95
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    96
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU_TO],
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    97
[
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
    98
    PLATFORM_EXTRACT_VARS_FROM_CPU($2)
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
    99
    $1_CPU="$VAR_CPU"
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   100
    $1_CPU_ARCH="$VAR_CPU_ARCH"
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   101
    $1_CPU_BITS="$VAR_CPU_BITS"
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   102
    $1_CPU_ENDIAN="$VAR_CPU_ENDIAN"
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   103
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   104
    AC_SUBST($1_CPU)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   105
    AC_SUBST($1_CPU_ARCH)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   106
    AC_SUBST($1_CPU_BITS)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   107
    AC_SUBST($1_CPU_ENDIAN)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   108
    
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   109
    # Also store the legacy naming of the cpu.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   110
    # Ie i586 and amd64 instead of ia32 and x64
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   111
    LEGACY_$1_CPU1="$VAR_LEGACY_CPU"
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   112
    AC_SUBST(LEGACY_$1_CPU1)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   113
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   114
    # And the second legacy naming of the cpu.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   115
    # Ie i386 and amd64 instead of ia32 and x64.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   116
    LEGACY_$1_CPU2="$LEGACY_$1_CPU1"
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   117
    if test "x$LEGACY_$1_CPU1" = xi586; then 
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   118
        LEGACY_$1_CPU2=i386
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   119
    fi
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   120
    AC_SUBST(LEGACY_$1_CPU2)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   121
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   122
    # And the third legacy naming of the cpu.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   123
    # Ie only amd64 or sparcv9, used for the ISA_DIR on Solaris.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   124
    LEGACY_$1_CPU3=""
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   125
    if test "x$$1_CPU" = xx64; then 
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   126
        LEGACY_$1_CPU3=amd64
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   127
    fi
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   128
    if test "x$$1_CPU" = xsparcv9; then 
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   129
        LEGACY_$1_CPU3=sparcv9
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   130
    fi
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   131
    AC_SUBST(LEGACY_$1_CPU3)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   132
])
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   133
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   134
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   135
[
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   136
  # First argument is the cpu name from the trip/quad
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   137
  case "$1" in
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   138
    x86_64)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   139
      VAR_CPU=x64
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   140
      VAR_CPU_ARCH=x86
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   141
      VAR_CPU_BITS=64
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   142
      VAR_CPU_ENDIAN=little
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   143
      VAR_LEGACY_CPU=amd64
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   144
      ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   145
    i?86)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   146
      VAR_CPU=ia32
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   147
      VAR_CPU_ARCH=x86
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   148
      VAR_CPU_BITS=32
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   149
      VAR_CPU_ENDIAN=little
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   150
      VAR_LEGACY_CPU=i586
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   151
      ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   152
    alpha*)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   153
      VAR_CPU=alpha
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   154
      VAR_CPU_ARCH=alpha
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   155
      VAR_CPU_BITS=64
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   156
      VAR_CPU_ENDIAN=big
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   157
      VAR_LEGACY_CPU=alpha
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   158
      ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   159
    arm*)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   160
      VAR_CPU=arm
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   161
      VAR_CPU_ARCH=arm
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   162
      VAR_CPU_BITS=32
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   163
      VAR_CPU_ENDIAN=little
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   164
      VAR_LEGACY_CPU=arm
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   165
      ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   166
    mips)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   167
      VAR_CPU=mips
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   168
      VAR_CPU_ARCH=mips
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   169
      VAR_CPU_BITS=woot
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   170
      VAR_CPU_ENDIAN=woot
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   171
      VAR_LEGACY_CPU=mips
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   172
       ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   173
    mipsel)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   174
      VAR_CPU=mipsel
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   175
      VAR_CPU_ARCH=mips
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   176
      VAR_CPU_BITS=woot
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   177
      VAR_CPU_ENDIAN=woot
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   178
      VAR_LEGACY_CPU=mipsel
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   179
       ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   180
    powerpc)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   181
      VAR_CPU=ppc
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   182
      VAR_CPU_ARCH=ppc
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   183
      VAR_CPU_BITS=32
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   184
      VAR_CPU_ENDIAN=big
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   185
      VAR_LEGACY_CPU=ppc
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   186
       ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   187
    powerpc64)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   188
      VAR_CPU=ppc64
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   189
      VAR_CPU_ARCH=ppc
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   190
      VAR_CPU_BITS=64
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   191
      VAR_CPU_ENDIAN=big
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   192
      VAR_LEGACY_CPU=ppc64
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   193
       ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   194
    sparc)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   195
      VAR_CPU=sparc
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   196
      VAR_CPU_ARCH=sparc
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   197
      VAR_CPU_BITS=32
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   198
      VAR_CPU_ENDIAN=big
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   199
      VAR_LEGACY_CPU=sparc
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   200
       ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   201
    sparc64)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   202
      VAR_CPU=sparcv9
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   203
      VAR_CPU_ARCH=sparc
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   204
      VAR_CPU_BITS=64
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   205
      VAR_CPU_ENDIAN=big
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   206
      VAR_LEGACY_CPU=sparcv9
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   207
       ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   208
    s390)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   209
      VAR_CPU=s390
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   210
      VAR_CPU_ARCH=s390
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   211
      VAR_CPU_BITS=32
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   212
      VAR_CPU_ENDIAN=woot
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   213
      VAR_LEGACY_CPU=s390
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   214
      VAR_LEGACY_CPU=s390
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   215
       ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   216
    s390x)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   217
      VAR_CPU=s390x
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   218
      VAR_CPU_ARCH=s390
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   219
      VAR_CPU_BITS=64
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   220
      VAR_CPU_ENDIAN=woot
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   221
      VAR_LEGACY_CPU=s390x
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   222
       ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   223
    *)
12801
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   224
      AC_MSG_ERROR([unsupported cpu $1])
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   225
      ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   226
  esac
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   227
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   228
  # Workaround cygwin not knowing about 64 bit.
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   229
  if test "x$VAR_OS" = "xwindows"; then
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   230
      if test "x$PROCESSOR_IDENTIFIER" != "x"; then
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   231
          PROC_ARCH=`echo $PROCESSOR_IDENTIFIER | $CUT -f1 -d' '`
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   232
          case "$PROC_ARCH" in
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   233
            intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   234
              VAR_CPU=x64
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   235
              VAR_CPU_BITS=64
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   236
              VAR_LEGACY_CPU=amd64
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   237
              ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   238
          esac
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   239
      fi
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   240
  fi
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   241
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   242
  # on solaris x86...default seems to be 32-bit
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   243
  if test "x$VAR_OS" = "xsolaris" && \
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   244
     test "x$with_target_bits" = "x" && \
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   245
     test "x$VAR_CPU_ARCH" = "xx86"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   246
  then
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   247
      with_target_bits=32
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   248
  fi
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   249
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   250
  if test "x$VAR_CPU_ARCH" = "xx86"; then
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   251
      if test "x$with_target_bits" = "x64"; then
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   252
          VAR_CPU=x64
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   253
          VAR_CPU_BITS=64
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   254
          VAR_LEGACY_CPU=amd64
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   255
      fi
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   256
      if test "x$with_target_bits" = "x32"; then
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   257
          VAR_CPU=ia32
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   258
          VAR_CPU_BITS=32
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   259
          VAR_LEGACY_CPU=i586
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   260
      fi
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   261
  fi 
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   262
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   263
  if test "x$VAR_CPU_ARCH" = "xsparc"; then
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   264
      if test "x$with_target_bits" = "x64"; then
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   265
          VAR_CPU=sparcv9
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   266
          VAR_CPU_BITS=64
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   267
          VAR_LEGACY_CPU=sparcv9
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   268
      fi
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   269
  fi 
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   270
])
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   271
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   272
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   273
[
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   274
  case "$1" in
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   275
    *linux*)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   276
      VAR_OS=linux
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   277
      VAR_OS_API=posix
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   278
      VAR_OS_FAMILY=gnu
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   279
      ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   280
    *solaris*)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   281
      VAR_OS=solaris
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   282
      VAR_OS_API=posix
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   283
      VAR_OS_FAMILY=sysv
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   284
      ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   285
    *darwin*)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   286
      VAR_OS=macosx
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   287
      VAR_OS_API=posix
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   288
      VAR_OS_FAMILY=bsd
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   289
      ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   290
    *bsd*)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   291
      VAR_OS=bsd
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   292
      VAR_OS_API=posix
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   293
      VAR_OS_FAMILY=bsd
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   294
      ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   295
    *cygwin*|*windows*)
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   296
      VAR_OS=windows
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   297
      VAR_OS_API=winapi
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   298
      VAR_OS_FAMILY=windows
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   299
      ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   300
    *)
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   301
      AC_MSG_ERROR([unsupported operating system $1])
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   302
      ;;
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   303
  esac
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   304
])
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   305
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   306
AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES],
12258
6ec26f6cc53e 7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff changeset
   307
[
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   308
    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
12801
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   309
       REQUIRED_OS_NAME=SunOS
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   310
       REQUIRED_OS_VERSION=5.10
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   311
    fi
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   312
    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
12801
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   313
       REQUIRED_OS_NAME=Linux
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   314
       REQUIRED_OS_VERSION=2.6
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   315
    fi
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   316
    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
12801
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   317
        REQUIRED_OS_NAME=Windows
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   318
        REQUIRED_OS_VERSION=5.1
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   319
    fi
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   320
    if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
12801
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   321
        REQUIRED_OS_NAME=Darwin
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   322
        REQUIRED_OS_VERSION=11.2
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   323
    fi
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   324
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   325
    AC_SUBST(REQUIRED_OS_NAME)
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   326
    AC_SUBST(REQUIRED_OS_VERSION)
948f8ad66ee7 7170079: Adjustments to build-infra makefiles
erikj
parents: 12258
diff changeset
   327
])
13132
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   328
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   329
#%%% Build and target systems %%%
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   330
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   331
[
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   332
# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   333
# is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   334
# product you're building. The target of this build is called "host". Since this is confusing to most people, we
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   335
# have not adopted that system, but use "target" as the platform we are building for. In some places though we need
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   336
# to use the configure naming style.
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   337
AC_CANONICAL_BUILD
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   338
AC_CANONICAL_HOST
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   339
AC_CANONICAL_TARGET
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   340
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   341
AC_ARG_WITH(target-bits, [AS_HELP_STRING([--with-target-bits],
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   342
   [build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-target-bits=32 @<:@guessed@:>@])])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   343
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   344
if test "x$with_target_bits" != x && \
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   345
   test "x$with_target_bits" != x32 && \
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   346
   test "x$with_target_bits" != x64 ; then
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   347
    AC_MSG_ERROR([--with-target-bits can only be 32 or 64, you specified $with_target_bits!])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   348
fi
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   349
# Translate the standard cpu-vendor-kernel-os quadruplets into
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   350
# the new TARGET_.... and BUILD_... and the legacy names used by
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   351
# the openjdk build.
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   352
# It uses $host_os $host_cpu $build_os $build_cpu and $with_target_bits
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   353
PLATFORM_EXTRACT_TARGET_AND_BUILD_AND_LEGACY_VARS
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   354
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   355
# The LEGACY_OPENJDK_TARGET_CPU3 is the setting for ISA_DIR.
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   356
if test "x$LEGACY_OPENJDK_TARGET_CPU3" != x; then
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   357
   LEGACY_OPENJDK_TARGET_CPU3="/${LEGACY_OPENJDK_TARGET_CPU3}"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   358
fi
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   359
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   360
# Now the following vars are defined.
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   361
# OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   362
# OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   363
# OPENJDK_TARGET_OS_API=posix,winapi
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   364
#
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   365
# OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   366
# OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   367
# OPENJDK_TARGET_CPU_BITS=32,64
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   368
# OPENJDK_TARGET_CPU_ENDIAN=big,little
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   369
#
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   370
# There is also a:
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   371
# LEGACY_OPENJDK_TARGET_CPU1=i586,amd64,....  # used to set the old var ARCH
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   372
# LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,.... # used to set the old var LIBARCH
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   373
# LEGACY_OPENJDK_TARGET_CPU3=only sparcv9,amd64 # used to set the ISA_DIR on Solaris
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   374
# There was also a BUILDARCH that had i486,amd64,... but we do not use that
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   375
# in the new build.
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   376
# LEGACY_OPENJDK_TARGET_OS_API=solaris,windows # used to select source roots
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   377
])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   378
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   379
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   380
[
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   381
###############################################################################
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   382
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   383
# Note that this is the build platform OS version!
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   384
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   385
OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   386
OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   387
OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   388
OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   389
AC_SUBST(OS_VERSION_MAJOR)
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   390
AC_SUBST(OS_VERSION_MINOR)
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   391
AC_SUBST(OS_VERSION_MICRO)
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   392
])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   393
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   394
AC_DEFUN_ONCE([PLATFORM_TEST_OPENJDK_TARGET_BITS],
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   395
[
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   396
###############################################################################
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   397
#
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   398
# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   399
# (The JVM can use 32 or 64 bit Java pointers but that decision
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   400
# is made at runtime.)
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   401
#
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   402
AC_LANG_PUSH(C++)
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   403
OLD_CXXFLAGS="$CXXFLAGS"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   404
if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   405
	CXXFLAGS="-m${with_target_bits} $CXXFLAGS"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   406
fi
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   407
AC_CHECK_SIZEOF([int *], [1111])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   408
CXXFLAGS="$OLD_CXXFLAGS"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   409
AC_LANG_POP(C++)
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   410
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   411
# keep track of c/cxx flags that we added outselves...
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   412
#   to prevent emitting warning...
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   413
ADDED_CFLAGS=
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   414
ADDED_CXXFLAGS=
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   415
ADDED_LDFLAGS=
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   416
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   417
if test "x$ac_cv_sizeof_int_p" = x0; then 
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   418
    # The test failed, lets pick the assumed value.
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   419
    ARCH_DATA_MODEL=$OPENJDK_TARGET_CPU_BITS
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   420
else
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   421
    ARCH_DATA_MODEL=`expr 8 \* $ac_cv_sizeof_int_p`
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   422
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   423
    if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   424
       ADDED_CFLAGS=" -m${with_target_bits}"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   425
       ADDED_CXXFLAGS=" -m${with_target_bits}"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   426
       ADDED_LDFLAGS=" -m${with_target_bits}"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   427
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   428
       CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   429
       CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   430
       LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   431
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   432
       CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   433
       CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   434
       LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   435
    fi
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   436
fi
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   437
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   438
if test "x$ARCH_DATA_MODEL" = x64; then
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   439
    A_LP64="LP64:="
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   440
    ADD_LP64="-D_LP64=1"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   441
fi
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   442
AC_MSG_CHECKING([for target address size])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   443
AC_MSG_RESULT([$ARCH_DATA_MODEL bits])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   444
AC_SUBST(LP64,$A_LP64)
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   445
AC_SUBST(ARCH_DATA_MODEL)
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   446
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   447
if test "x$ARCH_DATA_MODEL" != "x$OPENJDK_TARGET_CPU_BITS"; then
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   448
    AC_MSG_ERROR([The tested number of bits in the target ($ARCH_DATA_MODEL) differs from the number of bits expected to be found in the target ($OPENJDK_TARGET_CPU_BITS)])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   449
fi
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   450
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   451
#
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   452
# NOTE: check for -mstackrealign needs to be below potential addition of -m32
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   453
#
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   454
if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   455
    # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   456
    # While waiting for a better solution, the current workaround is to use -mstackrealign.
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   457
    CFLAGS="$CFLAGS -mstackrealign"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   458
    AC_MSG_CHECKING([if 32-bit compiler supports -mstackrealign])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   459
    AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   460
                   [
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   461
		        AC_MSG_RESULT([yes])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   462
                   ],
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   463
	           [
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   464
		        AC_MSG_RESULT([no])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   465
	                AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   466
	           ])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   467
fi
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   468
])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   469
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   470
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS],
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   471
[
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   472
###############################################################################
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   473
#
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   474
# Is the target little of big endian?
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   475
#
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   476
AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal_endianness"])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   477
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   478
if test "x$ENDIAN" = xuniversal_endianness; then
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   479
    AC_MSG_ERROR([Building with both big and little endianness is not supported])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   480
fi
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   481
if test "x$ENDIAN" = xunknown; then
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   482
    ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   483
fi
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   484
if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   485
    AC_MSG_WARN([The tested endian in the target ($ENDIAN) differs from the endian expected to be found in the target ($OPENJDK_TARGET_CPU_ENDIAN)])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   486
    ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN"
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   487
fi
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   488
AC_SUBST(ENDIAN)
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   489
])
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   490
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   491
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ISADIR],
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   492
[
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   493
###############################################################################
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   494
#
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   495
# Could someone enlighten this configure script with a comment about libCrun?
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   496
#
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   497
#
bd88bb8dd3af 7181504: Update of latest build-infra Makefiles
erikj
parents: 12801
diff changeset
   498
])