author | lana |
Sat, 12 Oct 2013 14:14:24 -0700 | |
changeset 21220 | a6cbbedabed7 |
parent 19763 | f234bbfc5ab3 |
child 20362 | 5f8289bfda3e |
permissions | -rw-r--r-- |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
2 |
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
4 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. Oracle designates this |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
8 |
# particular file as subject to the "Classpath" exception as provided |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
9 |
# by Oracle in the LICENSE file that accompanied this code. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
10 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
11 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
12 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
13 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
14 |
# version 2 for more details (a copy is included in the LICENSE file that |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
15 |
# accompanied this code). |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
16 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
17 |
# You should have received a copy of the GNU General Public License version |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
18 |
# 2 along with this work; if not, write to the Free Software Foundation, |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
19 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
20 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
21 |
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
22 |
# or visit www.oracle.com if you need additional information or have any |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
23 |
# questions. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
24 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
25 |
|
14111 | 26 |
# $1 = compiler to test (CC or CXX) |
27 |
# $2 = human readable name of compiler (C or C++) |
|
28 |
AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSION], |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
29 |
[ |
14111 | 30 |
COMPILER=[$]$1 |
31 |
COMPILER_NAME=$2 |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
32 |
|
14111 | 33 |
if test "x$OPENJDK_TARGET_OS" = xsolaris; then |
34 |
# Make sure we use the Sun Studio compiler and not gcc on Solaris, which won't work |
|
35 |
COMPILER_VERSION_TEST=`$COMPILER -V 2>&1 | $HEAD -n 1` |
|
36 |
$ECHO $COMPILER_VERSION_TEST | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null |
|
37 |
if test $? -ne 0; then |
|
38 |
GCC_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` |
|
17664
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
39 |
|
14111 | 40 |
AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required Sun Studio compiler.]) |
41 |
AC_MSG_NOTICE([The result from running with -V was: "$COMPILER_VERSION_TEST" and with --version: "$GCC_VERSION_TEST"]) |
|
42 |
AC_MSG_ERROR([Sun Studio compiler is required. Try setting --with-tools-dir.]) |
|
13697 | 43 |
else |
14111 | 44 |
COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*@<:@ ,\t@:>@$COMPILER_NAME@<:@ ,\t@:>@\(@<:@1-9@:>@\.@<:@0-9@:>@@<:@0-9@:>@*\).*/\1/p"` |
45 |
COMPILER_VENDOR="Sun Studio" |
|
46 |
fi |
|
47 |
elif test "x$OPENJDK_TARGET_OS" = xwindows; then |
|
48 |
# First line typically looks something like: |
|
49 |
# Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86 |
|
18423
5f706ddb73ed
8019229: Build Configuration Fail in Windows Platform
erikj
parents:
18421
diff
changeset
|
50 |
COMPILER_VERSION_TEST=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'` |
14111 | 51 |
COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.*Version \(@<:@1-9@:>@@<:@0-9.@:>@*\) .*/\1/p"` |
52 |
COMPILER_VENDOR="Microsoft CL.EXE" |
|
53 |
COMPILER_CPU_TEST=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* for \(.*\)$/\1/p"` |
|
54 |
if test "x$OPENJDK_TARGET_CPU" = "xx86"; then |
|
55 |
if test "x$COMPILER_CPU_TEST" != "x80x86"; then |
|
56 |
AC_MSG_ERROR([Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for "$COMPILER_CPU_TEST"; expected "80x86".]) |
|
57 |
fi |
|
58 |
elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then |
|
59 |
if test "x$COMPILER_CPU_TEST" != "xx64"; then |
|
60 |
AC_MSG_ERROR([Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for "$COMPILER_CPU_TEST"; expected "x64".]) |
|
61 |
fi |
|
62 |
fi |
|
63 |
else |
|
64 |
COMPILER_VERSION_TEST=`$COMPILER --version 2>&1 | $HEAD -n 1` |
|
65 |
# Check that this is likely to be GCC. |
|
66 |
$COMPILER --version 2>&1 | $GREP "Free Software Foundation" > /dev/null |
|
67 |
if test $? -ne 0; then |
|
68 |
AC_MSG_NOTICE([The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required GCC compiler.]) |
|
69 |
AC_MSG_NOTICE([The result from running with --version was: "$COMPILER_VERSION_TEST"]) |
|
70 |
AC_MSG_ERROR([GCC compiler is required. Try setting --with-tools-dir.]) |
|
13697 | 71 |
fi |
17664
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
72 |
|
14111 | 73 |
# First line typically looks something like: |
74 |
# gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2 |
|
75 |
COMPILER_VERSION=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^.* \(@<:@1-9@:>@@<:@0-9.@:>@*\)/\1/p"` |
|
76 |
COMPILER_VENDOR=`$ECHO $COMPILER_VERSION_TEST | $SED -n "s/^\(.*\) @<:@1-9@:>@@<:@0-9.@:>@*/\1/p"` |
|
77 |
fi |
|
78 |
# This sets CC_VERSION or CXX_VERSION. (This comment is a grep marker) |
|
79 |
$1_VERSION="$COMPILER_VERSION" |
|
80 |
# This sets CC_VENDOR or CXX_VENDOR. (This comment is a grep marker) |
|
81 |
$1_VENDOR="$COMPILER_VENDOR" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
82 |
|
14111 | 83 |
AC_MSG_NOTICE([Using $COMPILER_VENDOR $COMPILER_NAME compiler version $COMPILER_VERSION (located at $COMPILER)]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
84 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
85 |
|
14111 | 86 |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
87 |
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
88 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
89 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
90 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
91 |
# Configure the development tool paths and potential sysroot. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
92 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
93 |
AC_LANG(C++) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
94 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
95 |
# The option used to specify the target .o,.a or .so file. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
96 |
# When compiling, how to specify the to be created object file. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
97 |
CC_OUT_OPTION='-o$(SPACE)' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
98 |
# When linking, how to specify the to be created executable. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
99 |
EXE_OUT_OPTION='-o$(SPACE)' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
100 |
# When linking, how to specify the to be created dynamically linkable library. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
101 |
LD_OUT_OPTION='-o$(SPACE)' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
102 |
# When archiving, how to specify the to be create static archive for object files. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
103 |
AR_OUT_OPTION='rcs$(SPACE)' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
104 |
AC_SUBST(CC_OUT_OPTION) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
105 |
AC_SUBST(EXE_OUT_OPTION) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
106 |
AC_SUBST(LD_OUT_OPTION) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
107 |
AC_SUBST(AR_OUT_OPTION) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
108 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
109 |
|
14111 | 110 |
# $1 = compiler to test (CC or CXX) |
111 |
# $2 = human readable name of compiler (C or C++) |
|
112 |
# $3 = list of compiler names to search for |
|
113 |
AC_DEFUN([TOOLCHAIN_FIND_COMPILER], |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
114 |
[ |
14111 | 115 |
COMPILER_NAME=$2 |
116 |
||
14614
3bb0a6b81bb9
8003945: build-infra: problems finding compiler when using --with-dev-kit
erikj
parents:
14467
diff
changeset
|
117 |
$1= |
3bb0a6b81bb9
8003945: build-infra: problems finding compiler when using --with-dev-kit
erikj
parents:
14467
diff
changeset
|
118 |
# If TOOLS_DIR is set, check for all compiler names in there first |
3bb0a6b81bb9
8003945: build-infra: problems finding compiler when using --with-dev-kit
erikj
parents:
14467
diff
changeset
|
119 |
# before checking the rest of the PATH. |
3bb0a6b81bb9
8003945: build-infra: problems finding compiler when using --with-dev-kit
erikj
parents:
14467
diff
changeset
|
120 |
if test -n "$TOOLS_DIR"; then |
3bb0a6b81bb9
8003945: build-infra: problems finding compiler when using --with-dev-kit
erikj
parents:
14467
diff
changeset
|
121 |
PATH_save="$PATH" |
3bb0a6b81bb9
8003945: build-infra: problems finding compiler when using --with-dev-kit
erikj
parents:
14467
diff
changeset
|
122 |
PATH="$TOOLS_DIR" |
3bb0a6b81bb9
8003945: build-infra: problems finding compiler when using --with-dev-kit
erikj
parents:
14467
diff
changeset
|
123 |
AC_PATH_PROGS(TOOLS_DIR_$1, $3) |
3bb0a6b81bb9
8003945: build-infra: problems finding compiler when using --with-dev-kit
erikj
parents:
14467
diff
changeset
|
124 |
$1=$TOOLS_DIR_$1 |
3bb0a6b81bb9
8003945: build-infra: problems finding compiler when using --with-dev-kit
erikj
parents:
14467
diff
changeset
|
125 |
PATH="$PATH_save" |
3bb0a6b81bb9
8003945: build-infra: problems finding compiler when using --with-dev-kit
erikj
parents:
14467
diff
changeset
|
126 |
fi |
3bb0a6b81bb9
8003945: build-infra: problems finding compiler when using --with-dev-kit
erikj
parents:
14467
diff
changeset
|
127 |
|
14111 | 128 |
# AC_PATH_PROGS can't be run multiple times with the same variable, |
129 |
# so create a new name for this run. |
|
14614
3bb0a6b81bb9
8003945: build-infra: problems finding compiler when using --with-dev-kit
erikj
parents:
14467
diff
changeset
|
130 |
if test "x[$]$1" = x; then |
3bb0a6b81bb9
8003945: build-infra: problems finding compiler when using --with-dev-kit
erikj
parents:
14467
diff
changeset
|
131 |
AC_PATH_PROGS(POTENTIAL_$1, $3) |
3bb0a6b81bb9
8003945: build-infra: problems finding compiler when using --with-dev-kit
erikj
parents:
14467
diff
changeset
|
132 |
$1=$POTENTIAL_$1 |
3bb0a6b81bb9
8003945: build-infra: problems finding compiler when using --with-dev-kit
erikj
parents:
14467
diff
changeset
|
133 |
fi |
14111 | 134 |
|
14614
3bb0a6b81bb9
8003945: build-infra: problems finding compiler when using --with-dev-kit
erikj
parents:
14467
diff
changeset
|
135 |
if test "x[$]$1" = x; then |
14111 | 136 |
HELP_MSG_MISSING_DEPENDENCY([devkit]) |
137 |
AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG]) |
|
138 |
fi |
|
139 |
BASIC_FIXUP_EXECUTABLE($1) |
|
140 |
AC_MSG_CHECKING([resolved symbolic links for $1]) |
|
141 |
TEST_COMPILER="[$]$1" |
|
142 |
BASIC_REMOVE_SYMBOLIC_LINKS(TEST_COMPILER) |
|
143 |
AC_MSG_RESULT([$TEST_COMPILER]) |
|
144 |
AC_MSG_CHECKING([if $1 is disguised ccache]) |
|
17664
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
145 |
|
14111 | 146 |
COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"` |
147 |
if test "x$COMPILER_BASENAME" = "xccache"; then |
|
148 |
AC_MSG_RESULT([yes, trying to find proper $COMPILER_NAME compiler]) |
|
149 |
# We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache. |
|
150 |
# We want to control ccache invocation ourselves, so ignore this cc and try |
|
151 |
# searching again. |
|
152 |
||
153 |
# Remove the path to the fake ccache cc from the PATH |
|
154 |
RETRY_COMPILER_SAVED_PATH="$PATH" |
|
155 |
COMPILER_DIRNAME=`$DIRNAME [$]$1` |
|
156 |
PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`" |
|
157 |
||
158 |
# Try again looking for our compiler |
|
159 |
AC_CHECK_TOOLS(PROPER_COMPILER_$1, $3) |
|
160 |
BASIC_FIXUP_EXECUTABLE(PROPER_COMPILER_$1) |
|
161 |
PATH="$RETRY_COMPILER_SAVED_PATH" |
|
162 |
||
163 |
AC_MSG_CHECKING([for resolved symbolic links for $1]) |
|
164 |
BASIC_REMOVE_SYMBOLIC_LINKS(PROPER_COMPILER_$1) |
|
165 |
AC_MSG_RESULT([$PROPER_COMPILER_$1]) |
|
166 |
$1="$PROPER_COMPILER_$1" |
|
167 |
else |
|
168 |
AC_MSG_RESULT([no, keeping $1]) |
|
169 |
$1="$TEST_COMPILER" |
|
170 |
fi |
|
171 |
TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME]) |
|
172 |
]) |
|
173 |
||
174 |
||
175 |
AC_DEFUN([TOOLCHAIN_SETUP_PATHS], |
|
176 |
[ |
|
177 |
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then |
|
178 |
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV |
|
19763 | 179 |
BASIC_DEPRECATED_ARG_WITH([dxsdk]) |
180 |
BASIC_DEPRECATED_ARG_WITH([dxsdk-lib]) |
|
181 |
BASIC_DEPRECATED_ARG_WITH([dxsdk-include]) |
|
14111 | 182 |
fi |
183 |
||
184 |
AC_SUBST(MSVCR_DLL) |
|
185 |
||
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
186 |
# If --build AND --host is set, then the configure script will find any |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
187 |
# cross compilation tools in the PATH. Cross compilation tools |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
188 |
# follows the cross compilation standard where they are prefixed with ${host}. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
189 |
# For example the binary i686-sun-solaris2.10-gcc |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
190 |
# will cross compile for i686-sun-solaris2.10 |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
191 |
# If neither of build and host is not set, then build=host and the |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
192 |
# default compiler found in the path will be used. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
193 |
# Setting only --host, does not seem to be really supported. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
194 |
# Please set both --build and --host if you want to cross compile. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
195 |
|
13697 | 196 |
if test "x$COMPILE_TYPE" = "xcross"; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
197 |
# Now we to find a C/C++ compiler that can build executables for the build |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
198 |
# platform. We can't use the AC_PROG_CC macro, since it can only be used |
13697 | 199 |
# once. Also, we need to do this before adding a tools dir to the path, |
200 |
# otherwise we might pick up cross-compilers which don't use standard naming. |
|
201 |
# Otherwise, we'll set the BUILD_tools to the native tools, but that'll have |
|
202 |
# to wait until they are properly discovered. |
|
203 |
AC_PATH_PROGS(BUILD_CC, [cl cc gcc]) |
|
14111 | 204 |
BASIC_FIXUP_EXECUTABLE(BUILD_CC) |
13697 | 205 |
AC_PATH_PROGS(BUILD_CXX, [cl CC g++]) |
14111 | 206 |
BASIC_FIXUP_EXECUTABLE(BUILD_CXX) |
13697 | 207 |
AC_PATH_PROG(BUILD_LD, ld) |
14111 | 208 |
BASIC_FIXUP_EXECUTABLE(BUILD_LD) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
209 |
fi |
13697 | 210 |
AC_SUBST(BUILD_CC) |
211 |
AC_SUBST(BUILD_CXX) |
|
212 |
AC_SUBST(BUILD_LD) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
213 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
214 |
# If a devkit is found on the builddeps server, then prepend its path to the |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
215 |
# PATH variable. If there are cross compilers available in the devkit, these |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
216 |
# will be found by AC_PROG_CC et al. |
13697 | 217 |
DEVKIT= |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
218 |
BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx, |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
219 |
[# Found devkit |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
220 |
PATH="$DEVKIT/bin:$PATH" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
221 |
SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
222 |
if test "x$x_includes" = "xNONE"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
223 |
x_includes="$SYS_ROOT/usr/include/X11" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
224 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
225 |
if test "x$x_libraries" = "xNONE"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
226 |
x_libraries="$SYS_ROOT/usr/lib" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
227 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
228 |
], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
229 |
[]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
230 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
231 |
# Store the CFLAGS etal passed to the configure script. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
232 |
ORG_CFLAGS="$CFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
233 |
ORG_CXXFLAGS="$CXXFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
234 |
ORG_OBJCFLAGS="$OBJCFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
235 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
236 |
# autoconf magic only relies on PATH, so update it if tools dir is specified |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
237 |
OLD_PATH="$PATH" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
238 |
if test "x$TOOLS_DIR" != x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
239 |
PATH=$TOOLS_DIR:$PATH |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
240 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
241 |
|
14111 | 242 |
|
243 |
### Locate C compiler (CC) |
|
244 |
||
15906
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
245 |
# On windows, only cl.exe is supported. |
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
246 |
# On Solaris, cc is preferred to gcc. |
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
247 |
# Elsewhere, gcc is preferred to cc. |
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
248 |
|
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
249 |
if test "x$CC" != x; then |
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
250 |
COMPILER_CHECK_LIST="$CC" |
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
251 |
elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then |
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
252 |
COMPILER_CHECK_LIST="cl" |
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
253 |
elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then |
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
254 |
COMPILER_CHECK_LIST="cc gcc" |
14111 | 255 |
else |
15906
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
256 |
COMPILER_CHECK_LIST="gcc cc" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
257 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
258 |
|
14111 | 259 |
TOOLCHAIN_FIND_COMPILER([CC],[C],[$COMPILER_CHECK_LIST]) |
15906
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
260 |
# Now that we have resolved CC ourself, let autoconf have its go at it |
14111 | 261 |
AC_PROG_CC([$CC]) |
262 |
||
263 |
### Locate C++ compiler (CXX) |
|
264 |
||
15906
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
265 |
if test "x$CXX" != x; then |
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
266 |
COMPILER_CHECK_LIST="$CXX" |
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
267 |
elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then |
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
268 |
COMPILER_CHECK_LIST="cl" |
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
269 |
elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then |
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
270 |
COMPILER_CHECK_LIST="CC g++" |
14111 | 271 |
else |
15906
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
272 |
COMPILER_CHECK_LIST="g++ CC" |
14111 | 273 |
fi |
15906
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
274 |
|
14111 | 275 |
TOOLCHAIN_FIND_COMPILER([CXX],[C++],[$COMPILER_CHECK_LIST]) |
15906
3c42874d7148
8006988: build-infra: Configure fails if 'cl' is in path on linux
martin
parents:
15581
diff
changeset
|
276 |
# Now that we have resolved CXX ourself, let autoconf have its go at it |
14111 | 277 |
AC_PROG_CXX([$CXX]) |
278 |
||
279 |
### Locate other tools |
|
280 |
||
14112
1b447f5cb0d1
8001897: build-infra: misc adjustments to configure script
ihse
parents:
14111
diff
changeset
|
281 |
if test "x$OPENJDK_TARGET_OS" = xmacosx; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
282 |
AC_PROG_OBJC |
14111 | 283 |
BASIC_FIXUP_EXECUTABLE(OBJC) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
284 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
285 |
OBJC= |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
286 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
287 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
288 |
# Restore the flags to the user specified values. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
289 |
# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
290 |
CFLAGS="$ORG_CFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
291 |
CXXFLAGS="$ORG_CXXFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
292 |
OBJCFLAGS="$ORG_OBJCFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
293 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
294 |
LD="$CC" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
295 |
LDEXE="$CC" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
296 |
LDCXX="$CXX" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
297 |
LDEXECXX="$CXX" |
13697 | 298 |
AC_SUBST(LD) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
299 |
# LDEXE is the linker to use, when creating executables. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
300 |
AC_SUBST(LDEXE) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
301 |
# Linking C++ libraries. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
302 |
AC_SUBST(LDCXX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
303 |
# Linking C++ executables. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
304 |
AC_SUBST(LDEXECXX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
305 |
|
14111 | 306 |
if test "x$OPENJDK_TARGET_OS" != xwindows; then |
13697 | 307 |
AC_CHECK_TOOL(AR, ar) |
14111 | 308 |
BASIC_FIXUP_EXECUTABLE(AR) |
13697 | 309 |
fi |
14111 | 310 |
if test "x$OPENJDK_TARGET_OS" = xmacosx; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
311 |
ARFLAGS="-r" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
312 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
313 |
ARFLAGS="" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
314 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
315 |
AC_SUBST(ARFLAGS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
316 |
|
14111 | 317 |
# For hotspot, we need these in Windows mixed path; other platforms keep them the same |
318 |
HOTSPOT_CXX="$CXX" |
|
319 |
HOTSPOT_LD="$LD" |
|
320 |
AC_SUBST(HOTSPOT_CXX) |
|
321 |
AC_SUBST(HOTSPOT_LD) |
|
322 |
||
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
323 |
COMPILER_NAME=gcc |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
324 |
COMPILER_TYPE=CC |
14111 | 325 |
AS_IF([test "x$OPENJDK_TARGET_OS" = xwindows], [ |
17664
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
326 |
# For now, assume that we are always compiling using cl.exe. |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
327 |
CC_OUT_OPTION=-Fo |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
328 |
EXE_OUT_OPTION=-out: |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
329 |
LD_OUT_OPTION=-out: |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
330 |
AR_OUT_OPTION=-out: |
13697 | 331 |
# On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
332 |
# program for something completely different. |
13697 | 333 |
AC_CHECK_PROG([WINLD], [link],[link],,, [$CYGWIN_LINK]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
334 |
# Since we must ignore the first found link, WINLD will contain |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
335 |
# the full path to the link.exe program. |
14111 | 336 |
BASIC_FIXUP_EXECUTABLE(WINLD) |
13697 | 337 |
printf "Windows linker was found at $WINLD\n" |
338 |
AC_MSG_CHECKING([if the found link.exe is actually the Visual Studio linker]) |
|
339 |
"$WINLD" --version > /dev/null |
|
340 |
if test $? -eq 0 ; then |
|
341 |
AC_MSG_RESULT([no]) |
|
342 |
AC_MSG_ERROR([This is the Cygwin link tool. Please check your PATH and rerun configure.]) |
|
343 |
else |
|
344 |
AC_MSG_RESULT([yes]) |
|
345 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
346 |
LD="$WINLD" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
347 |
LDEXE="$WINLD" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
348 |
LDCXX="$WINLD" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
349 |
LDEXECXX="$WINLD" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
350 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
351 |
AC_CHECK_PROG([MT], [mt], [mt],,, [/usr/bin/mt]) |
14111 | 352 |
BASIC_FIXUP_EXECUTABLE(MT) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
353 |
# The resource compiler |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
354 |
AC_CHECK_PROG([RC], [rc], [rc],,, [/usr/bin/rc]) |
14111 | 355 |
BASIC_FIXUP_EXECUTABLE(RC) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
356 |
|
14111 | 357 |
# For hotspot, we need these in Windows mixed path, |
358 |
# so rewrite them all. Need added .exe suffix. |
|
359 |
HOTSPOT_CXX="$CXX.exe" |
|
360 |
HOTSPOT_LD="$LD.exe" |
|
361 |
HOTSPOT_MT="$MT.exe" |
|
362 |
HOTSPOT_RC="$RC.exe" |
|
363 |
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(HOTSPOT_CXX) |
|
364 |
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(HOTSPOT_LD) |
|
365 |
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(HOTSPOT_MT) |
|
366 |
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(HOTSPOT_RC) |
|
367 |
AC_SUBST(HOTSPOT_MT) |
|
368 |
AC_SUBST(HOTSPOT_RC) |
|
369 |
||
370 |
RC_FLAGS="-nologo -l 0x409 -r" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
371 |
AS_IF([test "x$VARIANT" = xOPT], [ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
372 |
RC_FLAGS="$RC_FLAGS -d NDEBUG" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
373 |
]) |
18426
bf9e616c1476
8009744: build-infra: REGRESSION: Publisher was NOT set for some JDK files
erikj
parents:
18423
diff
changeset
|
374 |
|
bf9e616c1476
8009744: build-infra: REGRESSION: Publisher was NOT set for some JDK files
erikj
parents:
18423
diff
changeset
|
375 |
# The version variables used to create RC_FLAGS may be overridden |
bf9e616c1476
8009744: build-infra: REGRESSION: Publisher was NOT set for some JDK files
erikj
parents:
18423
diff
changeset
|
376 |
# in a custom configure script, or possibly the command line. |
bf9e616c1476
8009744: build-infra: REGRESSION: Publisher was NOT set for some JDK files
erikj
parents:
18423
diff
changeset
|
377 |
# Let those variables be expanded at make time in spec.gmk. |
bf9e616c1476
8009744: build-infra: REGRESSION: Publisher was NOT set for some JDK files
erikj
parents:
18423
diff
changeset
|
378 |
# The \$ are escaped to the shell, and the $(...) variables |
bf9e616c1476
8009744: build-infra: REGRESSION: Publisher was NOT set for some JDK files
erikj
parents:
18423
diff
changeset
|
379 |
# are evaluated by make. |
bf9e616c1476
8009744: build-infra: REGRESSION: Publisher was NOT set for some JDK files
erikj
parents:
18423
diff
changeset
|
380 |
RC_FLAGS="$RC_FLAGS \ |
bf9e616c1476
8009744: build-infra: REGRESSION: Publisher was NOT set for some JDK files
erikj
parents:
18423
diff
changeset
|
381 |
-d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \ |
bf9e616c1476
8009744: build-infra: REGRESSION: Publisher was NOT set for some JDK files
erikj
parents:
18423
diff
changeset
|
382 |
-d \"JDK_COMPANY=\$(COMPANY_NAME)\" \ |
bf9e616c1476
8009744: build-infra: REGRESSION: Publisher was NOT set for some JDK files
erikj
parents:
18423
diff
changeset
|
383 |
-d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \ |
bf9e616c1476
8009744: build-infra: REGRESSION: Publisher was NOT set for some JDK files
erikj
parents:
18423
diff
changeset
|
384 |
-d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \ |
bf9e616c1476
8009744: build-infra: REGRESSION: Publisher was NOT set for some JDK files
erikj
parents:
18423
diff
changeset
|
385 |
-d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \ |
bf9e616c1476
8009744: build-infra: REGRESSION: Publisher was NOT set for some JDK files
erikj
parents:
18423
diff
changeset
|
386 |
-d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \ |
bf9e616c1476
8009744: build-infra: REGRESSION: Publisher was NOT set for some JDK files
erikj
parents:
18423
diff
changeset
|
387 |
-d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\"" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
388 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
389 |
# lib.exe is used to create static libraries. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
390 |
AC_CHECK_PROG([WINAR], [lib],[lib],,,) |
14111 | 391 |
BASIC_FIXUP_EXECUTABLE(WINAR) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
392 |
AR="$WINAR" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
393 |
ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
394 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
395 |
AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,) |
14111 | 396 |
BASIC_FIXUP_EXECUTABLE(DUMPBIN) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
397 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
398 |
COMPILER_TYPE=CL |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
399 |
CCXXFLAGS="$CCXXFLAGS -nologo" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
400 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
401 |
AC_SUBST(RC_FLAGS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
402 |
AC_SUBST(COMPILER_TYPE) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
403 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
404 |
AC_PROG_CPP |
14111 | 405 |
BASIC_FIXUP_EXECUTABLE(CPP) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
406 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
407 |
AC_PROG_CXXCPP |
14111 | 408 |
BASIC_FIXUP_EXECUTABLE(CXXCPP) |
13697 | 409 |
|
410 |
if test "x$COMPILE_TYPE" != "xcross"; then |
|
411 |
# If we are not cross compiling, use the same compilers for |
|
412 |
# building the build platform executables. The cross-compilation |
|
413 |
# case needed to be done earlier, but this can only be done after |
|
414 |
# the native tools have been localized. |
|
415 |
BUILD_CC="$CC" |
|
416 |
BUILD_CXX="$CXX" |
|
417 |
BUILD_LD="$LD" |
|
418 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
419 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
420 |
# for solaris we really need solaris tools, and not gnu equivalent |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
421 |
# these seems to normally reside in /usr/ccs/bin so add that to path before |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
422 |
# starting to probe |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
423 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
424 |
# NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
425 |
# so that it can be overriden --with-tools-dir |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
426 |
if test "x$OPENJDK_BUILD_OS" = xsolaris; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
427 |
PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
428 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
429 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
430 |
# Find the right assembler. |
14111 | 431 |
if test "x$OPENJDK_TARGET_OS" = xsolaris; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
432 |
AC_PATH_PROG(AS, as) |
14111 | 433 |
BASIC_FIXUP_EXECUTABLE(AS) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
434 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
435 |
AS="$CC -c" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
436 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
437 |
AC_SUBST(AS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
438 |
|
14111 | 439 |
if test "x$OPENJDK_TARGET_OS" = xsolaris; then |
16582
61f0b8f48036
8006288: build-infra: Use solaris nm and not gnm on solaris
erikj
parents:
15912
diff
changeset
|
440 |
AC_PATH_PROG(NM, nm) |
14111 | 441 |
BASIC_FIXUP_EXECUTABLE(NM) |
16582
61f0b8f48036
8006288: build-infra: Use solaris nm and not gnm on solaris
erikj
parents:
15912
diff
changeset
|
442 |
AC_PATH_PROG(GNM, gnm) |
61f0b8f48036
8006288: build-infra: Use solaris nm and not gnm on solaris
erikj
parents:
15912
diff
changeset
|
443 |
BASIC_FIXUP_EXECUTABLE(GNM) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
444 |
AC_PATH_PROG(STRIP, strip) |
14111 | 445 |
BASIC_FIXUP_EXECUTABLE(STRIP) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
446 |
AC_PATH_PROG(MCS, mcs) |
14111 | 447 |
BASIC_FIXUP_EXECUTABLE(MCS) |
448 |
elif test "x$OPENJDK_TARGET_OS" != xwindows; then |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
449 |
AC_CHECK_TOOL(NM, nm) |
14111 | 450 |
BASIC_FIXUP_EXECUTABLE(NM) |
16582
61f0b8f48036
8006288: build-infra: Use solaris nm and not gnm on solaris
erikj
parents:
15912
diff
changeset
|
451 |
GNM="$NM" |
61f0b8f48036
8006288: build-infra: Use solaris nm and not gnm on solaris
erikj
parents:
15912
diff
changeset
|
452 |
AC_SUBST(GNM) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
453 |
AC_CHECK_TOOL(STRIP, strip) |
14111 | 454 |
BASIC_FIXUP_EXECUTABLE(STRIP) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
455 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
456 |
|
14111 | 457 |
# objcopy is used for moving debug symbols to separate files when |
458 |
# full debug symbols are enabled. |
|
459 |
if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then |
|
460 |
AC_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy]) |
|
14464
b82a851468d0
8003300: build-infra: fails on solaris when objcopy is not found
tbell
parents:
14112
diff
changeset
|
461 |
# Only call fixup if objcopy was found. |
b82a851468d0
8003300: build-infra: fails on solaris when objcopy is not found
tbell
parents:
14112
diff
changeset
|
462 |
if test -n "$OBJCOPY"; then |
b82a851468d0
8003300: build-infra: fails on solaris when objcopy is not found
tbell
parents:
14112
diff
changeset
|
463 |
BASIC_FIXUP_EXECUTABLE(OBJCOPY) |
b82a851468d0
8003300: build-infra: fails on solaris when objcopy is not found
tbell
parents:
14112
diff
changeset
|
464 |
fi |
14111 | 465 |
fi |
466 |
||
467 |
AC_CHECK_TOOLS(OBJDUMP, [gobjdump objdump]) |
|
468 |
if test "x$OBJDUMP" != x; then |
|
469 |
# Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing. |
|
470 |
BASIC_FIXUP_EXECUTABLE(OBJDUMP) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
471 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
472 |
|
13697 | 473 |
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then |
474 |
AC_PATH_PROG(LIPO, lipo) |
|
14111 | 475 |
BASIC_FIXUP_EXECUTABLE(LIPO) |
13697 | 476 |
fi |
477 |
||
17593
de6741d8a142
8007129: build-infra Add configure --with-jtreg option for location of JTREG
erikj
parents:
16988
diff
changeset
|
478 |
TOOLCHAIN_SETUP_JTREG |
de6741d8a142
8007129: build-infra Add configure --with-jtreg option for location of JTREG
erikj
parents:
16988
diff
changeset
|
479 |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
480 |
# Restore old path without tools dir |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
481 |
PATH="$OLD_PATH" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
482 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
483 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
484 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
485 |
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
486 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
487 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
488 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
489 |
# |
17664
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
490 |
# How to compile shared libraries. |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
491 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
492 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
493 |
if test "x$GCC" = xyes; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
494 |
COMPILER_NAME=gcc |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
495 |
PICFLAG="-fPIC" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
496 |
LIBRARY_PREFIX=lib |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
497 |
SHARED_LIBRARY='lib[$]1.so' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
498 |
STATIC_LIBRARY='lib[$]1.a' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
499 |
SHARED_LIBRARY_FLAGS="-shared" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
500 |
SHARED_LIBRARY_SUFFIX='.so' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
501 |
STATIC_LIBRARY_SUFFIX='.a' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
502 |
OBJ_SUFFIX='.o' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
503 |
EXE_SUFFIX='' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
504 |
SET_SHARED_LIBRARY_NAME='-Xlinker -soname=[$]1' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
505 |
SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=[$]1' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
506 |
C_FLAG_REORDER='' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
507 |
CXX_FLAG_REORDER='' |
13697 | 508 |
SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN[$]1' |
509 |
SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN[$]1' |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
510 |
LD="$CC" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
511 |
LDEXE="$CC" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
512 |
LDCXX="$CXX" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
513 |
LDEXECXX="$CXX" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
514 |
POST_STRIP_CMD="$STRIP -g" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
515 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
516 |
# Linking is different on MacOSX |
14111 | 517 |
if test "x$OPENJDK_TARGET_OS" = xmacosx; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
518 |
# Might change in the future to clang. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
519 |
COMPILER_NAME=gcc |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
520 |
SHARED_LIBRARY='lib[$]1.dylib' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
521 |
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
522 |
SHARED_LIBRARY_SUFFIX='.dylib' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
523 |
EXE_SUFFIX='' |
17664
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
524 |
SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1' |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
525 |
SET_SHARED_LIBRARY_MAPFILE='' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
526 |
SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.' |
13697 | 527 |
SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
528 |
POST_STRIP_CMD="$STRIP -S" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
529 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
530 |
else |
14111 | 531 |
if test "x$OPENJDK_TARGET_OS" = xsolaris; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
532 |
# If it is not gcc, then assume it is the Oracle Solaris Studio Compiler |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
533 |
COMPILER_NAME=ossc |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
534 |
PICFLAG="-KPIC" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
535 |
LIBRARY_PREFIX=lib |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
536 |
SHARED_LIBRARY='lib[$]1.so' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
537 |
STATIC_LIBRARY='lib[$]1.a' |
13697 | 538 |
SHARED_LIBRARY_FLAGS="-G" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
539 |
SHARED_LIBRARY_SUFFIX='.so' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
540 |
STATIC_LIBRARY_SUFFIX='.a' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
541 |
OBJ_SUFFIX='.o' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
542 |
EXE_SUFFIX='' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
543 |
SET_SHARED_LIBRARY_NAME='' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
544 |
SET_SHARED_LIBRARY_MAPFILE='-M[$]1' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
545 |
C_FLAG_REORDER='-xF' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
546 |
CXX_FLAG_REORDER='-xF' |
13697 | 547 |
SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN[$]1' |
548 |
SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
549 |
CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
550 |
CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
551 |
CFLAGS_JDKLIB_EXTRA='-xstrconst' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
552 |
POST_STRIP_CMD="$STRIP -x" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
553 |
POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\"" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
554 |
fi |
14111 | 555 |
if test "x$OPENJDK_TARGET_OS" = xwindows; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
556 |
# If it is not gcc, then assume it is the MS Visual Studio compiler |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
557 |
COMPILER_NAME=cl |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
558 |
PICFLAG="" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
559 |
LIBRARY_PREFIX= |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
560 |
SHARED_LIBRARY='[$]1.dll' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
561 |
STATIC_LIBRARY='[$]1.lib' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
562 |
SHARED_LIBRARY_FLAGS="-LD" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
563 |
SHARED_LIBRARY_SUFFIX='.dll' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
564 |
STATIC_LIBRARY_SUFFIX='.lib' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
565 |
OBJ_SUFFIX='.obj' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
566 |
EXE_SUFFIX='.exe' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
567 |
SET_SHARED_LIBRARY_NAME='' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
568 |
SET_SHARED_LIBRARY_MAPFILE='' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
569 |
SET_SHARED_LIBRARY_ORIGIN='' |
13697 | 570 |
SET_EXECUTABLE_ORIGIN='' |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
571 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
572 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
573 |
|
16988
53de314b1c30
8011687: Support correct dependencies from header files on windows and solaris
erikj
parents:
16987
diff
changeset
|
574 |
AC_SUBST(COMPILER_NAME) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
575 |
AC_SUBST(OBJ_SUFFIX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
576 |
AC_SUBST(SHARED_LIBRARY) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
577 |
AC_SUBST(STATIC_LIBRARY) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
578 |
AC_SUBST(LIBRARY_PREFIX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
579 |
AC_SUBST(SHARED_LIBRARY_SUFFIX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
580 |
AC_SUBST(STATIC_LIBRARY_SUFFIX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
581 |
AC_SUBST(EXE_SUFFIX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
582 |
AC_SUBST(SHARED_LIBRARY_FLAGS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
583 |
AC_SUBST(SET_SHARED_LIBRARY_NAME) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
584 |
AC_SUBST(SET_SHARED_LIBRARY_MAPFILE) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
585 |
AC_SUBST(C_FLAG_REORDER) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
586 |
AC_SUBST(CXX_FLAG_REORDER) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
587 |
AC_SUBST(SET_SHARED_LIBRARY_ORIGIN) |
13697 | 588 |
AC_SUBST(SET_EXECUTABLE_ORIGIN) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
589 |
AC_SUBST(POST_STRIP_CMD) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
590 |
AC_SUBST(POST_MCS_CMD) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
591 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
592 |
# The (cross) compiler is now configured, we can now test capabilities |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
593 |
# of the target platform. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
594 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
595 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
596 |
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
597 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
598 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
599 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
600 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
601 |
# Setup the opt flags for different compilers |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
602 |
# and different operating systems. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
603 |
# |
13697 | 604 |
|
605 |
# |
|
606 |
# NOTE: check for -mstackrealign needs to be below potential addition of -m32 |
|
607 |
# |
|
608 |
if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then |
|
609 |
# On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned. |
|
610 |
# While waiting for a better solution, the current workaround is to use -mstackrealign. |
|
611 |
CFLAGS="$CFLAGS -mstackrealign" |
|
612 |
AC_MSG_CHECKING([if 32-bit compiler supports -mstackrealign]) |
|
613 |
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])], |
|
614 |
[ |
|
615 |
AC_MSG_RESULT([yes]) |
|
616 |
], |
|
617 |
[ |
|
618 |
AC_MSG_RESULT([no]) |
|
619 |
AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.]) |
|
620 |
]) |
|
621 |
fi |
|
622 |
||
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
623 |
C_FLAG_DEPS="-MMD -MF" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
624 |
CXX_FLAG_DEPS="-MMD -MF" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
625 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
626 |
case $COMPILER_TYPE in |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
627 |
CC ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
628 |
case $COMPILER_NAME in |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
629 |
gcc ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
630 |
case $OPENJDK_TARGET_OS in |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
631 |
macosx ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
632 |
# On MacOSX we optimize for size, something |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
633 |
# we should do for all platforms? |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
634 |
C_O_FLAG_HI="-Os" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
635 |
C_O_FLAG_NORM="-Os" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
636 |
C_O_FLAG_NONE="" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
637 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
638 |
*) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
639 |
C_O_FLAG_HI="-O3" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
640 |
C_O_FLAG_NORM="-O2" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
641 |
C_O_FLAG_NONE="-O0" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
642 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
643 |
esac |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
644 |
CXX_O_FLAG_HI="$C_O_FLAG_HI" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
645 |
CXX_O_FLAG_NORM="$C_O_FLAG_NORM" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
646 |
CXX_O_FLAG_NONE="$C_O_FLAG_NONE" |
18020
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
647 |
CFLAGS_DEBUG_SYMBOLS="-g" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
648 |
CXXFLAGS_DEBUG_SYMBOLS="-g" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
649 |
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
650 |
CFLAGS_DEBUG_SYMBOLS="-g1" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
651 |
CXXFLAGS_DEBUG_SYMBOLS="-g1" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
652 |
fi |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
653 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
654 |
ossc ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
655 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
656 |
# Forte has different names for this with their C++ compiler... |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
657 |
# |
13697 | 658 |
C_FLAG_DEPS="-xMMD -xMF" |
659 |
CXX_FLAG_DEPS="-xMMD -xMF" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
660 |
|
13697 | 661 |
# Extra options used with HIGHEST |
662 |
# |
|
663 |
# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be |
|
664 |
# done with care, there are some assumptions below that need to |
|
665 |
# be understood about the use of pointers, and IEEE behavior. |
|
666 |
# |
|
667 |
# Use non-standard floating point mode (not IEEE 754) |
|
668 |
CC_HIGHEST="$CC_HIGHEST -fns" |
|
669 |
# Do some simplification of floating point arithmetic (not IEEE 754) |
|
670 |
CC_HIGHEST="$CC_HIGHEST -fsimple" |
|
671 |
# Use single precision floating point with 'float' |
|
672 |
CC_HIGHEST="$CC_HIGHEST -fsingle" |
|
673 |
# Assume memory references via basic pointer types do not alias |
|
17664
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
674 |
# (Source with excessing pointer casting and data access with mixed |
13697 | 675 |
# pointer types are not recommended) |
676 |
CC_HIGHEST="$CC_HIGHEST -xalias_level=basic" |
|
677 |
# Use intrinsic or inline versions for math/std functions |
|
678 |
# (If you expect perfect errno behavior, do not use this) |
|
679 |
CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all" |
|
680 |
# Loop data dependency optimizations (need -xO3 or higher) |
|
681 |
CC_HIGHEST="$CC_HIGHEST -xdepend" |
|
682 |
# Pointer parameters to functions do not overlap |
|
683 |
# (Similar to -xalias_level=basic usage, but less obvious sometimes. |
|
684 |
# If you pass in multiple pointers to the same data, do not use this) |
|
685 |
CC_HIGHEST="$CC_HIGHEST -xrestrict" |
|
686 |
# Inline some library routines |
|
687 |
# (If you expect perfect errno behavior, do not use this) |
|
688 |
CC_HIGHEST="$CC_HIGHEST -xlibmil" |
|
689 |
# Use optimized math routines |
|
690 |
# (If you expect perfect errno behavior, do not use this) |
|
691 |
# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now |
|
692 |
#CC_HIGHEST="$CC_HIGHEST -xlibmopt" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
693 |
|
14111 | 694 |
if test "x$OPENJDK_TARGET_CPU" = xsparc; then |
695 |
CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s" |
|
696 |
CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s" |
|
697 |
fi |
|
698 |
||
13697 | 699 |
case $OPENJDK_TARGET_CPU_ARCH in |
700 |
x86) |
|
701 |
C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr" |
|
702 |
C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr" |
|
703 |
C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr" |
|
704 |
C_O_FLAG_NONE="-xregs=no%frameptr" |
|
705 |
CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr" |
|
706 |
CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr" |
|
707 |
CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr" |
|
708 |
CXX_O_FLAG_NONE="-xregs=no%frameptr" |
|
709 |
if test "x$OPENJDK_TARGET_CPU" = xx86; then |
|
710 |
C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium" |
|
711 |
CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium" |
|
712 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
713 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
714 |
sparc) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
715 |
CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
716 |
CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
717 |
C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
718 |
C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
719 |
C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
720 |
C_O_FLAG_NONE="" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
721 |
CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
722 |
CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
723 |
CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
724 |
CXX_O_FLAG_NONE="" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
725 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
726 |
esac |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
727 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
728 |
CFLAGS_DEBUG_SYMBOLS="-g -xs" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
729 |
CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
730 |
esac |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
731 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
732 |
CL ) |
13697 | 733 |
C_O_FLAG_HIGHEST="-O2" |
734 |
C_O_FLAG_HI="-O1" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
735 |
C_O_FLAG_NORM="-O1" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
736 |
C_O_FLAG_NONE="-Od" |
13697 | 737 |
CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
738 |
CXX_O_FLAG_HI="$C_O_FLAG_HI" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
739 |
CXX_O_FLAG_NORM="$C_O_FLAG_NORM" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
740 |
CXX_O_FLAG_NONE="$C_O_FLAG_NONE" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
741 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
742 |
esac |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
743 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
744 |
if test -z "$C_O_FLAG_HIGHEST"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
745 |
C_O_FLAG_HIGHEST="$C_O_FLAG_HI" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
746 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
747 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
748 |
if test -z "$CXX_O_FLAG_HIGHEST"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
749 |
CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
750 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
751 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
752 |
AC_SUBST(C_O_FLAG_HIGHEST) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
753 |
AC_SUBST(C_O_FLAG_HI) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
754 |
AC_SUBST(C_O_FLAG_NORM) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
755 |
AC_SUBST(C_O_FLAG_NONE) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
756 |
AC_SUBST(CXX_O_FLAG_HIGHEST) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
757 |
AC_SUBST(CXX_O_FLAG_HI) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
758 |
AC_SUBST(CXX_O_FLAG_NORM) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
759 |
AC_SUBST(CXX_O_FLAG_NONE) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
760 |
AC_SUBST(C_FLAG_DEPS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
761 |
AC_SUBST(CXX_FLAG_DEPS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
762 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
763 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
764 |
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
765 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
766 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
767 |
if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then |
13697 | 768 |
AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
769 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
770 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
771 |
if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then |
13697 | 772 |
AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
773 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
774 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
775 |
if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then |
13697 | 776 |
AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
777 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
778 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
779 |
AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
780 |
[extra flags to be used when compiling jdk c-files])]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
781 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
782 |
AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
783 |
[extra flags to be used when compiling jdk c++-files])]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
784 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
785 |
AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
786 |
[extra flags to be used when linking jdk])]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
787 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
788 |
CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
789 |
CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
790 |
LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
791 |
|
13697 | 792 |
# Hotspot needs these set in their legacy form |
793 |
LEGACY_EXTRA_CFLAGS=$with_extra_cflags |
|
794 |
LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags |
|
795 |
LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags |
|
796 |
||
797 |
AC_SUBST(LEGACY_EXTRA_CFLAGS) |
|
798 |
AC_SUBST(LEGACY_EXTRA_CXXFLAGS) |
|
799 |
AC_SUBST(LEGACY_EXTRA_LDFLAGS) |
|
800 |
||
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
801 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
802 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
803 |
# Now setup the CFLAGS and LDFLAGS for the JDK build. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
804 |
# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
805 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
806 |
case $COMPILER_NAME in |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
807 |
gcc ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
808 |
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
809 |
-pipe \ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
810 |
-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
811 |
case $OPENJDK_TARGET_CPU_ARCH in |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
812 |
arm ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
813 |
# on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
814 |
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
815 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
816 |
ppc ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
817 |
# on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
818 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
819 |
* ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
820 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
821 |
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
822 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
823 |
esac |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
824 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
825 |
ossc ) |
13697 | 826 |
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS" |
827 |
case $OPENJDK_TARGET_CPU_ARCH in |
|
828 |
x86 ) |
|
14111 | 829 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB" |
13697 | 830 |
CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE" |
831 |
;; |
|
832 |
esac |
|
833 |
||
834 |
CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal" |
|
835 |
CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib" |
|
836 |
||
837 |
LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext" |
|
838 |
LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
839 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
840 |
cl ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
841 |
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
842 |
-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
843 |
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
844 |
-DWIN32 -DIAL" |
13697 | 845 |
case $OPENJDK_TARGET_CPU in |
846 |
x86 ) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
847 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
848 |
;; |
13697 | 849 |
x86_64 ) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
850 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
851 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
852 |
esac |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
853 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
854 |
esac |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
855 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
856 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
857 |
|
18020
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
858 |
# Adjust flags according to debug level. |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
859 |
case $DEBUG_LEVEL in |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
860 |
fastdebug ) |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
861 |
CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
862 |
CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
863 |
C_O_FLAG_HI="$C_O_FLAG_NORM" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
864 |
C_O_FLAG_NORM="$C_O_FLAG_NORM" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
865 |
CXX_O_FLAG_HI="$CXX_O_FLAG_NORM" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
866 |
CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
867 |
JAVAC_FLAGS="$JAVAC_FLAGS -g" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
868 |
;; |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
869 |
slowdebug ) |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
870 |
CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
871 |
CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
872 |
C_O_FLAG_HI="$C_O_FLAG_NONE" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
873 |
C_O_FLAG_NORM="$C_O_FLAG_NONE" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
874 |
CXX_O_FLAG_HI="$CXX_O_FLAG_NONE" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
875 |
CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
876 |
JAVAC_FLAGS="$JAVAC_FLAGS -g" |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
877 |
;; |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
878 |
esac |
eade0d9836bf
8014404: Debug flag not added to jdk native compile when --enable-debug is set
erikj
parents:
17664
diff
changeset
|
879 |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
880 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
881 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
882 |
# The package path is used only on macosx? |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
883 |
PACKAGE_PATH=/opt/local |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
884 |
AC_SUBST(PACKAGE_PATH) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
885 |
|
13697 | 886 |
if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then |
887 |
# The macro _LITTLE_ENDIAN needs to be defined the same to avoid the |
|
888 |
# Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN |
|
889 |
# (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h). |
|
890 |
# Note: -Dmacro is the same as #define macro 1 |
|
891 |
# -Dmacro= is the same as #define macro |
|
892 |
if test "x$OPENJDK_TARGET_OS" = xsolaris; then |
|
893 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN=" |
|
894 |
else |
|
895 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN" |
|
896 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
897 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
898 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
899 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
900 |
if test "x$OPENJDK_TARGET_OS" = xlinux; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
901 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
902 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
903 |
if test "x$OPENJDK_TARGET_OS" = xwindows; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
904 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
905 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
906 |
if test "x$OPENJDK_TARGET_OS" = xsolaris; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
907 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
908 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
909 |
if test "x$OPENJDK_TARGET_OS" = xmacosx; then |
19311
741980fe0b33
8021820: Number of opened files used in select() is limited to 1024 [macosx]
aefimov
parents:
18426
diff
changeset
|
910 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT" |
17664
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
911 |
# Setting these parameters makes it an error to link to macosx APIs that are |
15786 | 912 |
# newer than the given OS version and makes the linked binaries compatible even |
913 |
# if built on a newer version of the OS. |
|
914 |
# The expected format is X.Y.Z |
|
915 |
MACOSX_VERSION_MIN=10.7.0 |
|
916 |
AC_SUBST(MACOSX_VERSION_MIN) |
|
917 |
# The macro takes the version with no dots, ex: 1070 |
|
918 |
# Let the flags variables get resolved in make for easier override on make |
|
919 |
# command line. |
|
920 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" |
|
921 |
LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
922 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
923 |
if test "x$OPENJDK_TARGET_OS" = xbsd; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
924 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
925 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
926 |
if test "x$DEBUG_LEVEL" = xrelease; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
927 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG" |
13697 | 928 |
if test "x$OPENJDK_TARGET_OS" = xsolaris; then |
929 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED" |
|
930 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
931 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
932 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
933 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
934 |
|
13697 | 935 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
936 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
937 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
938 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK \ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
939 |
-I${JDK_OUTPUTDIR}/include \ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
940 |
-I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
941 |
-I${JDK_TOPDIR}/src/share/javavm/export \ |
13697 | 942 |
-I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \ |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
943 |
-I${JDK_TOPDIR}/src/share/native/common \ |
13697 | 944 |
-I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
945 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
946 |
# The shared libraries are compiled using the picflag. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
947 |
CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
948 |
CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA " |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
949 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
950 |
# Executable flags |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
951 |
CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
952 |
CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
953 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
954 |
# Now this is odd. The JDK native libraries have to link against libjvm.so |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
955 |
# On 32-bit machines there is normally two distinct libjvm.so:s, client and server. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
956 |
# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
957 |
# is identical for client and server? Yes. Which is picked at runtime (client or server)? |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
958 |
# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following |
17664
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
959 |
# libraries will link to whatever is in memory. Yuck. |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
960 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
961 |
# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh. |
14111 | 962 |
if test "x$COMPILER_NAME" = xcl; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
963 |
LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no" |
17664
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
964 |
if test "x$OPENJDK_TARGET_CPU" = xx86; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
965 |
LDFLAGS_JDK="$LDFLAGS_JDK -safeseh" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
966 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
967 |
# TODO: make -debug optional "--disable-full-debug-symbols" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
968 |
LDFLAGS_JDK="$LDFLAGS_JDK -debug" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
969 |
LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
970 |
LDFLAGS_JDKLIB_SUFFIX="" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
971 |
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
972 |
LDFLAGS_STACK_SIZE=1048576 |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
973 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
974 |
LDFLAGS_STACK_SIZE=327680 |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
975 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
976 |
LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
977 |
else |
14111 | 978 |
if test "x$COMPILER_NAME" = xgcc; then |
979 |
# If this is a --hash-style=gnu system, use --hash-style=both, why? |
|
980 |
HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'` |
|
981 |
if test -n "$HAS_GNU_HASH"; then |
|
982 |
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both " |
|
983 |
fi |
|
17664
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
984 |
if test "x$OPENJDK_TARGET_OS" = xlinux; then |
14111 | 985 |
# And since we now know that the linker is gnu, then add -z defs, to forbid |
986 |
# undefined symbols in object files. |
|
987 |
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs" |
|
988 |
if test "x$DEBUG_LEVEL" = "xrelease"; then |
|
989 |
# When building release libraries, tell the linker optimize them. |
|
990 |
# Should this be supplied to the OSS linker as well? |
|
991 |
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1" |
|
992 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
993 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
994 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
995 |
LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \ |
13697 | 996 |
-L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}" |
997 |
||
14465 | 998 |
# On some platforms (mac) the linker warns about non existing -L dirs. |
14467
a973c0a1bd5d
8003528: build-infra: Diffs in libjava and hotspot libs on solaris.
erikj
parents:
14465
diff
changeset
|
999 |
# Add server first if available. Linking aginst client does not always produce the same results. |
14810 | 1000 |
# Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1. |
1001 |
# Default to server for other variants. |
|
14467
a973c0a1bd5d
8003528: build-infra: Diffs in libjava and hotspot libs on solaris.
erikj
parents:
14465
diff
changeset
|
1002 |
if test "x$JVM_VARIANT_SERVER" = xtrue; then |
a973c0a1bd5d
8003528: build-infra: Diffs in libjava and hotspot libs on solaris.
erikj
parents:
14465
diff
changeset
|
1003 |
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server" |
a973c0a1bd5d
8003528: build-infra: Diffs in libjava and hotspot libs on solaris.
erikj
parents:
14465
diff
changeset
|
1004 |
elif test "x$JVM_VARIANT_CLIENT" = xtrue; then |
14465 | 1005 |
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client" |
14810 | 1006 |
elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then |
1007 |
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal" |
|
14465 | 1008 |
else |
1009 |
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server" |
|
1010 |
fi |
|
1011 |
||
13697 | 1012 |
LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1013 |
if test "x$COMPILER_NAME" = xossc; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1014 |
LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1015 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1016 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1017 |
LDFLAGS_JDKEXE="${LDFLAGS_JDK}" |
13697 | 1018 |
if test "x$OPENJDK_TARGET_OS" = xlinux; then |
1019 |
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1020 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1021 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1022 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1023 |
AC_SUBST(CFLAGS_JDKLIB) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1024 |
AC_SUBST(CFLAGS_JDKEXE) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1025 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1026 |
AC_SUBST(CXXFLAGS_JDKLIB) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1027 |
AC_SUBST(CXXFLAGS_JDKEXE) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1028 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1029 |
AC_SUBST(LDFLAGS_JDKLIB) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1030 |
AC_SUBST(LDFLAGS_JDKEXE) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1031 |
AC_SUBST(LDFLAGS_JDKLIB_SUFFIX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1032 |
AC_SUBST(LDFLAGS_JDKEXE_SUFFIX) |
13697 | 1033 |
AC_SUBST(LDFLAGS_CXX_JDK) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
1034 |
]) |
16987 | 1035 |
|
1036 |
||
1037 |
# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE], |
|
1038 |
# [RUN-IF-FALSE]) |
|
1039 |
# ------------------------------------------------------------ |
|
1040 |
# Check that the c and c++ compilers support an argument |
|
1041 |
AC_DEFUN([TOOLCHAIN_COMPILER_CHECK_ARGUMENTS], |
|
1042 |
[ |
|
1043 |
AC_MSG_CHECKING([if compiler supports "$1"]) |
|
1044 |
supports=yes |
|
1045 |
||
1046 |
saved_cflags="$CFLAGS" |
|
1047 |
CFLAGS="$CFLAGS $1" |
|
1048 |
AC_LANG_PUSH([C]) |
|
1049 |
AC_COMPILE_IFELSE([ |
|
1050 |
AC_LANG_SOURCE([[int i;]]) |
|
1051 |
], [], [supports=no]) |
|
1052 |
AC_LANG_POP([C]) |
|
1053 |
CFLAGS="$saved_cflags" |
|
1054 |
||
1055 |
saved_cxxflags="$CXXFLAGS" |
|
1056 |
CXXFLAGS="$CXXFLAG $1" |
|
1057 |
AC_LANG_PUSH([C++]) |
|
1058 |
AC_COMPILE_IFELSE([ |
|
1059 |
AC_LANG_SOURCE([[int i;]]) |
|
1060 |
], [], [supports=no]) |
|
1061 |
AC_LANG_POP([C++]) |
|
1062 |
CXXFLAGS="$saved_cxxflags" |
|
1063 |
||
1064 |
AC_MSG_RESULT([$supports]) |
|
1065 |
if test "x$supports" = "xyes" ; then |
|
1066 |
m4_ifval([$2], [$2], [:]) |
|
1067 |
else |
|
1068 |
m4_ifval([$3], [$3], [:]) |
|
1069 |
fi |
|
1070 |
]) |
|
1071 |
||
1072 |
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_MISC], |
|
1073 |
[ |
|
1074 |
# Some Zero and Shark settings. |
|
1075 |
# ZERO_ARCHFLAG tells the compiler which mode to build for |
|
1076 |
case "${OPENJDK_TARGET_CPU}" in |
|
1077 |
s390) |
|
1078 |
ZERO_ARCHFLAG="-m31" |
|
1079 |
;; |
|
1080 |
*) |
|
1081 |
ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}" |
|
1082 |
esac |
|
1083 |
TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([$ZERO_ARCHFLAG], [], [ZERO_ARCHFLAG=""]) |
|
1084 |
AC_SUBST(ZERO_ARCHFLAG) |
|
1085 |
||
1086 |
# Check that the compiler supports -mX flags |
|
1087 |
# Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does |
|
1088 |
TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([-m${OPENJDK_TARGET_CPU_BITS}], |
|
1089 |
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=true], |
|
1090 |
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=false]) |
|
1091 |
AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG) |
|
1092 |
]) |
|
17593
de6741d8a142
8007129: build-infra Add configure --with-jtreg option for location of JTREG
erikj
parents:
16988
diff
changeset
|
1093 |
|
17664
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1094 |
# Setup the JTREG paths |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1095 |
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG], |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1096 |
[ |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1097 |
AC_ARG_WITH(jtreg, [AS_HELP_STRING([--with-jtreg], |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1098 |
[Regression Test Harness @<:@probed@:>@])], |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1099 |
[], |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1100 |
[with_jtreg=no]) |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1101 |
|
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1102 |
if test "x$with_jtreg" = xno; then |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1103 |
# jtreg disabled |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1104 |
AC_MSG_CHECKING([for jtreg]) |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1105 |
AC_MSG_RESULT(no) |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1106 |
else |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1107 |
if test "x$with_jtreg" != xyes; then |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1108 |
# with path specified. |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1109 |
JT_HOME="$with_jtreg" |
17593
de6741d8a142
8007129: build-infra Add configure --with-jtreg option for location of JTREG
erikj
parents:
16988
diff
changeset
|
1110 |
fi |
17664
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1111 |
|
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1112 |
if test "x$JT_HOME" != x; then |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1113 |
AC_MSG_CHECKING([for jtreg]) |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1114 |
|
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1115 |
# use JT_HOME enviroment var. |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1116 |
BASIC_FIXUP_PATH([JT_HOME]) |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1117 |
|
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1118 |
# jtreg win32 script works for everybody |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1119 |
JTREGEXE="$JT_HOME/win32/bin/jtreg" |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1120 |
|
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1121 |
if test ! -f "$JTREGEXE"; then |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1122 |
AC_MSG_ERROR([JTReg executable does not exist: $JTREGEXE]) |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1123 |
fi |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1124 |
|
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1125 |
AC_MSG_RESULT($JTREGEXE) |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1126 |
else |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1127 |
# try to find jtreg on path |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1128 |
BASIC_REQUIRE_PROG(JTREGEXE, jtreg) |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1129 |
JT_HOME="`$DIRNAME $JTREGEXE`" |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1130 |
fi |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1131 |
fi |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1132 |
|
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1133 |
AC_SUBST(JT_HOME) |
2cb42641740b
8015510: (s) Improve JTReg location detection and provide location to test/Makefile
mduigou
parents:
17593
diff
changeset
|
1134 |
AC_SUBST(JTREGEXE) |
17593
de6741d8a142
8007129: build-infra Add configure --with-jtreg option for location of JTREG
erikj
parents:
16988
diff
changeset
|
1135 |
]) |