toolchain.m4 revision 476:2ba6f4da4bf3
1# 2# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4# 5# This code is free software; you can redistribute it and/or modify it 6# under the terms of the GNU General Public License version 2 only, as 7# published by the Free Software Foundation. Oracle designates this 8# particular file as subject to the "Classpath" exception as provided 9# by Oracle in the LICENSE file that accompanied this code. 10# 11# This code is distributed in the hope that it will be useful, but WITHOUT 12# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14# version 2 for more details (a copy is included in the LICENSE file that 15# accompanied this code). 16# 17# You should have received a copy of the GNU General Public License version 18# 2 along with this work; if not, write to the Free Software Foundation, 19# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20# 21# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22# or visit www.oracle.com if you need additional information or have any 23# questions. 24# 25 26AC_DEFUN_ONCE([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV], 27[ 28 29# Check if the VS env variables were setup prior to running configure. 30# If not, then find vcvarsall.bat and run it automatically, and integrate 31# the set env variables into the spec file. 32SETUPDEVENV="# No special vars" 33if test "x$OPENJDK_BUILD_OS" = "xwindows"; then 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 47 # If vcvarsall.bat has been run, then VCINSTALLDIR is set. 48 if test "x$VCINSTALLDIR" != x; then 49 # No further setup is needed. The build will happen from this kind 50 # of shell. 51 SETUPDEVENV="# This spec file expects that you are running bash from within a VS command prompt." 52 # Make sure to remind you, if you forget to run make from a cygwin bash shell 53 # that is spawned "bash -l" from a VS command prompt. 54 CHECK_FOR_VCINSTALLDIR=yes 55 AC_MSG_CHECKING([if you are running from within a VS command prompt]) 56 AC_MSG_RESULT([yes]) 57 else 58 # Ah, we have not yet run vcvarsall.bat/vsvars32.bat/vsvars64.bat. Lets do that. First find it. 59 if test "x$VS100COMNTOOLS" != x; then 60 VARSBAT=`find "$VS100COMNTOOLS/../.." -name vcvarsall.bat` 61 SEARCH_ROOT="$VS100COMNTOOLS" 62 else 63 VARSBAT=`find "$PROGRAMFILES" -name vcvarsall.bat` 64 SEARCH_ROOT="$PROGRAMFILES" 65 fi 66 VCPATH=`dirname "$VARSBAT"` 67 VCPATH=`cygpath -w "$VCPATH"` 68 if test "x$VARSBAT" = x || test ! -d "$VCPATH"; then 69 AC_MSG_CHECKING([if we can find the VS installation]) 70 AC_MSG_RESULT([no]) 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.]) 72 fi 73 case "$OPENJDK_TARGET_CPU" in 74 x86) 75 VARSBAT_ARCH=x86 76 ;; 77 x86_64) 78 VARSBAT_ARCH=amd64 79 ;; 80 esac 81 # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat 82 cd $OUTPUT_ROOT 83 bash $SRC_ROOT/common/bin/extractvcvars.sh "$VARSBAT" "$VARSBAT_ARCH" 84 cd $CURDIR 85 if test ! -s $OUTPUT_ROOT/localdevenv.sh || test ! -s $OUTPUT_ROOT/localdevenv.gmk; then 86 AC_MSG_CHECKING([if we can extract the needed env variables]) 87 AC_MSG_RESULT([no]) 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.]) 89 fi 90 # Now set all paths and other env variables. This will allow the rest of 91 # the configure script to find and run the compiler in the proper way. 92 . $OUTPUT_ROOT/localdevenv.sh 93 AC_MSG_CHECKING([if we can find the VS installation]) 94 if test "x$VCINSTALLDIR" != x; then 95 AC_MSG_RESULT([$VCINSTALLDIR]) 96 else 97 AC_MSG_RESULT([no]) 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.]) 99 fi 100 CHECK_FOR_VCINSTALLDIR=no 101 SETUPDEVENV="include $OUTPUT_ROOT/localdevenv.gmk" 102 103 AC_MSG_CHECKING([for msvcr100.dll]) 104 AC_ARG_WITH(msvcr100dll, [AS_HELP_STRING([--with-msvcr100dll], 105 [copy this msvcr100.dll into the built JDK])]) 106 if test "x$with_msvcr100dll" != x; then 107 MSVCR100DLL="$with_msvcr100dll" 108 else 109 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then 110 MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x64 | head --lines 1` 111 else 112 MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1` 113 if test "x$MSVCR100DLL" = x; then 114 MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | head --lines 1` 115 fi 116 fi 117 fi 118 if test "x$MSVCR100DLL" = x; then 119 AC_MSG_RESULT([no]) 120 AC_MSG_ERROR([Could not find msvcr100.dll !]) 121 fi 122 AC_MSG_RESULT([$MSVCR100DLL]) 123 SPACESAFE(MSVCR100DLL,[the path to msvcr100.dll]) 124 fi 125fi 126AC_SUBST(SETUPDEVENV) 127AC_SUBST(CHECK_FOR_VCINSTALLDIR) 128AC_SUBST(MSVCR100DLL) 129]) 130 131AC_DEFUN_ONCE([TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS], 132[ 133############################################################################### 134# 135# Configure the development tool paths and potential sysroot. 136# 137AC_LANG(C++) 138 139# The option used to specify the target .o,.a or .so file. 140# When compiling, how to specify the to be created object file. 141CC_OUT_OPTION='-o$(SPACE)' 142# When linking, how to specify the to be created executable. 143EXE_OUT_OPTION='-o$(SPACE)' 144# When linking, how to specify the to be created dynamically linkable library. 145LD_OUT_OPTION='-o$(SPACE)' 146# When archiving, how to specify the to be create static archive for object files. 147AR_OUT_OPTION='rcs$(SPACE)' 148AC_SUBST(CC_OUT_OPTION) 149AC_SUBST(EXE_OUT_OPTION) 150AC_SUBST(LD_OUT_OPTION) 151AC_SUBST(AR_OUT_OPTION) 152]) 153 154AC_DEFUN_ONCE([TOOLCHAIN_SETUP_PATHS], 155[ 156# If --build AND --host is set, then the configure script will find any 157# cross compilation tools in the PATH. Cross compilation tools 158# follows the cross compilation standard where they are prefixed with ${host}. 159# For example the binary i686-sun-solaris2.10-gcc 160# will cross compile for i686-sun-solaris2.10 161# If neither of build and host is not set, then build=host and the 162# default compiler found in the path will be used. 163# Setting only --host, does not seem to be really supported. 164# Please set both --build and --host if you want to cross compile. 165 166if test "x$COMPILE_TYPE" = "xcross"; then 167 # Now we to find a C/C++ compiler that can build executables for the build 168 # platform. We can't use the AC_PROG_CC macro, since it can only be used 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) 179fi 180AC_SUBST(BUILD_CC) 181AC_SUBST(BUILD_CXX) 182AC_SUBST(BUILD_LD) 183 184# If a devkit is found on the builddeps server, then prepend its path to the 185# PATH variable. If there are cross compilers available in the devkit, these 186# will be found by AC_PROG_CC et al. 187DEVKIT= 188BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx, 189 [# Found devkit 190 PATH="$DEVKIT/bin:$PATH" 191 SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root" 192 if test "x$x_includes" = "xNONE"; then 193 x_includes="$SYS_ROOT/usr/include/X11" 194 fi 195 if test "x$x_libraries" = "xNONE"; then 196 x_libraries="$SYS_ROOT/usr/lib" 197 fi 198 ], 199 []) 200 201if test "x$SYS_ROOT" != "x/" ; then 202 CFLAGS="--sysroot=$SYS_ROOT $CFLAGS" 203 CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS" 204 OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 205 OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 206 CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS" 207 LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS" 208fi 209 210# Store the CFLAGS etal passed to the configure script. 211ORG_CFLAGS="$CFLAGS" 212ORG_CXXFLAGS="$CXXFLAGS" 213ORG_OBJCFLAGS="$OBJCFLAGS" 214 215# autoconf magic only relies on PATH, so update it if tools dir is specified 216OLD_PATH="$PATH" 217if test "x$TOOLS_DIR" != x; then 218 PATH=$TOOLS_DIR:$PATH 219fi 220 221# gcc is almost always present, but on Windows we 222# prefer cl.exe and on Solaris we prefer CC. 223# Thus test for them in this order. 224AC_PROG_CC([cl cc gcc]) 225if test "x$CC" = x; then 226 HELP_MSG_MISSING_DEPENDENCY([devkit]) 227 AC_MSG_ERROR([Could not find a compiler. $HELP_MSG]) 228fi 229if test "x$CC" = xcc && test "x$OPENJDK_BUILD_OS" = xmacosx; then 230 # Do not use cc on MacOSX use gcc instead. 231 CC="gcc" 232fi 233SET_FULL_PATH(CC) 234 235AC_PROG_CXX([cl CC g++]) 236if test "x$CXX" = xCC && test "x$OPENJDK_BUILD_OS" = xmacosx; then 237 # The found CC, even though it seems to be a g++ derivate, cannot compile 238 # c++ code. Override. 239 CXX="g++" 240fi 241SET_FULL_PATH(CXX) 242 243if test "x$CXX" = x || test "x$CC" = x; then 244 HELP_MSG_MISSING_DEPENDENCY([devkit]) 245 AC_MSG_ERROR([Could not find the needed compilers! $HELP_MSG ]) 246fi 247 248if test "x$OPENJDK_BUILD_OS" != xwindows; then 249 AC_PROG_OBJC 250 SET_FULL_PATH(OBJC) 251else 252 OBJC= 253fi 254 255# Restore the flags to the user specified values. 256# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2" 257CFLAGS="$ORG_CFLAGS" 258CXXFLAGS="$ORG_CXXFLAGS" 259OBJCFLAGS="$ORG_OBJCFLAGS" 260 261LD="$CC" 262LDEXE="$CC" 263LDCXX="$CXX" 264LDEXECXX="$CXX" 265AC_SUBST(LD) 266# LDEXE is the linker to use, when creating executables. 267AC_SUBST(LDEXE) 268# Linking C++ libraries. 269AC_SUBST(LDCXX) 270# Linking C++ executables. 271AC_SUBST(LDEXECXX) 272 273if test "x$OPENJDK_BUILD_OS" != xwindows; then 274 AC_CHECK_TOOL(AR, ar) 275 SET_FULL_PATH(AR) 276fi 277if test "x$OPENJDK_BUILD_OS" = xmacosx; then 278 ARFLAGS="-r" 279else 280 ARFLAGS="" 281fi 282AC_SUBST(ARFLAGS) 283 284COMPILER_NAME=gcc 285COMPILER_TYPE=CC 286AS_IF([test "x$OPENJDK_BUILD_OS" = xwindows], [ 287 # For now, assume that we are always compiling using cl.exe. 288 CC_OUT_OPTION=-Fo 289 EXE_OUT_OPTION=-out: 290 LD_OUT_OPTION=-out: 291 AR_OUT_OPTION=-out: 292 # On Windows, reject /usr/bin/link (as determined in CYGWIN_LINK), which is a cygwin 293 # program for something completely different. 294 AC_CHECK_PROG([WINLD], [link],[link],,, [$CYGWIN_LINK]) 295 # Since we must ignore the first found link, WINLD will contain 296 # the full path to the link.exe program. 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 307 LD="$WINLD" 308 LDEXE="$WINLD" 309 LDCXX="$WINLD" 310 LDEXECXX="$WINLD" 311 312 AC_CHECK_PROG([MT], [mt], [mt],,, [/usr/bin/mt]) 313 SET_FULL_PATH_SPACESAFE([MT]) 314 # The resource compiler 315 AC_CHECK_PROG([RC], [rc], [rc],,, [/usr/bin/rc]) 316 SET_FULL_PATH_SPACESAFE([RC]) 317 318 RC_FLAGS="-nologo /l 0x409 /r" 319 AS_IF([test "x$VARIANT" = xOPT], [ 320 RC_FLAGS="$RC_FLAGS -d NDEBUG" 321 ]) 322 JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION 323 AS_IF([test "x$JDK_UPDATE_VERSION" = x], [ 324 JDK_UPDATE_VERSION_NOTNULL=0 325 ]) 326 RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\"" 327 RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\"" 328 RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\"" 329 RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\"" 330 RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\"" 331 RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\"" 332 RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\"" 333 334 # lib.exe is used to create static libraries. 335 AC_CHECK_PROG([WINAR], [lib],[lib],,,) 336 SET_FULL_PATH_SPACESAFE([WINAR]) 337 AR="$WINAR" 338 ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT" 339 340 AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,) 341 SET_FULL_PATH_SPACESAFE([DUMPBIN]) 342 343 COMPILER_TYPE=CL 344 CCXXFLAGS="$CCXXFLAGS -nologo" 345]) 346AC_SUBST(RC_FLAGS) 347AC_SUBST(COMPILER_TYPE) 348 349AC_PROG_CPP 350SET_FULL_PATH(CPP) 351 352AC_PROG_CXXCPP 353SET_FULL_PATH(CXXCPP) 354 355if 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" 363fi 364 365# for solaris we really need solaris tools, and not gnu equivalent 366# these seems to normally reside in /usr/ccs/bin so add that to path before 367# starting to probe 368# 369# NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH 370# so that it can be overriden --with-tools-dir 371if test "x$OPENJDK_BUILD_OS" = xsolaris; then 372 PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}" 373fi 374 375# Find the right assembler. 376if test "x$OPENJDK_BUILD_OS" = xsolaris; then 377 AC_PATH_PROG(AS, as) 378 SET_FULL_PATH(AS) 379else 380 AS="$CC -c" 381fi 382AC_SUBST(AS) 383 384if test "x$OPENJDK_BUILD_OS" = xsolaris; then 385 AC_PATH_PROGS(NM, [gnm nm]) 386 SET_FULL_PATH(NM) 387 AC_PATH_PROG(STRIP, strip) 388 SET_FULL_PATH(STRIP) 389 AC_PATH_PROG(MCS, mcs) 390 SET_FULL_PATH(MCS) 391elif test "x$OPENJDK_BUILD_OS" != xwindows; then 392 AC_CHECK_TOOL(NM, nm) 393 SET_FULL_PATH(NM) 394 AC_CHECK_TOOL(STRIP, strip) 395 SET_FULL_PATH(STRIP) 396fi 397 398### 399# 400# Check for objcopy 401# 402# but search for gobjcopy first... 403# since I on solaris found a broken objcopy...buhh 404# 405AC_PATH_TOOL(OBJCOPY, gobjcopy) 406if test "x$OBJCOPY" = x; then 407 AC_PATH_TOOL(OBJCOPY, objcopy) 408fi 409 410if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then 411 AC_PATH_PROG(LIPO, lipo) 412 SET_FULL_PATH(LIPO) 413fi 414 415# Restore old path without tools dir 416PATH="$OLD_PATH" 417]) 418 419 420AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS], 421[ 422 423############################################################################### 424# 425# How to compile shared libraries. 426# 427 428if test "x$GCC" = xyes; then 429 COMPILER_NAME=gcc 430 PICFLAG="-fPIC" 431 LIBRARY_PREFIX=lib 432 SHARED_LIBRARY='lib[$]1.so' 433 STATIC_LIBRARY='lib[$]1.a' 434 SHARED_LIBRARY_FLAGS="-shared" 435 SHARED_LIBRARY_SUFFIX='.so' 436 STATIC_LIBRARY_SUFFIX='.a' 437 OBJ_SUFFIX='.o' 438 EXE_SUFFIX='' 439 SET_SHARED_LIBRARY_NAME='-Xlinker -soname=[$]1' 440 SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=[$]1' 441 C_FLAG_REORDER='' 442 CXX_FLAG_REORDER='' 443 SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN[$]1' 444 SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN[$]1' 445 LD="$CC" 446 LDEXE="$CC" 447 LDCXX="$CXX" 448 LDEXECXX="$CXX" 449 POST_STRIP_CMD="$STRIP -g" 450 451 # Linking is different on MacOSX 452 if test "x$OPENJDK_BUILD_OS" = xmacosx; then 453 # Might change in the future to clang. 454 COMPILER_NAME=gcc 455 SHARED_LIBRARY='lib[$]1.dylib' 456 SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" 457 SHARED_LIBRARY_SUFFIX='.dylib' 458 EXE_SUFFIX='' 459 SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1' 460 SET_SHARED_LIBRARY_MAPFILE='' 461 SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.' 462 SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" 463 POST_STRIP_CMD="$STRIP -S" 464 fi 465else 466 if test "x$OPENJDK_BUILD_OS" = xsolaris; then 467 # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler 468 COMPILER_NAME=ossc 469 PICFLAG="-KPIC" 470 LIBRARY_PREFIX=lib 471 SHARED_LIBRARY='lib[$]1.so' 472 STATIC_LIBRARY='lib[$]1.a' 473 SHARED_LIBRARY_FLAGS="-G" 474 SHARED_LIBRARY_SUFFIX='.so' 475 STATIC_LIBRARY_SUFFIX='.a' 476 OBJ_SUFFIX='.o' 477 EXE_SUFFIX='' 478 SET_SHARED_LIBRARY_NAME='' 479 SET_SHARED_LIBRARY_MAPFILE='-M[$]1' 480 C_FLAG_REORDER='-xF' 481 CXX_FLAG_REORDER='-xF' 482 SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN[$]1' 483 SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN" 484 CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__" 485 CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__" 486 CFLAGS_JDKLIB_EXTRA='-xstrconst' 487 POST_STRIP_CMD="$STRIP -x" 488 POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\"" 489 fi 490 if test "x$OPENJDK_BUILD_OS" = xwindows; then 491 # If it is not gcc, then assume it is the MS Visual Studio compiler 492 COMPILER_NAME=cl 493 PICFLAG="" 494 LIBRARY_PREFIX= 495 SHARED_LIBRARY='[$]1.dll' 496 STATIC_LIBRARY='[$]1.lib' 497 SHARED_LIBRARY_FLAGS="-LD" 498 SHARED_LIBRARY_SUFFIX='.dll' 499 STATIC_LIBRARY_SUFFIX='.lib' 500 OBJ_SUFFIX='.obj' 501 EXE_SUFFIX='.exe' 502 SET_SHARED_LIBRARY_NAME='' 503 SET_SHARED_LIBRARY_MAPFILE='' 504 SET_SHARED_LIBRARY_ORIGIN='' 505 SET_EXECUTABLE_ORIGIN='' 506 fi 507fi 508 509AC_SUBST(OBJ_SUFFIX) 510AC_SUBST(SHARED_LIBRARY) 511AC_SUBST(STATIC_LIBRARY) 512AC_SUBST(LIBRARY_PREFIX) 513AC_SUBST(SHARED_LIBRARY_SUFFIX) 514AC_SUBST(STATIC_LIBRARY_SUFFIX) 515AC_SUBST(EXE_SUFFIX) 516AC_SUBST(SHARED_LIBRARY_FLAGS) 517AC_SUBST(SET_SHARED_LIBRARY_NAME) 518AC_SUBST(SET_SHARED_LIBRARY_MAPFILE) 519AC_SUBST(C_FLAG_REORDER) 520AC_SUBST(CXX_FLAG_REORDER) 521AC_SUBST(SET_SHARED_LIBRARY_ORIGIN) 522AC_SUBST(SET_EXECUTABLE_ORIGIN) 523AC_SUBST(POST_STRIP_CMD) 524AC_SUBST(POST_MCS_CMD) 525 526# The (cross) compiler is now configured, we can now test capabilities 527# of the target platform. 528]) 529 530AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION], 531[ 532 533############################################################################### 534# 535# Setup the opt flags for different compilers 536# and different operating systems. 537# 538 539# 540# NOTE: check for -mstackrealign needs to be below potential addition of -m32 541# 542if 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 ]) 555fi 556 557C_FLAG_DEPS="-MMD -MF" 558CXX_FLAG_DEPS="-MMD -MF" 559 560case $COMPILER_TYPE in 561 CC ) 562 D_FLAG="-g" 563 case $COMPILER_NAME in 564 gcc ) 565 case $OPENJDK_TARGET_OS in 566 macosx ) 567 # On MacOSX we optimize for size, something 568 # we should do for all platforms? 569 C_O_FLAG_HI="-Os" 570 C_O_FLAG_NORM="-Os" 571 C_O_FLAG_NONE="" 572 ;; 573 *) 574 C_O_FLAG_HI="-O3" 575 C_O_FLAG_NORM="-O2" 576 C_O_FLAG_NONE="-O0" 577 CFLAGS_DEBUG_SYMBOLS="-g" 578 CXXFLAGS_DEBUG_SYMBOLS="-g" 579 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then 580 CFLAGS_DEBUG_SYMBOLS="-g1" 581 CXXFLAGS_DEBUG_SYMBOLS="-g1" 582 fi 583 ;; 584 esac 585 CXX_O_FLAG_HI="$C_O_FLAG_HI" 586 CXX_O_FLAG_NORM="$C_O_FLAG_NORM" 587 CXX_O_FLAG_NONE="$C_O_FLAG_NONE" 588 ;; 589 ossc ) 590 # 591 # Forte has different names for this with their C++ compiler... 592 # 593 C_FLAG_DEPS="-xMMD -xMF" 594 CXX_FLAG_DEPS="-xMMD -xMF" 595 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" 628 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 643 ;; 644 sparc) 645 CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s" 646 CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s" 647 CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl" 648 CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl" 649 C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" 650 C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0" 651 C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0" 652 C_O_FLAG_NONE="" 653 CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" 654 CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" 655 CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" 656 CXX_O_FLAG_NONE="" 657 ;; 658 esac 659 660 CFLAGS_DEBUG_SYMBOLS="-g -xs" 661 CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs" 662 esac 663 ;; 664 CL ) 665 D_FLAG= 666 C_O_FLAG_HIGHEST="-O2" 667 C_O_FLAG_HI="-O1" 668 C_O_FLAG_NORM="-O1" 669 C_O_FLAG_NONE="-Od" 670 CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST" 671 CXX_O_FLAG_HI="$C_O_FLAG_HI" 672 CXX_O_FLAG_NORM="$C_O_FLAG_NORM" 673 CXX_O_FLAG_NONE="$C_O_FLAG_NONE" 674 ;; 675esac 676 677if test -z "$C_O_FLAG_HIGHEST"; then 678 C_O_FLAG_HIGHEST="$C_O_FLAG_HI" 679fi 680 681if test -z "$CXX_O_FLAG_HIGHEST"; then 682 CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI" 683fi 684 685AC_SUBST(C_O_FLAG_HIGHEST) 686AC_SUBST(C_O_FLAG_HI) 687AC_SUBST(C_O_FLAG_NORM) 688AC_SUBST(C_O_FLAG_NONE) 689AC_SUBST(CXX_O_FLAG_HIGHEST) 690AC_SUBST(CXX_O_FLAG_HI) 691AC_SUBST(CXX_O_FLAG_NORM) 692AC_SUBST(CXX_O_FLAG_NONE) 693AC_SUBST(C_FLAG_DEPS) 694AC_SUBST(CXX_FLAG_DEPS) 695]) 696 697AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK], 698[ 699 700if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then 701 AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags]) 702fi 703 704if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then 705 AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags]) 706fi 707 708if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then 709 AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags]) 710fi 711 712AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags], 713 [extra flags to be used when compiling jdk c-files])]) 714 715AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags], 716 [extra flags to be used when compiling jdk c++-files])]) 717 718AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags], 719 [extra flags to be used when linking jdk])]) 720 721CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags" 722CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags" 723LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags" 724 725# Hotspot needs these set in their legacy form 726LEGACY_EXTRA_CFLAGS=$with_extra_cflags 727LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags 728LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags 729 730AC_SUBST(LEGACY_EXTRA_CFLAGS) 731AC_SUBST(LEGACY_EXTRA_CXXFLAGS) 732AC_SUBST(LEGACY_EXTRA_LDFLAGS) 733 734############################################################################### 735# 736# Now setup the CFLAGS and LDFLAGS for the JDK build. 737# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build. 738# 739case $COMPILER_NAME in 740 gcc ) 741 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \ 742 -pipe \ 743 -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" 744 case $OPENJDK_TARGET_CPU_ARCH in 745 arm ) 746 # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing 747 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" 748 ;; 749 ppc ) 750 # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing 751 ;; 752 * ) 753 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer" 754 CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" 755 ;; 756 esac 757 ;; 758 ossc ) 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" 772 ;; 773 cl ) 774 CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \ 775 -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \ 776 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \ 777 -DWIN32 -DIAL" 778 case $OPENJDK_TARGET_CPU in 779 x86 ) 780 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86" 781 ;; 782 x86_64 ) 783 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64" 784 ;; 785 esac 786 ;; 787esac 788 789############################################################################### 790 791CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64" 792 793# The package path is used only on macosx? 794PACKAGE_PATH=/opt/local 795AC_SUBST(PACKAGE_PATH) 796 797if 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 808else 809 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN" 810fi 811if test "x$OPENJDK_TARGET_OS" = xlinux; then 812 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX" 813fi 814if test "x$OPENJDK_TARGET_OS" = xwindows; then 815 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS" 816fi 817if test "x$OPENJDK_TARGET_OS" = xsolaris; then 818 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS" 819fi 820if test "x$OPENJDK_TARGET_OS" = xmacosx; then 821 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE" 822fi 823if test "x$OPENJDK_TARGET_OS" = xbsd; then 824 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE" 825fi 826if test "x$DEBUG_LEVEL" = xrelease; then 827 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG" 828 if test "x$OPENJDK_TARGET_OS" = xsolaris; then 829 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED" 830 fi 831else 832 CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG" 833fi 834 835CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY" 836CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'" 837 838CCXXFLAGS_JDK="$CCXXFLAGS_JDK \ 839 -I${JDK_OUTPUTDIR}/include \ 840 -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \ 841 -I${JDK_TOPDIR}/src/share/javavm/export \ 842 -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \ 843 -I${JDK_TOPDIR}/src/share/native/common \ 844 -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common" 845 846# The shared libraries are compiled using the picflag. 847CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA" 848CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA " 849 850# Executable flags 851CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK" 852CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK" 853 854# Now this is odd. The JDK native libraries have to link against libjvm.so 855# On 32-bit machines there is normally two distinct libjvm.so:s, client and server. 856# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library 857# is identical for client and server? Yes. Which is picked at runtime (client or server)? 858# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following 859# libraries will link to whatever is in memory. Yuck. 860# 861# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh. 862if test "x$COMPILER_TYPE" = xCL; then 863 LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no" 864 if test "x$OPENJDK_TARGET_CPU" = xx86; then 865 LDFLAGS_JDK="$LDFLAGS_JDK -safeseh" 866 fi 867 # TODO: make -debug optional "--disable-full-debug-symbols" 868 LDFLAGS_JDK="$LDFLAGS_JDK -debug" 869 LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib" 870 LDFLAGS_JDKLIB_SUFFIX="" 871 if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then 872 LDFLAGS_STACK_SIZE=1048576 873 else 874 LDFLAGS_STACK_SIZE=327680 875 fi 876 LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE" 877else 878 # If this is a --hash-style=gnu system, use --hash-style=both, why? 879 HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'` 880 if test -n "$HAS_GNU_HASH"; then 881 # And since we now know that the linker is gnu, then add -z defs, to forbid 882 # undefined symbols in object files. 883 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both -Xlinker -z -Xlinker defs" 884 if test "x$DEBUG_LEVEL" == "xrelease"; then 885 # When building release libraries, tell the linker optimize them. 886 # Should this be supplied to the OSS linker as well? 887 LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1" 888 fi 889 fi 890 891 LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \ 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" 897 if test "x$COMPILER_NAME" = xossc; then 898 LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc" 899 fi 900 901 LDFLAGS_JDKEXE="${LDFLAGS_JDK}" 902 if test "x$OPENJDK_TARGET_OS" = xlinux; then 903 LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined" 904 fi 905fi 906 907# Adjust flags according to debug level. 908case $DEBUG_LEVEL in 909 fastdebug ) 910 CFLAGS="$CFLAGS $D_FLAG" 911 JAVAC_FLAGS="$JAVAC_FLAGS -g" 912 ;; 913 slowdebug ) 914 CFLAGS="$CFLAGS $D_FLAG" 915 C_O_FLAG_HI="$C_O_FLAG_NONE" 916 C_O_FLAG_NORM="$C_O_FLAG_NONE" 917 CXX_O_FLAG_HI="$CXX_O_FLAG_NONE" 918 CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE" 919 JAVAC_FLAGS="$JAVAC_FLAGS -g" 920 ;; 921esac 922 923 924AC_SUBST(CFLAGS_JDKLIB) 925AC_SUBST(CFLAGS_JDKEXE) 926 927AC_SUBST(CXXFLAGS_JDKLIB) 928AC_SUBST(CXXFLAGS_JDKEXE) 929 930AC_SUBST(LDFLAGS_JDKLIB) 931AC_SUBST(LDFLAGS_JDKEXE) 932AC_SUBST(LDFLAGS_JDKLIB_SUFFIX) 933AC_SUBST(LDFLAGS_JDKEXE_SUFFIX) 934AC_SUBST(LDFLAGS_CXX_JDK) 935]) 936