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