author | katleman |
Thu, 02 Aug 2012 15:32:36 -0700 | |
changeset 13330 | 3cb655c7a1f2 |
parent 13132 | bd88bb8dd3af |
child 13697 | 5262b00bc10c |
permissions | -rw-r--r-- |
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 | 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 | 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 | 32 |
# of the target/build system into |
33 |
# OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows |
|
34 |
# OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince |
|
35 |
# OPENJDK_TARGET_OS_API=posix,winapi |
|
12258
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
36 |
# |
13132 | 37 |
# OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64 |
38 |
# OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm |
|
39 |
# OPENJDK_TARGET_CPU_BITS=32,64 |
|
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 | 45 |
# LEGACY_OPENJDK_TARGET_CPU1=i586,amd64/x86_64,sparc,sparcv9,arm,arm64... |
46 |
# LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,sparc,sparcv9,arm,arm64... |
|
47 |
# LEGACY_OPENJDK_TARGET_CPU3=sparcv9,amd64 (but only on solaris) |
|
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 | 51 |
# verbatim to OPENJDK_TARGET_SYSTEM (from the autoconf "host") and OPENJDK_BUILD_SYSTEM |
52 |
OPENJDK_TARGET_SYSTEM="$host" |
|
53 |
OPENJDK_BUILD_SYSTEM="$build" |
|
54 |
AC_SUBST(OPENJDK_TARGET_SYSTEM) |
|
55 |
AC_SUBST(OPENJDK_BUILD_SYSTEM) |
|
12258
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
56 |
|
13132 | 57 |
PLATFORM_EXTRACT_VARS_FROM_OS_TO(OPENJDK_TARGET,$host_os) |
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 | 60 |
PLATFORM_EXTRACT_VARS_FROM_OS_TO(OPENJDK_BUILD,$build_os) |
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 | 63 |
if test "x$OPENJDK_TARGET_OS" != xsolaris; then |
64 |
LEGACY_OPENJDK_TARGET_CPU3="" |
|
65 |
LEGACY_OPENJDK_BUILD_CPU3="" |
|
12801 | 66 |
fi |
67 |
||
13132 | 68 |
# On MacOSX and MacOSX only, we have a different name for the x64 CPU in ARCH (LEGACY_OPENJDK_TARGET_CPU1) ... |
69 |
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$OPENJDK_TARGET_CPU" = xx64; then |
|
70 |
LEGACY_OPENJDK_TARGET_CPU1="x86_64" |
|
12801 | 71 |
fi |
72 |
||
13132 | 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 | 76 |
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS_TO], |
12258
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
77 |
[ |
13132 | 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 | 96 |
AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU_TO], |
12258
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
97 |
[ |
13132 | 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 | 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 | 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 | 162 |
VAR_CPU_BITS=32 |
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 | 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 | 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 | 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 | 242 |
# on solaris x86...default seems to be 32-bit |
243 |
if test "x$VAR_OS" = "xsolaris" && \ |
|
244 |
test "x$with_target_bits" = "x" && \ |
|
245 |
test "x$VAR_CPU_ARCH" = "xx86" |
|
246 |
then |
|
247 |
with_target_bits=32 |
|
248 |
fi |
|
249 |
||
12258
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
250 |
if test "x$VAR_CPU_ARCH" = "xx86"; then |
13132 | 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 | 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 | 262 |
|
263 |
if test "x$VAR_CPU_ARCH" = "xsparc"; then |
|
264 |
if test "x$with_target_bits" = "x64"; then |
|
265 |
VAR_CPU=sparcv9 |
|
266 |
VAR_CPU_BITS=64 |
|
267 |
VAR_LEGACY_CPU=sparcv9 |
|
268 |
fi |
|
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 | 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 | 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 | 306 |
AC_DEFUN([PLATFORM_SET_RELEASE_FILE_OS_VALUES], |
12258
6ec26f6cc53e
7074397: Build infrastructure changes (makefile re-write)
ohair
parents:
diff
changeset
|
307 |
[ |
13132 | 308 |
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then |
12801 | 309 |
REQUIRED_OS_NAME=SunOS |
310 |
REQUIRED_OS_VERSION=5.10 |
|
311 |
fi |
|
13132 | 312 |
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then |
12801 | 313 |
REQUIRED_OS_NAME=Linux |
314 |
REQUIRED_OS_VERSION=2.6 |
|
315 |
fi |
|
13132 | 316 |
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then |
12801 | 317 |
REQUIRED_OS_NAME=Windows |
318 |
REQUIRED_OS_VERSION=5.1 |
|
319 |
fi |
|
13132 | 320 |
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then |
12801 | 321 |
REQUIRED_OS_NAME=Darwin |
322 |
REQUIRED_OS_VERSION=11.2 |
|
323 |
fi |
|
324 |
||
325 |
AC_SUBST(REQUIRED_OS_NAME) |
|
326 |
AC_SUBST(REQUIRED_OS_VERSION) |
|
327 |
]) |
|
13132 | 328 |
|
329 |
#%%% Build and target systems %%% |
|
330 |
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET], |
|
331 |
[ |
|
332 |
# Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target" |
|
333 |
# is confusing; it assumes you are cross-compiling a cross-compiler (!) and "target" is thus the target of the |
|
334 |
# product you're building. The target of this build is called "host". Since this is confusing to most people, we |
|
335 |
# have not adopted that system, but use "target" as the platform we are building for. In some places though we need |
|
336 |
# to use the configure naming style. |
|
337 |
AC_CANONICAL_BUILD |
|
338 |
AC_CANONICAL_HOST |
|
339 |
AC_CANONICAL_TARGET |
|
340 |
||
341 |
AC_ARG_WITH(target-bits, [AS_HELP_STRING([--with-target-bits], |
|
342 |
[build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-target-bits=32 @<:@guessed@:>@])]) |
|
343 |
||
344 |
if test "x$with_target_bits" != x && \ |
|
345 |
test "x$with_target_bits" != x32 && \ |
|
346 |
test "x$with_target_bits" != x64 ; then |
|
347 |
AC_MSG_ERROR([--with-target-bits can only be 32 or 64, you specified $with_target_bits!]) |
|
348 |
fi |
|
349 |
# Translate the standard cpu-vendor-kernel-os quadruplets into |
|
350 |
# the new TARGET_.... and BUILD_... and the legacy names used by |
|
351 |
# the openjdk build. |
|
352 |
# It uses $host_os $host_cpu $build_os $build_cpu and $with_target_bits |
|
353 |
PLATFORM_EXTRACT_TARGET_AND_BUILD_AND_LEGACY_VARS |
|
354 |
||
355 |
# The LEGACY_OPENJDK_TARGET_CPU3 is the setting for ISA_DIR. |
|
356 |
if test "x$LEGACY_OPENJDK_TARGET_CPU3" != x; then |
|
357 |
LEGACY_OPENJDK_TARGET_CPU3="/${LEGACY_OPENJDK_TARGET_CPU3}" |
|
358 |
fi |
|
359 |
||
360 |
# Now the following vars are defined. |
|
361 |
# OPENJDK_TARGET_OS=aix,bsd,hpux,linux,macosx,solaris,windows |
|
362 |
# OPENJDK_TARGET_OS_FAMILY=bsd,gnu,sysv,win32,wince |
|
363 |
# OPENJDK_TARGET_OS_API=posix,winapi |
|
364 |
# |
|
365 |
# OPENJDK_TARGET_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64 |
|
366 |
# OPENJDK_TARGET_CPU_ARCH=x86,sparc,pcc,arm |
|
367 |
# OPENJDK_TARGET_CPU_BITS=32,64 |
|
368 |
# OPENJDK_TARGET_CPU_ENDIAN=big,little |
|
369 |
# |
|
370 |
# There is also a: |
|
371 |
# LEGACY_OPENJDK_TARGET_CPU1=i586,amd64,.... # used to set the old var ARCH |
|
372 |
# LEGACY_OPENJDK_TARGET_CPU2=i386,amd64,.... # used to set the old var LIBARCH |
|
373 |
# LEGACY_OPENJDK_TARGET_CPU3=only sparcv9,amd64 # used to set the ISA_DIR on Solaris |
|
374 |
# There was also a BUILDARCH that had i486,amd64,... but we do not use that |
|
375 |
# in the new build. |
|
376 |
# LEGACY_OPENJDK_TARGET_OS_API=solaris,windows # used to select source roots |
|
377 |
]) |
|
378 |
||
379 |
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION], |
|
380 |
[ |
|
381 |
############################################################################### |
|
382 |
||
383 |
# Note that this is the build platform OS version! |
|
384 |
||
385 |
OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`" |
|
386 |
OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`" |
|
387 |
OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`" |
|
388 |
OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`" |
|
389 |
AC_SUBST(OS_VERSION_MAJOR) |
|
390 |
AC_SUBST(OS_VERSION_MINOR) |
|
391 |
AC_SUBST(OS_VERSION_MICRO) |
|
392 |
]) |
|
393 |
||
394 |
AC_DEFUN_ONCE([PLATFORM_TEST_OPENJDK_TARGET_BITS], |
|
395 |
[ |
|
396 |
############################################################################### |
|
397 |
# |
|
398 |
# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code. |
|
399 |
# (The JVM can use 32 or 64 bit Java pointers but that decision |
|
400 |
# is made at runtime.) |
|
401 |
# |
|
402 |
AC_LANG_PUSH(C++) |
|
403 |
OLD_CXXFLAGS="$CXXFLAGS" |
|
404 |
if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then |
|
405 |
CXXFLAGS="-m${with_target_bits} $CXXFLAGS" |
|
406 |
fi |
|
407 |
AC_CHECK_SIZEOF([int *], [1111]) |
|
408 |
CXXFLAGS="$OLD_CXXFLAGS" |
|
409 |
AC_LANG_POP(C++) |
|
410 |
||
411 |
# keep track of c/cxx flags that we added outselves... |
|
412 |
# to prevent emitting warning... |
|
413 |
ADDED_CFLAGS= |
|
414 |
ADDED_CXXFLAGS= |
|
415 |
ADDED_LDFLAGS= |
|
416 |
||
417 |
if test "x$ac_cv_sizeof_int_p" = x0; then |
|
418 |
# The test failed, lets pick the assumed value. |
|
419 |
ARCH_DATA_MODEL=$OPENJDK_TARGET_CPU_BITS |
|
420 |
else |
|
421 |
ARCH_DATA_MODEL=`expr 8 \* $ac_cv_sizeof_int_p` |
|
422 |
||
423 |
if test "x$OPENJDK_TARGET_OS" != xwindows && test "x$with_target_bits" != x; then |
|
424 |
ADDED_CFLAGS=" -m${with_target_bits}" |
|
425 |
ADDED_CXXFLAGS=" -m${with_target_bits}" |
|
426 |
ADDED_LDFLAGS=" -m${with_target_bits}" |
|
427 |
||
428 |
CFLAGS="${CFLAGS}${ADDED_CFLAGS}" |
|
429 |
CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}" |
|
430 |
LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}" |
|
431 |
||
432 |
CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}" |
|
433 |
CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}" |
|
434 |
LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}" |
|
435 |
fi |
|
436 |
fi |
|
437 |
||
438 |
if test "x$ARCH_DATA_MODEL" = x64; then |
|
439 |
A_LP64="LP64:=" |
|
440 |
ADD_LP64="-D_LP64=1" |
|
441 |
fi |
|
442 |
AC_MSG_CHECKING([for target address size]) |
|
443 |
AC_MSG_RESULT([$ARCH_DATA_MODEL bits]) |
|
444 |
AC_SUBST(LP64,$A_LP64) |
|
445 |
AC_SUBST(ARCH_DATA_MODEL) |
|
446 |
||
447 |
if test "x$ARCH_DATA_MODEL" != "x$OPENJDK_TARGET_CPU_BITS"; then |
|
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)]) |
|
449 |
fi |
|
450 |
||
451 |
# |
|
452 |
# NOTE: check for -mstackrealign needs to be below potential addition of -m32 |
|
453 |
# |
|
454 |
if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then |
|
455 |
# On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned. |
|
456 |
# While waiting for a better solution, the current workaround is to use -mstackrealign. |
|
457 |
CFLAGS="$CFLAGS -mstackrealign" |
|
458 |
AC_MSG_CHECKING([if 32-bit compiler supports -mstackrealign]) |
|
459 |
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])], |
|
460 |
[ |
|
461 |
AC_MSG_RESULT([yes]) |
|
462 |
], |
|
463 |
[ |
|
464 |
AC_MSG_RESULT([no]) |
|
465 |
AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.]) |
|
466 |
]) |
|
467 |
fi |
|
468 |
]) |
|
469 |
||
470 |
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS], |
|
471 |
[ |
|
472 |
############################################################################### |
|
473 |
# |
|
474 |
# Is the target little of big endian? |
|
475 |
# |
|
476 |
AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal_endianness"]) |
|
477 |
||
478 |
if test "x$ENDIAN" = xuniversal_endianness; then |
|
479 |
AC_MSG_ERROR([Building with both big and little endianness is not supported]) |
|
480 |
fi |
|
481 |
if test "x$ENDIAN" = xunknown; then |
|
482 |
ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN" |
|
483 |
fi |
|
484 |
if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then |
|
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)]) |
|
486 |
ENDIAN="$OPENJDK_TARGET_CPU_ENDIAN" |
|
487 |
fi |
|
488 |
AC_SUBST(ENDIAN) |
|
489 |
]) |
|
490 |
||
491 |
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_ISADIR], |
|
492 |
[ |
|
493 |
############################################################################### |
|
494 |
# |
|
495 |
# Could someone enlighten this configure script with a comment about libCrun? |
|
496 |
# |
|
497 |
# |
|
498 |
]) |