author | xuelei |
Thu, 18 Oct 2012 01:14:00 -0700 | |
changeset 14194 | 971f46db533d |
parent 13697 | 5262b00bc10c |
child 14111 | 2a82ecb35fc7 |
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 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
26 |
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
27 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
28 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
29 |
# Check if the VS env variables were setup prior to running configure. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
30 |
# If not, then find vcvarsall.bat and run it automatically, and integrate |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
31 |
# the set env variables into the spec file. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
32 |
SETUPDEVENV="# No special vars" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
33 |
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then |
13697 | 34 |
# Store path to cygwin link.exe to help excluding it when searching for |
35 |
# VS linker. |
|
36 |
AC_PATH_PROG(CYGWIN_LINK, link) |
|
37 |
AC_MSG_CHECKING([if the first found link.exe is actually the Cygwin link tool]) |
|
38 |
"$CYGWIN_LINK" --version > /dev/null |
|
39 |
if test $? -eq 0 ; then |
|
40 |
AC_MSG_RESULT([yes]) |
|
41 |
else |
|
42 |
AC_MSG_RESULT([no]) |
|
43 |
# This might be the VS linker. Don't exclude it later on. |
|
44 |
CYGWIN_LINK="" |
|
45 |
fi |
|
46 |
||
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
47 |
# If vcvarsall.bat has been run, then VCINSTALLDIR is set. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
48 |
if test "x$VCINSTALLDIR" != x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
49 |
# No further setup is needed. The build will happen from this kind |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
50 |
# of shell. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
51 |
SETUPDEVENV="# This spec file expects that you are running bash from within a VS command prompt." |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
52 |
# Make sure to remind you, if you forget to run make from a cygwin bash shell |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
53 |
# that is spawned "bash -l" from a VS command prompt. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
54 |
CHECK_FOR_VCINSTALLDIR=yes |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
55 |
AC_MSG_CHECKING([if you are running from within a VS command prompt]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
56 |
AC_MSG_RESULT([yes]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
57 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
58 |
# Ah, we have not yet run vcvarsall.bat/vsvars32.bat/vsvars64.bat. Lets do that. First find it. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
59 |
if test "x$VS100COMNTOOLS" != x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
60 |
VARSBAT=`find "$VS100COMNTOOLS/../.." -name vcvarsall.bat` |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
61 |
SEARCH_ROOT="$VS100COMNTOOLS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
62 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
63 |
VARSBAT=`find "$PROGRAMFILES" -name vcvarsall.bat` |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
64 |
SEARCH_ROOT="$PROGRAMFILES" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
65 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
66 |
VCPATH=`dirname "$VARSBAT"` |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
67 |
VCPATH=`cygpath -w "$VCPATH"` |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
68 |
if test "x$VARSBAT" = x || test ! -d "$VCPATH"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
69 |
AC_MSG_CHECKING([if we can find the VS installation]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
70 |
AC_MSG_RESULT([no]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
71 |
AC_MSG_ERROR([Tried to find a VS installation using both $SEARCH_ROOT but failed. Please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
72 |
fi |
13697 | 73 |
case "$OPENJDK_TARGET_CPU" in |
74 |
x86) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
75 |
VARSBAT_ARCH=x86 |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
76 |
;; |
13697 | 77 |
x86_64) |
78 |
VARSBAT_ARCH=amd64 |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
79 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
80 |
esac |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
81 |
# Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
82 |
cd $OUTPUT_ROOT |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
83 |
bash $SRC_ROOT/common/bin/extractvcvars.sh "$VARSBAT" "$VARSBAT_ARCH" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
84 |
cd $CURDIR |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
85 |
if test ! -s $OUTPUT_ROOT/localdevenv.sh || test ! -s $OUTPUT_ROOT/localdevenv.gmk; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
86 |
AC_MSG_CHECKING([if we can extract the needed env variables]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
87 |
AC_MSG_RESULT([no]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
88 |
AC_MSG_ERROR([Could not succesfully extract the env variables needed for the VS setup. Please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
89 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
90 |
# Now set all paths and other env variables. This will allow the rest of |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
91 |
# the configure script to find and run the compiler in the proper way. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
92 |
. $OUTPUT_ROOT/localdevenv.sh |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
93 |
AC_MSG_CHECKING([if we can find the VS installation]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
94 |
if test "x$VCINSTALLDIR" != x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
95 |
AC_MSG_RESULT([$VCINSTALLDIR]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
96 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
97 |
AC_MSG_RESULT([no]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
98 |
AC_MSG_ERROR([Could not find VS installation. Please install. If you are sure you have installed VS, then please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
99 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
100 |
CHECK_FOR_VCINSTALLDIR=no |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
101 |
SETUPDEVENV="include $OUTPUT_ROOT/localdevenv.gmk" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
102 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
103 |
AC_MSG_CHECKING([for msvcr100.dll]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
104 |
AC_ARG_WITH(msvcr100dll, [AS_HELP_STRING([--with-msvcr100dll], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
105 |
[copy this msvcr100.dll into the built JDK])]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
106 |
if test "x$with_msvcr100dll" != x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
107 |
MSVCR100DLL="$with_msvcr100dll" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
108 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
109 |
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
110 |
MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x64 | head --lines 1` |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
111 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
112 |
MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1` |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
113 |
if test "x$MSVCR100DLL" = x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
114 |
MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | head --lines 1` |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
115 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
116 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
117 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
118 |
if test "x$MSVCR100DLL" = x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
119 |
AC_MSG_RESULT([no]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
120 |
AC_MSG_ERROR([Could not find msvcr100.dll !]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
121 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
122 |
AC_MSG_RESULT([$MSVCR100DLL]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
123 |
SPACESAFE(MSVCR100DLL,[the path to msvcr100.dll]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
124 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
125 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
126 |
AC_SUBST(SETUPDEVENV) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
127 |
AC_SUBST(CHECK_FOR_VCINSTALLDIR) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
128 |
AC_SUBST(MSVCR100DLL) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
129 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
130 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
131 |
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
132 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
133 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
134 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
135 |
# Configure the development tool paths and potential sysroot. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
136 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
137 |
AC_LANG(C++) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
138 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
139 |
# 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
|
140 |
# 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
|
141 |
CC_OUT_OPTION='-o$(SPACE)' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
142 |
# When linking, how to specify the to be created executable. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
143 |
EXE_OUT_OPTION='-o$(SPACE)' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
144 |
# 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
|
145 |
LD_OUT_OPTION='-o$(SPACE)' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
146 |
# 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
|
147 |
AR_OUT_OPTION='rcs$(SPACE)' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
148 |
AC_SUBST(CC_OUT_OPTION) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
149 |
AC_SUBST(EXE_OUT_OPTION) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
150 |
AC_SUBST(LD_OUT_OPTION) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
151 |
AC_SUBST(AR_OUT_OPTION) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
152 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
153 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
154 |
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_PATHS], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
155 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
156 |
# 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
|
157 |
# cross compilation tools in the PATH. Cross compilation tools |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
158 |
# 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
|
159 |
# For example the binary i686-sun-solaris2.10-gcc |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
160 |
# will cross compile for i686-sun-solaris2.10 |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
161 |
# 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
|
162 |
# default compiler found in the path will be used. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
163 |
# Setting only --host, does not seem to be really supported. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
164 |
# 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
|
165 |
|
13697 | 166 |
if test "x$COMPILE_TYPE" = "xcross"; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
167 |
# 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
|
168 |
# platform. We can't use the AC_PROG_CC macro, since it can only be used |
13697 | 169 |
# once. Also, we need to do this before adding a tools dir to the path, |
170 |
# otherwise we might pick up cross-compilers which don't use standard naming. |
|
171 |
# Otherwise, we'll set the BUILD_tools to the native tools, but that'll have |
|
172 |
# to wait until they are properly discovered. |
|
173 |
AC_PATH_PROGS(BUILD_CC, [cl cc gcc]) |
|
174 |
SET_FULL_PATH(BUILD_CC) |
|
175 |
AC_PATH_PROGS(BUILD_CXX, [cl CC g++]) |
|
176 |
SET_FULL_PATH(BUILD_CXX) |
|
177 |
AC_PATH_PROG(BUILD_LD, ld) |
|
178 |
SET_FULL_PATH(BUILD_LD) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
179 |
fi |
13697 | 180 |
AC_SUBST(BUILD_CC) |
181 |
AC_SUBST(BUILD_CXX) |
|
182 |
AC_SUBST(BUILD_LD) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
183 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
184 |
# 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
|
185 |
# 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
|
186 |
# will be found by AC_PROG_CC et al. |
13697 | 187 |
DEVKIT= |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
188 |
BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx, |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
189 |
[# Found devkit |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
190 |
PATH="$DEVKIT/bin:$PATH" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
191 |
SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
192 |
if test "x$x_includes" = "xNONE"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
193 |
x_includes="$SYS_ROOT/usr/include/X11" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
194 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
195 |
if test "x$x_libraries" = "xNONE"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
196 |
x_libraries="$SYS_ROOT/usr/lib" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
197 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
198 |
], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
199 |
[]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
200 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
201 |
if test "x$SYS_ROOT" != "x/" ; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
202 |
CFLAGS="--sysroot=$SYS_ROOT $CFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
203 |
CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
204 |
OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
205 |
OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
206 |
CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
207 |
LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
208 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
209 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
210 |
# Store the CFLAGS etal passed to the configure script. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
211 |
ORG_CFLAGS="$CFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
212 |
ORG_CXXFLAGS="$CXXFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
213 |
ORG_OBJCFLAGS="$OBJCFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
214 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
215 |
# 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
|
216 |
OLD_PATH="$PATH" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
217 |
if test "x$TOOLS_DIR" != x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
218 |
PATH=$TOOLS_DIR:$PATH |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
219 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
220 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
221 |
# gcc is almost always present, but on Windows we |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
222 |
# prefer cl.exe and on Solaris we prefer CC. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
223 |
# Thus test for them in this order. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
224 |
AC_PROG_CC([cl cc gcc]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
225 |
if test "x$CC" = x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
226 |
HELP_MSG_MISSING_DEPENDENCY([devkit]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
227 |
AC_MSG_ERROR([Could not find a compiler. $HELP_MSG]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
228 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
229 |
if test "x$CC" = xcc && test "x$OPENJDK_BUILD_OS" = xmacosx; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
230 |
# Do not use cc on MacOSX use gcc instead. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
231 |
CC="gcc" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
232 |
fi |
13697 | 233 |
SET_FULL_PATH(CC) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
234 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
235 |
AC_PROG_CXX([cl CC g++]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
236 |
if test "x$CXX" = xCC && test "x$OPENJDK_BUILD_OS" = xmacosx; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
237 |
# The found CC, even though it seems to be a g++ derivate, cannot compile |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
238 |
# c++ code. Override. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
239 |
CXX="g++" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
240 |
fi |
13697 | 241 |
SET_FULL_PATH(CXX) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
242 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
243 |
if test "x$CXX" = x || test "x$CC" = x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
244 |
HELP_MSG_MISSING_DEPENDENCY([devkit]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
245 |
AC_MSG_ERROR([Could not find the needed compilers! $HELP_MSG ]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
246 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
247 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
248 |
if test "x$OPENJDK_BUILD_OS" != xwindows; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
249 |
AC_PROG_OBJC |
13697 | 250 |
SET_FULL_PATH(OBJC) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
251 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
252 |
OBJC= |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
253 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
254 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
255 |
# Restore the flags to the user specified values. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
256 |
# 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
|
257 |
CFLAGS="$ORG_CFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
258 |
CXXFLAGS="$ORG_CXXFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
259 |
OBJCFLAGS="$ORG_OBJCFLAGS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
260 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
261 |
LD="$CC" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
262 |
LDEXE="$CC" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
263 |
LDCXX="$CXX" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
264 |
LDEXECXX="$CXX" |
13697 | 265 |
AC_SUBST(LD) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
266 |
# LDEXE is the linker to use, when creating executables. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
267 |
AC_SUBST(LDEXE) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
268 |
# Linking C++ libraries. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
269 |
AC_SUBST(LDCXX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
270 |
# Linking C++ executables. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
271 |
AC_SUBST(LDEXECXX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
272 |
|
13697 | 273 |
if test "x$OPENJDK_BUILD_OS" != xwindows; then |
274 |
AC_CHECK_TOOL(AR, ar) |
|
275 |
SET_FULL_PATH(AR) |
|
276 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
277 |
if test "x$OPENJDK_BUILD_OS" = xmacosx; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
278 |
ARFLAGS="-r" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
279 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
280 |
ARFLAGS="" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
281 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
282 |
AC_SUBST(ARFLAGS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
283 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
284 |
COMPILER_NAME=gcc |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
285 |
COMPILER_TYPE=CC |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
286 |
AS_IF([test "x$OPENJDK_BUILD_OS" = xwindows], [ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
287 |
# For now, assume that we are always compiling using cl.exe. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
288 |
CC_OUT_OPTION=-Fo |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
289 |
EXE_OUT_OPTION=-out: |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
290 |
LD_OUT_OPTION=-out: |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
291 |
AR_OUT_OPTION=-out: |
13697 | 292 |
# 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
|
293 |
# program for something completely different. |
13697 | 294 |
AC_CHECK_PROG([WINLD], [link],[link],,, [$CYGWIN_LINK]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
295 |
# 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
|
296 |
# the full path to the link.exe program. |
13697 | 297 |
SET_FULL_PATH_SPACESAFE([WINLD]) |
298 |
printf "Windows linker was found at $WINLD\n" |
|
299 |
AC_MSG_CHECKING([if the found link.exe is actually the Visual Studio linker]) |
|
300 |
"$WINLD" --version > /dev/null |
|
301 |
if test $? -eq 0 ; then |
|
302 |
AC_MSG_RESULT([no]) |
|
303 |
AC_MSG_ERROR([This is the Cygwin link tool. Please check your PATH and rerun configure.]) |
|
304 |
else |
|
305 |
AC_MSG_RESULT([yes]) |
|
306 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
307 |
LD="$WINLD" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
308 |
LDEXE="$WINLD" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
309 |
LDCXX="$WINLD" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
310 |
LDEXECXX="$WINLD" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
311 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
312 |
AC_CHECK_PROG([MT], [mt], [mt],,, [/usr/bin/mt]) |
13697 | 313 |
SET_FULL_PATH_SPACESAFE([MT]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
314 |
# The resource compiler |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
315 |
AC_CHECK_PROG([RC], [rc], [rc],,, [/usr/bin/rc]) |
13697 | 316 |
SET_FULL_PATH_SPACESAFE([RC]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
317 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
318 |
RC_FLAGS="-nologo /l 0x409 /r" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
319 |
AS_IF([test "x$VARIANT" = xOPT], [ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
320 |
RC_FLAGS="$RC_FLAGS -d NDEBUG" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
321 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
322 |
JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
323 |
AS_IF([test "x$JDK_UPDATE_VERSION" = x], [ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
324 |
JDK_UPDATE_VERSION_NOTNULL=0 |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
325 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
326 |
RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\"" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
327 |
RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\"" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
328 |
RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\"" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
329 |
RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\"" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
330 |
RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\"" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
331 |
RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\"" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
332 |
RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\"" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
333 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
334 |
# lib.exe is used to create static libraries. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
335 |
AC_CHECK_PROG([WINAR], [lib],[lib],,,) |
13697 | 336 |
SET_FULL_PATH_SPACESAFE([WINAR]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
337 |
AR="$WINAR" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
338 |
ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
339 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
340 |
AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,) |
13697 | 341 |
SET_FULL_PATH_SPACESAFE([DUMPBIN]) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
342 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
343 |
COMPILER_TYPE=CL |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
344 |
CCXXFLAGS="$CCXXFLAGS -nologo" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
345 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
346 |
AC_SUBST(RC_FLAGS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
347 |
AC_SUBST(COMPILER_TYPE) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
348 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
349 |
AC_PROG_CPP |
13697 | 350 |
SET_FULL_PATH(CPP) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
351 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
352 |
AC_PROG_CXXCPP |
13697 | 353 |
SET_FULL_PATH(CXXCPP) |
354 |
||
355 |
if test "x$COMPILE_TYPE" != "xcross"; then |
|
356 |
# If we are not cross compiling, use the same compilers for |
|
357 |
# building the build platform executables. The cross-compilation |
|
358 |
# case needed to be done earlier, but this can only be done after |
|
359 |
# the native tools have been localized. |
|
360 |
BUILD_CC="$CC" |
|
361 |
BUILD_CXX="$CXX" |
|
362 |
BUILD_LD="$LD" |
|
363 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
364 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
365 |
# 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
|
366 |
# 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
|
367 |
# starting to probe |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
368 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
369 |
# 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
|
370 |
# so that it can be overriden --with-tools-dir |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
371 |
if test "x$OPENJDK_BUILD_OS" = xsolaris; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
372 |
PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
373 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
374 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
375 |
# Find the right assembler. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
376 |
if test "x$OPENJDK_BUILD_OS" = xsolaris; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
377 |
AC_PATH_PROG(AS, as) |
13697 | 378 |
SET_FULL_PATH(AS) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
379 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
380 |
AS="$CC -c" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
381 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
382 |
AC_SUBST(AS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
383 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
384 |
if test "x$OPENJDK_BUILD_OS" = xsolaris; then |
13697 | 385 |
AC_PATH_PROGS(NM, [gnm nm]) |
386 |
SET_FULL_PATH(NM) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
387 |
AC_PATH_PROG(STRIP, strip) |
13697 | 388 |
SET_FULL_PATH(STRIP) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
389 |
AC_PATH_PROG(MCS, mcs) |
13697 | 390 |
SET_FULL_PATH(MCS) |
391 |
elif test "x$OPENJDK_BUILD_OS" != xwindows; then |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
392 |
AC_CHECK_TOOL(NM, nm) |
13697 | 393 |
SET_FULL_PATH(NM) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
394 |
AC_CHECK_TOOL(STRIP, strip) |
13697 | 395 |
SET_FULL_PATH(STRIP) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
396 |
fi |
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 |
### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
399 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
400 |
# Check for objcopy |
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 |
# but search for gobjcopy first... |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
403 |
# since I on solaris found a broken objcopy...buhh |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
404 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
405 |
AC_PATH_TOOL(OBJCOPY, gobjcopy) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
406 |
if test "x$OBJCOPY" = x; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
407 |
AC_PATH_TOOL(OBJCOPY, objcopy) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
408 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
409 |
|
13697 | 410 |
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then |
411 |
AC_PATH_PROG(LIPO, lipo) |
|
412 |
SET_FULL_PATH(LIPO) |
|
413 |
fi |
|
414 |
||
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
415 |
# Restore old path without tools dir |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
416 |
PATH="$OLD_PATH" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
417 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
418 |
|
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 |
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
421 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
422 |
|
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 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
425 |
# How to compile shared libraries. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
426 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
427 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
428 |
if test "x$GCC" = xyes; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
429 |
COMPILER_NAME=gcc |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
430 |
PICFLAG="-fPIC" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
431 |
LIBRARY_PREFIX=lib |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
432 |
SHARED_LIBRARY='lib[$]1.so' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
433 |
STATIC_LIBRARY='lib[$]1.a' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
434 |
SHARED_LIBRARY_FLAGS="-shared" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
435 |
SHARED_LIBRARY_SUFFIX='.so' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
436 |
STATIC_LIBRARY_SUFFIX='.a' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
437 |
OBJ_SUFFIX='.o' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
438 |
EXE_SUFFIX='' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
439 |
SET_SHARED_LIBRARY_NAME='-Xlinker -soname=[$]1' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
440 |
SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=[$]1' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
441 |
C_FLAG_REORDER='' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
442 |
CXX_FLAG_REORDER='' |
13697 | 443 |
SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN[$]1' |
444 |
SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN[$]1' |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
445 |
LD="$CC" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
446 |
LDEXE="$CC" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
447 |
LDCXX="$CXX" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
448 |
LDEXECXX="$CXX" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
449 |
POST_STRIP_CMD="$STRIP -g" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
450 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
451 |
# Linking is different on MacOSX |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
452 |
if test "x$OPENJDK_BUILD_OS" = xmacosx; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
453 |
# Might change in the future to clang. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
454 |
COMPILER_NAME=gcc |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
455 |
SHARED_LIBRARY='lib[$]1.dylib' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
456 |
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
|
457 |
SHARED_LIBRARY_SUFFIX='.dylib' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
458 |
EXE_SUFFIX='' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
459 |
SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
460 |
SET_SHARED_LIBRARY_MAPFILE='' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
461 |
SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.' |
13697 | 462 |
SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
463 |
POST_STRIP_CMD="$STRIP -S" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
464 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
465 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
466 |
if test "x$OPENJDK_BUILD_OS" = xsolaris; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
467 |
# 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
|
468 |
COMPILER_NAME=ossc |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
469 |
PICFLAG="-KPIC" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
470 |
LIBRARY_PREFIX=lib |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
471 |
SHARED_LIBRARY='lib[$]1.so' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
472 |
STATIC_LIBRARY='lib[$]1.a' |
13697 | 473 |
SHARED_LIBRARY_FLAGS="-G" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
474 |
SHARED_LIBRARY_SUFFIX='.so' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
475 |
STATIC_LIBRARY_SUFFIX='.a' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
476 |
OBJ_SUFFIX='.o' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
477 |
EXE_SUFFIX='' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
478 |
SET_SHARED_LIBRARY_NAME='' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
479 |
SET_SHARED_LIBRARY_MAPFILE='-M[$]1' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
480 |
C_FLAG_REORDER='-xF' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
481 |
CXX_FLAG_REORDER='-xF' |
13697 | 482 |
SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN[$]1' |
483 |
SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
484 |
CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
485 |
CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
486 |
CFLAGS_JDKLIB_EXTRA='-xstrconst' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
487 |
POST_STRIP_CMD="$STRIP -x" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
488 |
POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\"" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
489 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
490 |
if test "x$OPENJDK_BUILD_OS" = xwindows; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
491 |
# 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
|
492 |
COMPILER_NAME=cl |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
493 |
PICFLAG="" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
494 |
LIBRARY_PREFIX= |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
495 |
SHARED_LIBRARY='[$]1.dll' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
496 |
STATIC_LIBRARY='[$]1.lib' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
497 |
SHARED_LIBRARY_FLAGS="-LD" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
498 |
SHARED_LIBRARY_SUFFIX='.dll' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
499 |
STATIC_LIBRARY_SUFFIX='.lib' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
500 |
OBJ_SUFFIX='.obj' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
501 |
EXE_SUFFIX='.exe' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
502 |
SET_SHARED_LIBRARY_NAME='' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
503 |
SET_SHARED_LIBRARY_MAPFILE='' |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
504 |
SET_SHARED_LIBRARY_ORIGIN='' |
13697 | 505 |
SET_EXECUTABLE_ORIGIN='' |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
506 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
507 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
508 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
509 |
AC_SUBST(OBJ_SUFFIX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
510 |
AC_SUBST(SHARED_LIBRARY) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
511 |
AC_SUBST(STATIC_LIBRARY) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
512 |
AC_SUBST(LIBRARY_PREFIX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
513 |
AC_SUBST(SHARED_LIBRARY_SUFFIX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
514 |
AC_SUBST(STATIC_LIBRARY_SUFFIX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
515 |
AC_SUBST(EXE_SUFFIX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
516 |
AC_SUBST(SHARED_LIBRARY_FLAGS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
517 |
AC_SUBST(SET_SHARED_LIBRARY_NAME) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
518 |
AC_SUBST(SET_SHARED_LIBRARY_MAPFILE) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
519 |
AC_SUBST(C_FLAG_REORDER) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
520 |
AC_SUBST(CXX_FLAG_REORDER) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
521 |
AC_SUBST(SET_SHARED_LIBRARY_ORIGIN) |
13697 | 522 |
AC_SUBST(SET_EXECUTABLE_ORIGIN) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
523 |
AC_SUBST(POST_STRIP_CMD) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
524 |
AC_SUBST(POST_MCS_CMD) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
525 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
526 |
# 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
|
527 |
# of the target platform. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
528 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
529 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
530 |
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
531 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
532 |
|
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 |
# Setup the opt flags for different compilers |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
536 |
# and different operating systems. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
537 |
# |
13697 | 538 |
|
539 |
# |
|
540 |
# NOTE: check for -mstackrealign needs to be below potential addition of -m32 |
|
541 |
# |
|
542 |
if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then |
|
543 |
# On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned. |
|
544 |
# While waiting for a better solution, the current workaround is to use -mstackrealign. |
|
545 |
CFLAGS="$CFLAGS -mstackrealign" |
|
546 |
AC_MSG_CHECKING([if 32-bit compiler supports -mstackrealign]) |
|
547 |
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])], |
|
548 |
[ |
|
549 |
AC_MSG_RESULT([yes]) |
|
550 |
], |
|
551 |
[ |
|
552 |
AC_MSG_RESULT([no]) |
|
553 |
AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.]) |
|
554 |
]) |
|
555 |
fi |
|
556 |
||
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
557 |
C_FLAG_DEPS="-MMD -MF" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
558 |
CXX_FLAG_DEPS="-MMD -MF" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
559 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
560 |
case $COMPILER_TYPE in |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
561 |
CC ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
562 |
D_FLAG="-g" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
563 |
case $COMPILER_NAME in |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
564 |
gcc ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
565 |
case $OPENJDK_TARGET_OS in |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
566 |
macosx ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
567 |
# On MacOSX we optimize for size, something |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
568 |
# we should do for all platforms? |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
569 |
C_O_FLAG_HI="-Os" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
570 |
C_O_FLAG_NORM="-Os" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
571 |
C_O_FLAG_NONE="" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
572 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
573 |
*) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
574 |
C_O_FLAG_HI="-O3" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
575 |
C_O_FLAG_NORM="-O2" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
576 |
C_O_FLAG_NONE="-O0" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
577 |
CFLAGS_DEBUG_SYMBOLS="-g" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
578 |
CXXFLAGS_DEBUG_SYMBOLS="-g" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
579 |
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
580 |
CFLAGS_DEBUG_SYMBOLS="-g1" |
13697 | 581 |
CXXFLAGS_DEBUG_SYMBOLS="-g1" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
582 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
583 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
584 |
esac |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
585 |
CXX_O_FLAG_HI="$C_O_FLAG_HI" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
586 |
CXX_O_FLAG_NORM="$C_O_FLAG_NORM" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
587 |
CXX_O_FLAG_NONE="$C_O_FLAG_NONE" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
588 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
589 |
ossc ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
590 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
591 |
# Forte has different names for this with their C++ compiler... |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
592 |
# |
13697 | 593 |
C_FLAG_DEPS="-xMMD -xMF" |
594 |
CXX_FLAG_DEPS="-xMMD -xMF" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
595 |
|
13697 | 596 |
# Extra options used with HIGHEST |
597 |
# |
|
598 |
# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be |
|
599 |
# done with care, there are some assumptions below that need to |
|
600 |
# be understood about the use of pointers, and IEEE behavior. |
|
601 |
# |
|
602 |
# Use non-standard floating point mode (not IEEE 754) |
|
603 |
CC_HIGHEST="$CC_HIGHEST -fns" |
|
604 |
# Do some simplification of floating point arithmetic (not IEEE 754) |
|
605 |
CC_HIGHEST="$CC_HIGHEST -fsimple" |
|
606 |
# Use single precision floating point with 'float' |
|
607 |
CC_HIGHEST="$CC_HIGHEST -fsingle" |
|
608 |
# Assume memory references via basic pointer types do not alias |
|
609 |
# (Source with excessing pointer casting and data access with mixed |
|
610 |
# pointer types are not recommended) |
|
611 |
CC_HIGHEST="$CC_HIGHEST -xalias_level=basic" |
|
612 |
# Use intrinsic or inline versions for math/std functions |
|
613 |
# (If you expect perfect errno behavior, do not use this) |
|
614 |
CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all" |
|
615 |
# Loop data dependency optimizations (need -xO3 or higher) |
|
616 |
CC_HIGHEST="$CC_HIGHEST -xdepend" |
|
617 |
# Pointer parameters to functions do not overlap |
|
618 |
# (Similar to -xalias_level=basic usage, but less obvious sometimes. |
|
619 |
# If you pass in multiple pointers to the same data, do not use this) |
|
620 |
CC_HIGHEST="$CC_HIGHEST -xrestrict" |
|
621 |
# Inline some library routines |
|
622 |
# (If you expect perfect errno behavior, do not use this) |
|
623 |
CC_HIGHEST="$CC_HIGHEST -xlibmil" |
|
624 |
# Use optimized math routines |
|
625 |
# (If you expect perfect errno behavior, do not use this) |
|
626 |
# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now |
|
627 |
#CC_HIGHEST="$CC_HIGHEST -xlibmopt" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
628 |
|
13697 | 629 |
case $OPENJDK_TARGET_CPU_ARCH in |
630 |
x86) |
|
631 |
C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr" |
|
632 |
C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr" |
|
633 |
C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr" |
|
634 |
C_O_FLAG_NONE="-xregs=no%frameptr" |
|
635 |
CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr" |
|
636 |
CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr" |
|
637 |
CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr" |
|
638 |
CXX_O_FLAG_NONE="-xregs=no%frameptr" |
|
639 |
if test "x$OPENJDK_TARGET_CPU" = xx86; then |
|
640 |
C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium" |
|
641 |
CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium" |
|
642 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
643 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
644 |
sparc) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
645 |
CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
646 |
CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
647 |
CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
648 |
CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
649 |
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
|
650 |
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
|
651 |
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
|
652 |
C_O_FLAG_NONE="" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
653 |
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
|
654 |
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
|
655 |
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
|
656 |
CXX_O_FLAG_NONE="" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
657 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
658 |
esac |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
659 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
660 |
CFLAGS_DEBUG_SYMBOLS="-g -xs" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
661 |
CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
662 |
esac |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
663 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
664 |
CL ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
665 |
D_FLAG= |
13697 | 666 |
C_O_FLAG_HIGHEST="-O2" |
667 |
C_O_FLAG_HI="-O1" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
668 |
C_O_FLAG_NORM="-O1" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
669 |
C_O_FLAG_NONE="-Od" |
13697 | 670 |
CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST" |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
671 |
CXX_O_FLAG_HI="$C_O_FLAG_HI" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
672 |
CXX_O_FLAG_NORM="$C_O_FLAG_NORM" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
673 |
CXX_O_FLAG_NONE="$C_O_FLAG_NONE" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
674 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
675 |
esac |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
676 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
677 |
if test -z "$C_O_FLAG_HIGHEST"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
678 |
C_O_FLAG_HIGHEST="$C_O_FLAG_HI" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
679 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
680 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
681 |
if test -z "$CXX_O_FLAG_HIGHEST"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
682 |
CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
683 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
684 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
685 |
AC_SUBST(C_O_FLAG_HIGHEST) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
686 |
AC_SUBST(C_O_FLAG_HI) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
687 |
AC_SUBST(C_O_FLAG_NORM) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
688 |
AC_SUBST(C_O_FLAG_NONE) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
689 |
AC_SUBST(CXX_O_FLAG_HIGHEST) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
690 |
AC_SUBST(CXX_O_FLAG_HI) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
691 |
AC_SUBST(CXX_O_FLAG_NORM) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
692 |
AC_SUBST(CXX_O_FLAG_NONE) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
693 |
AC_SUBST(C_FLAG_DEPS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
694 |
AC_SUBST(CXX_FLAG_DEPS) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
695 |
]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
696 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
697 |
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK], |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
698 |
[ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
699 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
700 |
if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then |
13697 | 701 |
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
|
702 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
703 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
704 |
if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then |
13697 | 705 |
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
|
706 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
707 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
708 |
if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then |
13697 | 709 |
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
|
710 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
711 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
712 |
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
|
713 |
[extra flags to be used when compiling jdk c-files])]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
714 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
715 |
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
|
716 |
[extra flags to be used when compiling jdk c++-files])]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
717 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
718 |
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
|
719 |
[extra flags to be used when linking jdk])]) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
720 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
721 |
CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
722 |
CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
723 |
LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
724 |
|
13697 | 725 |
# Hotspot needs these set in their legacy form |
726 |
LEGACY_EXTRA_CFLAGS=$with_extra_cflags |
|
727 |
LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags |
|
728 |
LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags |
|
729 |
||
730 |
AC_SUBST(LEGACY_EXTRA_CFLAGS) |
|
731 |
AC_SUBST(LEGACY_EXTRA_CXXFLAGS) |
|
732 |
AC_SUBST(LEGACY_EXTRA_LDFLAGS) |
|
733 |
||
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
734 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
735 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
736 |
# Now setup the CFLAGS and LDFLAGS for the JDK build. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
737 |
# 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
|
738 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
739 |
case $COMPILER_NAME in |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
740 |
gcc ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
741 |
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
|
742 |
-pipe \ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
743 |
-D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
744 |
case $OPENJDK_TARGET_CPU_ARCH in |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
745 |
arm ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
746 |
# 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
|
747 |
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
748 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
749 |
ppc ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
750 |
# 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
|
751 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
752 |
* ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
753 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
754 |
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
755 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
756 |
esac |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
757 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
758 |
ossc ) |
13697 | 759 |
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS" |
760 |
case $OPENJDK_TARGET_CPU_ARCH in |
|
761 |
x86 ) |
|
762 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -Di386" |
|
763 |
CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE" |
|
764 |
;; |
|
765 |
esac |
|
766 |
||
767 |
CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal" |
|
768 |
CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib" |
|
769 |
||
770 |
LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext" |
|
771 |
LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
772 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
773 |
cl ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
774 |
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
|
775 |
-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
|
776 |
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
777 |
-DWIN32 -DIAL" |
13697 | 778 |
case $OPENJDK_TARGET_CPU in |
779 |
x86 ) |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
780 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
781 |
;; |
13697 | 782 |
x86_64 ) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
783 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64" |
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 |
esac |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
786 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
787 |
esac |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
788 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
789 |
############################################################################### |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
790 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
791 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
792 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
793 |
# The package path is used only on macosx? |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
794 |
PACKAGE_PATH=/opt/local |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
795 |
AC_SUBST(PACKAGE_PATH) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
796 |
|
13697 | 797 |
if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then |
798 |
# The macro _LITTLE_ENDIAN needs to be defined the same to avoid the |
|
799 |
# Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN |
|
800 |
# (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h). |
|
801 |
# Note: -Dmacro is the same as #define macro 1 |
|
802 |
# -Dmacro= is the same as #define macro |
|
803 |
if test "x$OPENJDK_TARGET_OS" = xsolaris; then |
|
804 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN=" |
|
805 |
else |
|
806 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN" |
|
807 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
808 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
809 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
810 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
811 |
if test "x$OPENJDK_TARGET_OS" = xlinux; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
812 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
813 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
814 |
if test "x$OPENJDK_TARGET_OS" = xwindows; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
815 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
816 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
817 |
if test "x$OPENJDK_TARGET_OS" = xsolaris; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
818 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
819 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
820 |
if test "x$OPENJDK_TARGET_OS" = xmacosx; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
821 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
822 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
823 |
if test "x$OPENJDK_TARGET_OS" = xbsd; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
824 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
825 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
826 |
if test "x$DEBUG_LEVEL" = xrelease; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
827 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG" |
13697 | 828 |
if test "x$OPENJDK_TARGET_OS" = xsolaris; then |
829 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED" |
|
830 |
fi |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
831 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
832 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
833 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
834 |
|
13697 | 835 |
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
|
836 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
837 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
838 |
CCXXFLAGS_JDK="$CCXXFLAGS_JDK \ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
839 |
-I${JDK_OUTPUTDIR}/include \ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
840 |
-I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \ |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
841 |
-I${JDK_TOPDIR}/src/share/javavm/export \ |
13697 | 842 |
-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
|
843 |
-I${JDK_TOPDIR}/src/share/native/common \ |
13697 | 844 |
-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
|
845 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
846 |
# The shared libraries are compiled using the picflag. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
847 |
CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
848 |
CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA " |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
849 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
850 |
# Executable flags |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
851 |
CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
852 |
CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK" |
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 |
# 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
|
855 |
# 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
|
856 |
# 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
|
857 |
# 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
|
858 |
# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
859 |
# libraries will link to whatever is in memory. Yuck. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
860 |
# |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
861 |
# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
862 |
if test "x$COMPILER_TYPE" = xCL; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
863 |
LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no" |
13697 | 864 |
if test "x$OPENJDK_TARGET_CPU" = xx86; then |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
865 |
LDFLAGS_JDK="$LDFLAGS_JDK -safeseh" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
866 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
867 |
# TODO: make -debug optional "--disable-full-debug-symbols" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
868 |
LDFLAGS_JDK="$LDFLAGS_JDK -debug" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
869 |
LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
870 |
LDFLAGS_JDKLIB_SUFFIX="" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
871 |
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
872 |
LDFLAGS_STACK_SIZE=1048576 |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
873 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
874 |
LDFLAGS_STACK_SIZE=327680 |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
875 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
876 |
LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
877 |
else |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
878 |
# If this is a --hash-style=gnu system, use --hash-style=both, why? |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
879 |
HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'` |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
880 |
if test -n "$HAS_GNU_HASH"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
881 |
# And since we now know that the linker is gnu, then add -z defs, to forbid |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
882 |
# undefined symbols in object files. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
883 |
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both -Xlinker -z -Xlinker defs" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
884 |
if test "x$DEBUG_LEVEL" == "xrelease"; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
885 |
# When building release libraries, tell the linker optimize them. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
886 |
# Should this be supplied to the OSS linker as well? |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
887 |
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
888 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
889 |
fi |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
890 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
891 |
LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \ |
13697 | 892 |
-L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server \ |
893 |
-L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client \ |
|
894 |
-L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}" |
|
895 |
||
896 |
LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
897 |
if test "x$COMPILER_NAME" = xossc; then |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
898 |
LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc" |
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 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
901 |
LDFLAGS_JDKEXE="${LDFLAGS_JDK}" |
13697 | 902 |
if test "x$OPENJDK_TARGET_OS" = xlinux; then |
903 |
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined" |
|
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
904 |
fi |
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 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
907 |
# Adjust flags according to debug level. |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
908 |
case $DEBUG_LEVEL in |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
909 |
fastdebug ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
910 |
CFLAGS="$CFLAGS $D_FLAG" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
911 |
JAVAC_FLAGS="$JAVAC_FLAGS -g" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
912 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
913 |
slowdebug ) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
914 |
CFLAGS="$CFLAGS $D_FLAG" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
915 |
C_O_FLAG_HI="$C_O_FLAG_NONE" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
916 |
C_O_FLAG_NORM="$C_O_FLAG_NONE" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
917 |
CXX_O_FLAG_HI="$CXX_O_FLAG_NONE" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
918 |
CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
919 |
JAVAC_FLAGS="$JAVAC_FLAGS -g" |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
920 |
;; |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
921 |
esac |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
922 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
923 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
924 |
AC_SUBST(CFLAGS_JDKLIB) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
925 |
AC_SUBST(CFLAGS_JDKEXE) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
926 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
927 |
AC_SUBST(CXXFLAGS_JDKLIB) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
928 |
AC_SUBST(CXXFLAGS_JDKEXE) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
929 |
|
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
930 |
AC_SUBST(LDFLAGS_JDKLIB) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
931 |
AC_SUBST(LDFLAGS_JDKEXE) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
932 |
AC_SUBST(LDFLAGS_JDKLIB_SUFFIX) |
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
933 |
AC_SUBST(LDFLAGS_JDKEXE_SUFFIX) |
13697 | 934 |
AC_SUBST(LDFLAGS_CXX_JDK) |
13133
701e61c32ece
7182051: Update of latest build-infra Makefiles (missing files)
erikj
parents:
diff
changeset
|
935 |
]) |