common/autoconf/toolchain.m4

changeset 839
174a54ce39c4
parent 838
ec48d637778a
child 857
5b4f14990dd1
     1.1 --- a/common/autoconf/toolchain.m4	Wed Oct 09 18:51:32 2013 -0700
     1.2 +++ b/common/autoconf/toolchain.m4	Thu Oct 10 14:58:19 2013 +0200
     1.3 @@ -86,25 +86,25 @@
     1.4  
     1.5  AC_DEFUN_ONCE([TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS],
     1.6  [
     1.7 -###############################################################################
     1.8 -#
     1.9 -# Configure the development tool paths and potential sysroot.
    1.10 -#
    1.11 -AC_LANG(C++)
    1.12 +  ###############################################################################
    1.13 +  #
    1.14 +  # Configure the development tool paths and potential sysroot.
    1.15 +  #
    1.16 +  AC_LANG(C++)
    1.17  
    1.18 -# The option used to specify the target .o,.a or .so file.
    1.19 -# When compiling, how to specify the to be created object file.
    1.20 -CC_OUT_OPTION='-o$(SPACE)'
    1.21 -# When linking, how to specify the to be created executable.
    1.22 -EXE_OUT_OPTION='-o$(SPACE)'
    1.23 -# When linking, how to specify the to be created dynamically linkable library.
    1.24 -LD_OUT_OPTION='-o$(SPACE)'
    1.25 -# When archiving, how to specify the to be create static archive for object files.
    1.26 -AR_OUT_OPTION='rcs$(SPACE)'
    1.27 -AC_SUBST(CC_OUT_OPTION)
    1.28 -AC_SUBST(EXE_OUT_OPTION)
    1.29 -AC_SUBST(LD_OUT_OPTION)
    1.30 -AC_SUBST(AR_OUT_OPTION)
    1.31 +  # The option used to specify the target .o,.a or .so file.
    1.32 +  # When compiling, how to specify the to be created object file.
    1.33 +  CC_OUT_OPTION='-o$(SPACE)'
    1.34 +  # When linking, how to specify the to be created executable.
    1.35 +  EXE_OUT_OPTION='-o$(SPACE)'
    1.36 +  # When linking, how to specify the to be created dynamically linkable library.
    1.37 +  LD_OUT_OPTION='-o$(SPACE)'
    1.38 +  # When archiving, how to specify the to be create static archive for object files.
    1.39 +  AR_OUT_OPTION='rcs$(SPACE)'
    1.40 +  AC_SUBST(CC_OUT_OPTION)
    1.41 +  AC_SUBST(EXE_OUT_OPTION)
    1.42 +  AC_SUBST(LD_OUT_OPTION)
    1.43 +  AC_SUBST(AR_OUT_OPTION)
    1.44  ])
    1.45  
    1.46  # $1 = compiler to test (CC or CXX)
    1.47 @@ -133,8 +133,8 @@
    1.48    fi
    1.49  
    1.50    if test "x[$]$1" = x; then
    1.51 -      HELP_MSG_MISSING_DEPENDENCY([devkit])
    1.52 -      AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
    1.53 +    HELP_MSG_MISSING_DEPENDENCY([devkit])
    1.54 +    AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
    1.55    fi
    1.56    BASIC_FIXUP_EXECUTABLE($1)
    1.57    AC_MSG_CHECKING([resolved symbolic links for $1])
    1.58 @@ -174,26 +174,26 @@
    1.59  
    1.60  AC_DEFUN([TOOLCHAIN_SETUP_PATHS],
    1.61  [
    1.62 -if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
    1.63 -  TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
    1.64 -  BASIC_DEPRECATED_ARG_WITH([dxsdk])
    1.65 -  BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
    1.66 -  BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
    1.67 -fi
    1.68 +  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
    1.69 +    TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
    1.70 +    BASIC_DEPRECATED_ARG_WITH([dxsdk])
    1.71 +    BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
    1.72 +    BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
    1.73 +  fi
    1.74  
    1.75 -AC_SUBST(MSVCR_DLL)
    1.76 +  AC_SUBST(MSVCR_DLL)
    1.77  
    1.78 -# If --build AND --host is set, then the configure script will find any
    1.79 -# cross compilation tools in the PATH. Cross compilation tools
    1.80 -# follows the cross compilation standard where they are prefixed with ${host}.
    1.81 -# For example the binary i686-sun-solaris2.10-gcc
    1.82 -# will cross compile for i686-sun-solaris2.10
    1.83 -# If neither of build and host is not set, then build=host and the
    1.84 -# default compiler found in the path will be used.
    1.85 -# Setting only --host, does not seem to be really supported.
    1.86 -# Please set both --build and --host if you want to cross compile.
    1.87 +  # If --build AND --host is set, then the configure script will find any
    1.88 +  # cross compilation tools in the PATH. Cross compilation tools
    1.89 +  # follows the cross compilation standard where they are prefixed with ${host}.
    1.90 +  # For example the binary i686-sun-solaris2.10-gcc
    1.91 +  # will cross compile for i686-sun-solaris2.10
    1.92 +  # If neither of build and host is not set, then build=host and the
    1.93 +  # default compiler found in the path will be used.
    1.94 +  # Setting only --host, does not seem to be really supported.
    1.95 +  # Please set both --build and --host if you want to cross compile.
    1.96  
    1.97 -if test "x$COMPILE_TYPE" = "xcross"; then
    1.98 +  if test "x$COMPILE_TYPE" = "xcross"; then
    1.99      # Now we to find a C/C++ compiler that can build executables for the build
   1.100      # platform. We can't use the AC_PROG_CC macro, since it can only be used
   1.101      # once. Also, we need to do this before adding a tools dir to the path,
   1.102 @@ -206,123 +206,124 @@
   1.103      BASIC_FIXUP_EXECUTABLE(BUILD_CXX)
   1.104      AC_PATH_PROG(BUILD_LD, ld)
   1.105      BASIC_FIXUP_EXECUTABLE(BUILD_LD)
   1.106 -fi
   1.107 -AC_SUBST(BUILD_CC)
   1.108 -AC_SUBST(BUILD_CXX)
   1.109 -AC_SUBST(BUILD_LD)
   1.110 +  fi
   1.111 +  AC_SUBST(BUILD_CC)
   1.112 +  AC_SUBST(BUILD_CXX)
   1.113 +  AC_SUBST(BUILD_LD)
   1.114  
   1.115 -# If a devkit is found on the builddeps server, then prepend its path to the
   1.116 -# PATH variable. If there are cross compilers available in the devkit, these
   1.117 -# will be found by AC_PROG_CC et al.
   1.118 -DEVKIT=
   1.119 -BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx,
   1.120 -                    [# Found devkit
   1.121 -                     PATH="$DEVKIT/bin:$PATH"
   1.122 -                     SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
   1.123 -                     if test "x$x_includes" = "xNONE"; then
   1.124 -                         x_includes="$SYS_ROOT/usr/include/X11"
   1.125 -                     fi
   1.126 -                     if test "x$x_libraries" = "xNONE"; then
   1.127 -                         x_libraries="$SYS_ROOT/usr/lib"
   1.128 -                     fi
   1.129 -                    ],
   1.130 -                    [])
   1.131 +  # If a devkit is found on the builddeps server, then prepend its path to the
   1.132 +  # PATH variable. If there are cross compilers available in the devkit, these
   1.133 +  # will be found by AC_PROG_CC et al.
   1.134 +  DEVKIT=
   1.135 +  BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx,
   1.136 +      [
   1.137 +        # Found devkit
   1.138 +        PATH="$DEVKIT/bin:$PATH"
   1.139 +        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
   1.140 +        if test "x$x_includes" = "xNONE"; then
   1.141 +          x_includes="$SYS_ROOT/usr/include/X11"
   1.142 +        fi
   1.143 +        if test "x$x_libraries" = "xNONE"; then
   1.144 +          x_libraries="$SYS_ROOT/usr/lib"
   1.145 +        fi
   1.146 +      ],
   1.147 +      [])
   1.148  
   1.149 -# Store the CFLAGS etal passed to the configure script.
   1.150 -ORG_CFLAGS="$CFLAGS"
   1.151 -ORG_CXXFLAGS="$CXXFLAGS"
   1.152 -ORG_OBJCFLAGS="$OBJCFLAGS"
   1.153 +  # Store the CFLAGS etal passed to the configure script.
   1.154 +  ORG_CFLAGS="$CFLAGS"
   1.155 +  ORG_CXXFLAGS="$CXXFLAGS"
   1.156 +  ORG_OBJCFLAGS="$OBJCFLAGS"
   1.157  
   1.158 -# autoconf magic only relies on PATH, so update it if tools dir is specified
   1.159 -OLD_PATH="$PATH"
   1.160 -if test "x$TOOLS_DIR" != x; then
   1.161 -  PATH=$TOOLS_DIR:$PATH
   1.162 -fi
   1.163 +  # autoconf magic only relies on PATH, so update it if tools dir is specified
   1.164 +  OLD_PATH="$PATH"
   1.165 +  if test "x$TOOLS_DIR" != x; then
   1.166 +    PATH=$TOOLS_DIR:$PATH
   1.167 +  fi
   1.168  
   1.169  
   1.170 -### Locate C compiler (CC)
   1.171 +  ### Locate C compiler (CC)
   1.172  
   1.173 -# On windows, only cl.exe is supported.
   1.174 -# On Solaris, cc is preferred to gcc.
   1.175 -# Elsewhere, gcc is preferred to cc.
   1.176 +  # On windows, only cl.exe is supported.
   1.177 +  # On Solaris, cc is preferred to gcc.
   1.178 +  # Elsewhere, gcc is preferred to cc.
   1.179  
   1.180 -if test "x$CC" != x; then
   1.181 -  COMPILER_CHECK_LIST="$CC"
   1.182 -elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
   1.183 -  COMPILER_CHECK_LIST="cl"
   1.184 -elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
   1.185 -  COMPILER_CHECK_LIST="cc gcc"
   1.186 -else
   1.187 -  COMPILER_CHECK_LIST="gcc cc"
   1.188 -fi
   1.189 +  if test "x$CC" != x; then
   1.190 +    COMPILER_CHECK_LIST="$CC"
   1.191 +  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
   1.192 +    COMPILER_CHECK_LIST="cl"
   1.193 +  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
   1.194 +    COMPILER_CHECK_LIST="cc gcc"
   1.195 +  else
   1.196 +    COMPILER_CHECK_LIST="gcc cc"
   1.197 +  fi
   1.198  
   1.199 -TOOLCHAIN_FIND_COMPILER([CC],[C],[$COMPILER_CHECK_LIST])
   1.200 -# Now that we have resolved CC ourself, let autoconf have its go at it
   1.201 -AC_PROG_CC([$CC])
   1.202 +  TOOLCHAIN_FIND_COMPILER([CC],[C],[$COMPILER_CHECK_LIST])
   1.203 +  # Now that we have resolved CC ourself, let autoconf have its go at it
   1.204 +  AC_PROG_CC([$CC])
   1.205  
   1.206 -### Locate C++ compiler (CXX)
   1.207 +  ### Locate C++ compiler (CXX)
   1.208  
   1.209 -if test "x$CXX" != x; then
   1.210 -  COMPILER_CHECK_LIST="$CXX"
   1.211 -elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
   1.212 -  COMPILER_CHECK_LIST="cl"
   1.213 -elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
   1.214 -  COMPILER_CHECK_LIST="CC g++"
   1.215 -else
   1.216 -  COMPILER_CHECK_LIST="g++ CC"
   1.217 -fi
   1.218 +  if test "x$CXX" != x; then
   1.219 +    COMPILER_CHECK_LIST="$CXX"
   1.220 +  elif test "x$OPENJDK_TARGET_OS" = "xwindows"; then
   1.221 +    COMPILER_CHECK_LIST="cl"
   1.222 +  elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
   1.223 +    COMPILER_CHECK_LIST="CC g++"
   1.224 +  else
   1.225 +    COMPILER_CHECK_LIST="g++ CC"
   1.226 +  fi
   1.227  
   1.228 -TOOLCHAIN_FIND_COMPILER([CXX],[C++],[$COMPILER_CHECK_LIST])
   1.229 -# Now that we have resolved CXX ourself, let autoconf have its go at it
   1.230 -AC_PROG_CXX([$CXX])
   1.231 +  TOOLCHAIN_FIND_COMPILER([CXX],[C++],[$COMPILER_CHECK_LIST])
   1.232 +  # Now that we have resolved CXX ourself, let autoconf have its go at it
   1.233 +  AC_PROG_CXX([$CXX])
   1.234  
   1.235 -### Locate other tools
   1.236 +  ### Locate other tools
   1.237  
   1.238 -if test "x$OPENJDK_TARGET_OS" = xmacosx; then
   1.239 +  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
   1.240      AC_PROG_OBJC
   1.241      BASIC_FIXUP_EXECUTABLE(OBJC)
   1.242 -else
   1.243 +  else
   1.244      OBJC=
   1.245 -fi
   1.246 +  fi
   1.247  
   1.248 -# Restore the flags to the user specified values.
   1.249 -# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
   1.250 -CFLAGS="$ORG_CFLAGS"
   1.251 -CXXFLAGS="$ORG_CXXFLAGS"
   1.252 -OBJCFLAGS="$ORG_OBJCFLAGS"
   1.253 +  # Restore the flags to the user specified values.
   1.254 +  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
   1.255 +  CFLAGS="$ORG_CFLAGS"
   1.256 +  CXXFLAGS="$ORG_CXXFLAGS"
   1.257 +  OBJCFLAGS="$ORG_OBJCFLAGS"
   1.258  
   1.259 -LD="$CC"
   1.260 -LDEXE="$CC"
   1.261 -LDCXX="$CXX"
   1.262 -LDEXECXX="$CXX"
   1.263 -AC_SUBST(LD)
   1.264 -# LDEXE is the linker to use, when creating executables.
   1.265 -AC_SUBST(LDEXE)
   1.266 -# Linking C++ libraries.
   1.267 -AC_SUBST(LDCXX)
   1.268 -# Linking C++ executables.
   1.269 -AC_SUBST(LDEXECXX)
   1.270 +  LD="$CC"
   1.271 +  LDEXE="$CC"
   1.272 +  LDCXX="$CXX"
   1.273 +  LDEXECXX="$CXX"
   1.274 +  AC_SUBST(LD)
   1.275 +  # LDEXE is the linker to use, when creating executables.
   1.276 +  AC_SUBST(LDEXE)
   1.277 +  # Linking C++ libraries.
   1.278 +  AC_SUBST(LDCXX)
   1.279 +  # Linking C++ executables.
   1.280 +  AC_SUBST(LDEXECXX)
   1.281  
   1.282 -if test "x$OPENJDK_TARGET_OS" != xwindows; then
   1.283 +  if test "x$OPENJDK_TARGET_OS" != xwindows; then
   1.284      AC_CHECK_TOOL(AR, ar)
   1.285      BASIC_FIXUP_EXECUTABLE(AR)
   1.286 -fi
   1.287 -if test "x$OPENJDK_TARGET_OS" = xmacosx; then
   1.288 +  fi
   1.289 +  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
   1.290      ARFLAGS="-r"
   1.291 -else
   1.292 +  else
   1.293      ARFLAGS=""
   1.294 -fi
   1.295 -AC_SUBST(ARFLAGS)
   1.296 +  fi
   1.297 +  AC_SUBST(ARFLAGS)
   1.298  
   1.299 -# For hotspot, we need these in Windows mixed path; other platforms keep them the same
   1.300 -HOTSPOT_CXX="$CXX"
   1.301 -HOTSPOT_LD="$LD"
   1.302 -AC_SUBST(HOTSPOT_CXX)
   1.303 -AC_SUBST(HOTSPOT_LD)
   1.304 +  # For hotspot, we need these in Windows mixed path; other platforms keep them the same
   1.305 +  HOTSPOT_CXX="$CXX"
   1.306 +  HOTSPOT_LD="$LD"
   1.307 +  AC_SUBST(HOTSPOT_CXX)
   1.308 +  AC_SUBST(HOTSPOT_LD)
   1.309  
   1.310 -COMPILER_NAME=gcc
   1.311 -COMPILER_TYPE=CC
   1.312 -AS_IF([test "x$OPENJDK_TARGET_OS" = xwindows], [
   1.313 +  COMPILER_NAME=gcc
   1.314 +  COMPILER_TYPE=CC
   1.315 +  AS_IF([test "x$OPENJDK_TARGET_OS" = xwindows], [
   1.316      # For now, assume that we are always compiling using cl.exe.
   1.317      CC_OUT_OPTION=-Fo
   1.318      EXE_OUT_OPTION=-out:
   1.319 @@ -369,45 +370,45 @@
   1.320  
   1.321      RC_FLAGS="-nologo -l 0x409 -r"
   1.322      AS_IF([test "x$VARIANT" = xOPT], [
   1.323 -        RC_FLAGS="$RC_FLAGS -d NDEBUG"
   1.324 -    ])
   1.325 +    RC_FLAGS="$RC_FLAGS -d NDEBUG"
   1.326 +  ])
   1.327  
   1.328 -    # The version variables used to create RC_FLAGS may be overridden
   1.329 -    # in a custom configure script, or possibly the command line.  
   1.330 -    # Let those variables be expanded at make time in spec.gmk.
   1.331 -    # The \$ are escaped to the shell, and the $(...) variables
   1.332 -    # are evaluated by make.
   1.333 -    RC_FLAGS="$RC_FLAGS \
   1.334 -        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
   1.335 -        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
   1.336 -        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
   1.337 -        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
   1.338 -        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
   1.339 -        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
   1.340 -        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
   1.341 +  # The version variables used to create RC_FLAGS may be overridden
   1.342 +  # in a custom configure script, or possibly the command line.
   1.343 +  # Let those variables be expanded at make time in spec.gmk.
   1.344 +  # The \$ are escaped to the shell, and the $(...) variables
   1.345 +  # are evaluated by make.
   1.346 +  RC_FLAGS="$RC_FLAGS \
   1.347 +      -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
   1.348 +      -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
   1.349 +      -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
   1.350 +      -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
   1.351 +      -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
   1.352 +      -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
   1.353 +      -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
   1.354  
   1.355 -    # lib.exe is used to create static libraries.
   1.356 -    AC_CHECK_PROG([WINAR], [lib],[lib],,,)
   1.357 -    BASIC_FIXUP_EXECUTABLE(WINAR)
   1.358 -    AR="$WINAR"
   1.359 -    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
   1.360 +  # lib.exe is used to create static libraries.
   1.361 +  AC_CHECK_PROG([WINAR], [lib],[lib],,,)
   1.362 +  BASIC_FIXUP_EXECUTABLE(WINAR)
   1.363 +  AR="$WINAR"
   1.364 +  ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
   1.365  
   1.366 -    AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,)
   1.367 -    BASIC_FIXUP_EXECUTABLE(DUMPBIN)
   1.368 +  AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,)
   1.369 +      BASIC_FIXUP_EXECUTABLE(DUMPBIN)
   1.370  
   1.371 -    COMPILER_TYPE=CL
   1.372 -    CCXXFLAGS="$CCXXFLAGS -nologo"
   1.373 -])
   1.374 -AC_SUBST(RC_FLAGS)
   1.375 -AC_SUBST(COMPILER_TYPE)
   1.376 +      COMPILER_TYPE=CL
   1.377 +      CCXXFLAGS="$CCXXFLAGS -nologo"
   1.378 +  ])
   1.379 +  AC_SUBST(RC_FLAGS)
   1.380 +  AC_SUBST(COMPILER_TYPE)
   1.381  
   1.382 -AC_PROG_CPP
   1.383 -BASIC_FIXUP_EXECUTABLE(CPP)
   1.384 +  AC_PROG_CPP
   1.385 +  BASIC_FIXUP_EXECUTABLE(CPP)
   1.386  
   1.387 -AC_PROG_CXXCPP
   1.388 -BASIC_FIXUP_EXECUTABLE(CXXCPP)
   1.389 +  AC_PROG_CXXCPP
   1.390 +  BASIC_FIXUP_EXECUTABLE(CXXCPP)
   1.391  
   1.392 -if test "x$COMPILE_TYPE" != "xcross"; then
   1.393 +  if test "x$COMPILE_TYPE" != "xcross"; then
   1.394      # If we are not cross compiling, use the same compilers for
   1.395      # building the build platform executables. The cross-compilation
   1.396      # case needed to be done earlier, but this can only be done after
   1.397 @@ -415,28 +416,28 @@
   1.398      BUILD_CC="$CC"
   1.399      BUILD_CXX="$CXX"
   1.400      BUILD_LD="$LD"
   1.401 -fi
   1.402 +  fi
   1.403  
   1.404 -# for solaris we really need solaris tools, and not gnu equivalent
   1.405 -#   these seems to normally reside in /usr/ccs/bin so add that to path before
   1.406 -#   starting to probe
   1.407 -#
   1.408 -#   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
   1.409 -#         so that it can be overriden --with-tools-dir
   1.410 -if test "x$OPENJDK_BUILD_OS" = xsolaris; then
   1.411 +  # for solaris we really need solaris tools, and not gnu equivalent
   1.412 +  #   these seems to normally reside in /usr/ccs/bin so add that to path before
   1.413 +  #   starting to probe
   1.414 +  #
   1.415 +  #   NOTE: I add this /usr/ccs/bin after TOOLS but before OLD_PATH
   1.416 +  #         so that it can be overriden --with-tools-dir
   1.417 +  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
   1.418      PATH="${TOOLS_DIR}:/usr/ccs/bin:${OLD_PATH}"
   1.419 -fi
   1.420 +  fi
   1.421  
   1.422 -# Find the right assembler.
   1.423 -if test "x$OPENJDK_TARGET_OS" = xsolaris; then
   1.424 +  # Find the right assembler.
   1.425 +  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
   1.426      AC_PATH_PROG(AS, as)
   1.427      BASIC_FIXUP_EXECUTABLE(AS)
   1.428 -else
   1.429 +  else
   1.430      AS="$CC -c"
   1.431 -fi
   1.432 -AC_SUBST(AS)
   1.433 +  fi
   1.434 +  AC_SUBST(AS)
   1.435  
   1.436 -if test "x$OPENJDK_TARGET_OS" = xsolaris; then
   1.437 +  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
   1.438      AC_PATH_PROG(NM, nm)
   1.439      BASIC_FIXUP_EXECUTABLE(NM)
   1.440      AC_PATH_PROG(GNM, gnm)
   1.441 @@ -445,52 +446,52 @@
   1.442      BASIC_FIXUP_EXECUTABLE(STRIP)
   1.443      AC_PATH_PROG(MCS, mcs)
   1.444      BASIC_FIXUP_EXECUTABLE(MCS)
   1.445 -elif test "x$OPENJDK_TARGET_OS" != xwindows; then
   1.446 +  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
   1.447      AC_CHECK_TOOL(NM, nm)
   1.448      BASIC_FIXUP_EXECUTABLE(NM)
   1.449      GNM="$NM"
   1.450      AC_SUBST(GNM)
   1.451      AC_CHECK_TOOL(STRIP, strip)
   1.452      BASIC_FIXUP_EXECUTABLE(STRIP)
   1.453 -fi
   1.454 +  fi
   1.455  
   1.456 -# objcopy is used for moving debug symbols to separate files when
   1.457 -# full debug symbols are enabled.
   1.458 -if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
   1.459 +  # objcopy is used for moving debug symbols to separate files when
   1.460 +  # full debug symbols are enabled.
   1.461 +  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
   1.462      AC_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy])
   1.463      # Only call fixup if objcopy was found.
   1.464      if test -n "$OBJCOPY"; then
   1.465 -        BASIC_FIXUP_EXECUTABLE(OBJCOPY)
   1.466 +      BASIC_FIXUP_EXECUTABLE(OBJCOPY)
   1.467      fi
   1.468 -fi
   1.469 +  fi
   1.470  
   1.471 -AC_CHECK_TOOLS(OBJDUMP, [gobjdump objdump])
   1.472 -if test "x$OBJDUMP" != x; then
   1.473 -  # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
   1.474 -  BASIC_FIXUP_EXECUTABLE(OBJDUMP)
   1.475 -fi
   1.476 +  AC_CHECK_TOOLS(OBJDUMP, [gobjdump objdump])
   1.477 +  if test "x$OBJDUMP" != x; then
   1.478 +    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE bails if argument is missing.
   1.479 +    BASIC_FIXUP_EXECUTABLE(OBJDUMP)
   1.480 +  fi
   1.481  
   1.482 -if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
   1.483 -   AC_PATH_PROG(LIPO, lipo)
   1.484 -   BASIC_FIXUP_EXECUTABLE(LIPO)
   1.485 -fi
   1.486 +  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
   1.487 +    AC_PATH_PROG(LIPO, lipo)
   1.488 +    BASIC_FIXUP_EXECUTABLE(LIPO)
   1.489 +  fi
   1.490  
   1.491 -TOOLCHAIN_SETUP_JTREG
   1.492 +  TOOLCHAIN_SETUP_JTREG
   1.493  
   1.494 -# Restore old path without tools dir
   1.495 -PATH="$OLD_PATH"
   1.496 +  # Restore old path without tools dir
   1.497 +  PATH="$OLD_PATH"
   1.498  ])
   1.499  
   1.500  
   1.501  AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS],
   1.502  [
   1.503  
   1.504 -###############################################################################
   1.505 -#
   1.506 -# How to compile shared libraries.
   1.507 -#
   1.508 +  ###############################################################################
   1.509 +  #
   1.510 +  # How to compile shared libraries.
   1.511 +  #
   1.512  
   1.513 -if test "x$GCC" = xyes; then
   1.514 +  if test "x$GCC" = xyes; then
   1.515      COMPILER_NAME=gcc
   1.516      PICFLAG="-fPIC"
   1.517      LIBRARY_PREFIX=lib
   1.518 @@ -515,398 +516,399 @@
   1.519  
   1.520      # Linking is different on MacOSX
   1.521      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
   1.522 -        # Might change in the future to clang.
   1.523 -        COMPILER_NAME=gcc
   1.524 -        SHARED_LIBRARY='lib[$]1.dylib'
   1.525 -        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
   1.526 -        SHARED_LIBRARY_SUFFIX='.dylib'
   1.527 -        EXE_SUFFIX=''
   1.528 -        SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1'
   1.529 -        SET_SHARED_LIBRARY_MAPFILE=''
   1.530 -        SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
   1.531 -        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
   1.532 -        POST_STRIP_CMD="$STRIP -S"
   1.533 +      # Might change in the future to clang.
   1.534 +      COMPILER_NAME=gcc
   1.535 +      SHARED_LIBRARY='lib[$]1.dylib'
   1.536 +      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
   1.537 +      SHARED_LIBRARY_SUFFIX='.dylib'
   1.538 +      EXE_SUFFIX=''
   1.539 +      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1'
   1.540 +      SET_SHARED_LIBRARY_MAPFILE=''
   1.541 +      SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
   1.542 +      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
   1.543 +      POST_STRIP_CMD="$STRIP -S"
   1.544      fi
   1.545 -else
   1.546 +  else
   1.547      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
   1.548 -        # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
   1.549 -        COMPILER_NAME=ossc
   1.550 -        PICFLAG="-KPIC"
   1.551 -        LIBRARY_PREFIX=lib
   1.552 -        SHARED_LIBRARY='lib[$]1.so'
   1.553 -        STATIC_LIBRARY='lib[$]1.a'
   1.554 -        SHARED_LIBRARY_FLAGS="-G"
   1.555 -        SHARED_LIBRARY_SUFFIX='.so'
   1.556 -        STATIC_LIBRARY_SUFFIX='.a'
   1.557 -        OBJ_SUFFIX='.o'
   1.558 -        EXE_SUFFIX=''
   1.559 -        SET_SHARED_LIBRARY_NAME=''
   1.560 -        SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
   1.561 -	C_FLAG_REORDER='-xF'
   1.562 -	CXX_FLAG_REORDER='-xF'
   1.563 -        SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN[$]1'
   1.564 -        SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
   1.565 -        CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
   1.566 -        CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
   1.567 -        CFLAGS_JDKLIB_EXTRA='-xstrconst'
   1.568 -        POST_STRIP_CMD="$STRIP -x"
   1.569 -        POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
   1.570 +      # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler
   1.571 +      COMPILER_NAME=ossc
   1.572 +      PICFLAG="-KPIC"
   1.573 +      LIBRARY_PREFIX=lib
   1.574 +      SHARED_LIBRARY='lib[$]1.so'
   1.575 +      STATIC_LIBRARY='lib[$]1.a'
   1.576 +      SHARED_LIBRARY_FLAGS="-G"
   1.577 +      SHARED_LIBRARY_SUFFIX='.so'
   1.578 +      STATIC_LIBRARY_SUFFIX='.a'
   1.579 +      OBJ_SUFFIX='.o'
   1.580 +      EXE_SUFFIX=''
   1.581 +      SET_SHARED_LIBRARY_NAME=''
   1.582 +      SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
   1.583 +      C_FLAG_REORDER='-xF'
   1.584 +      CXX_FLAG_REORDER='-xF'
   1.585 +      SET_SHARED_LIBRARY_ORIGIN='-R\$$$$ORIGIN[$]1'
   1.586 +      SET_EXECUTABLE_ORIGIN="$SET_SHARED_LIBRARY_ORIGIN"
   1.587 +      CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
   1.588 +      CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
   1.589 +      CFLAGS_JDKLIB_EXTRA='-xstrconst'
   1.590 +      POST_STRIP_CMD="$STRIP -x"
   1.591 +      POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
   1.592      fi
   1.593      if test "x$OPENJDK_TARGET_OS" = xwindows; then
   1.594 -        # If it is not gcc, then assume it is the MS Visual Studio compiler
   1.595 -        COMPILER_NAME=cl
   1.596 -        PICFLAG=""
   1.597 -        LIBRARY_PREFIX=
   1.598 -        SHARED_LIBRARY='[$]1.dll'
   1.599 -        STATIC_LIBRARY='[$]1.lib'
   1.600 -        SHARED_LIBRARY_FLAGS="-LD"
   1.601 -        SHARED_LIBRARY_SUFFIX='.dll'
   1.602 -        STATIC_LIBRARY_SUFFIX='.lib'
   1.603 -        OBJ_SUFFIX='.obj'
   1.604 -        EXE_SUFFIX='.exe'
   1.605 -        SET_SHARED_LIBRARY_NAME=''
   1.606 -        SET_SHARED_LIBRARY_MAPFILE=''
   1.607 -        SET_SHARED_LIBRARY_ORIGIN=''
   1.608 -        SET_EXECUTABLE_ORIGIN=''
   1.609 +      # If it is not gcc, then assume it is the MS Visual Studio compiler
   1.610 +      COMPILER_NAME=cl
   1.611 +      PICFLAG=""
   1.612 +      LIBRARY_PREFIX=
   1.613 +      SHARED_LIBRARY='[$]1.dll'
   1.614 +      STATIC_LIBRARY='[$]1.lib'
   1.615 +      SHARED_LIBRARY_FLAGS="-LD"
   1.616 +      SHARED_LIBRARY_SUFFIX='.dll'
   1.617 +      STATIC_LIBRARY_SUFFIX='.lib'
   1.618 +      OBJ_SUFFIX='.obj'
   1.619 +      EXE_SUFFIX='.exe'
   1.620 +      SET_SHARED_LIBRARY_NAME=''
   1.621 +      SET_SHARED_LIBRARY_MAPFILE=''
   1.622 +      SET_SHARED_LIBRARY_ORIGIN=''
   1.623 +      SET_EXECUTABLE_ORIGIN=''
   1.624      fi
   1.625 -fi
   1.626 +  fi
   1.627  
   1.628 -AC_SUBST(COMPILER_NAME)
   1.629 -AC_SUBST(OBJ_SUFFIX)
   1.630 -AC_SUBST(SHARED_LIBRARY)
   1.631 -AC_SUBST(STATIC_LIBRARY)
   1.632 -AC_SUBST(LIBRARY_PREFIX)
   1.633 -AC_SUBST(SHARED_LIBRARY_SUFFIX)
   1.634 -AC_SUBST(STATIC_LIBRARY_SUFFIX)
   1.635 -AC_SUBST(EXE_SUFFIX)
   1.636 -AC_SUBST(SHARED_LIBRARY_FLAGS)
   1.637 -AC_SUBST(SET_SHARED_LIBRARY_NAME)
   1.638 -AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
   1.639 -AC_SUBST(C_FLAG_REORDER)
   1.640 -AC_SUBST(CXX_FLAG_REORDER)
   1.641 -AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
   1.642 -AC_SUBST(SET_EXECUTABLE_ORIGIN)
   1.643 -AC_SUBST(POST_STRIP_CMD)
   1.644 -AC_SUBST(POST_MCS_CMD)
   1.645 +  AC_SUBST(COMPILER_NAME)
   1.646 +  AC_SUBST(OBJ_SUFFIX)
   1.647 +  AC_SUBST(SHARED_LIBRARY)
   1.648 +  AC_SUBST(STATIC_LIBRARY)
   1.649 +  AC_SUBST(LIBRARY_PREFIX)
   1.650 +  AC_SUBST(SHARED_LIBRARY_SUFFIX)
   1.651 +  AC_SUBST(STATIC_LIBRARY_SUFFIX)
   1.652 +  AC_SUBST(EXE_SUFFIX)
   1.653 +  AC_SUBST(SHARED_LIBRARY_FLAGS)
   1.654 +  AC_SUBST(SET_SHARED_LIBRARY_NAME)
   1.655 +  AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
   1.656 +  AC_SUBST(C_FLAG_REORDER)
   1.657 +  AC_SUBST(CXX_FLAG_REORDER)
   1.658 +  AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
   1.659 +  AC_SUBST(SET_EXECUTABLE_ORIGIN)
   1.660 +  AC_SUBST(POST_STRIP_CMD)
   1.661 +  AC_SUBST(POST_MCS_CMD)
   1.662  
   1.663 -# The (cross) compiler is now configured, we can now test capabilities
   1.664 -# of the target platform.
   1.665 +  # The (cross) compiler is now configured, we can now test capabilities
   1.666 +  # of the target platform.
   1.667  ])
   1.668  
   1.669  AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
   1.670  [
   1.671  
   1.672 -###############################################################################
   1.673 -#
   1.674 -# Setup the opt flags for different compilers
   1.675 -# and different operating systems.
   1.676 -#
   1.677 +  ###############################################################################
   1.678 +  #
   1.679 +  # Setup the opt flags for different compilers
   1.680 +  # and different operating systems.
   1.681 +  #
   1.682  
   1.683 -#
   1.684 -# NOTE: check for -mstackrealign needs to be below potential addition of -m32
   1.685 -#
   1.686 -if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
   1.687 +  #
   1.688 +  # NOTE: check for -mstackrealign needs to be below potential addition of -m32
   1.689 +  #
   1.690 +  if test "x$OPENJDK_TARGET_CPU_BITS" = x32 && test "x$OPENJDK_TARGET_OS" = xmacosx; then
   1.691      # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned.
   1.692      # While waiting for a better solution, the current workaround is to use -mstackrealign.
   1.693      CFLAGS="$CFLAGS -mstackrealign"
   1.694      AC_MSG_CHECKING([if 32-bit compiler supports -mstackrealign])
   1.695      AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])],
   1.696 -                   [
   1.697 -		        AC_MSG_RESULT([yes])
   1.698 -                   ],
   1.699 -	           [
   1.700 -		        AC_MSG_RESULT([no])
   1.701 -	                AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
   1.702 -	           ])
   1.703 -fi
   1.704 +        [
   1.705 +          AC_MSG_RESULT([yes])
   1.706 +        ],
   1.707 +        [
   1.708 +          AC_MSG_RESULT([no])
   1.709 +          AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.])
   1.710 +        ]
   1.711 +    )
   1.712 +  fi
   1.713  
   1.714 -C_FLAG_DEPS="-MMD -MF"
   1.715 -CXX_FLAG_DEPS="-MMD -MF"
   1.716 +  C_FLAG_DEPS="-MMD -MF"
   1.717 +  CXX_FLAG_DEPS="-MMD -MF"
   1.718  
   1.719 -case $COMPILER_TYPE in
   1.720 -  CC )
   1.721 -    case $COMPILER_NAME in
   1.722 -      gcc )
   1.723 -      	case $OPENJDK_TARGET_OS in
   1.724 -	  macosx )
   1.725 -	    # On MacOSX we optimize for size, something
   1.726 -	    # we should do for all platforms?
   1.727 -	    C_O_FLAG_HI="-Os"
   1.728 -	    C_O_FLAG_NORM="-Os"
   1.729 -	    C_O_FLAG_NONE=""
   1.730 -	    ;;
   1.731 -	  *)
   1.732 -	    C_O_FLAG_HI="-O3"
   1.733 -	    C_O_FLAG_NORM="-O2"
   1.734 -	    C_O_FLAG_NONE="-O0"
   1.735 -	    ;;
   1.736 -	esac
   1.737 -        CXX_O_FLAG_HI="$C_O_FLAG_HI"
   1.738 -        CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
   1.739 -        CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
   1.740 -        CFLAGS_DEBUG_SYMBOLS="-g"
   1.741 -        CXXFLAGS_DEBUG_SYMBOLS="-g"
   1.742 -        if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
   1.743 +  case $COMPILER_TYPE in
   1.744 +    CC )
   1.745 +      case $COMPILER_NAME in
   1.746 +        gcc )
   1.747 +          case $OPENJDK_TARGET_OS in
   1.748 +            macosx )
   1.749 +              # On MacOSX we optimize for size, something
   1.750 +              # we should do for all platforms?
   1.751 +              C_O_FLAG_HI="-Os"
   1.752 +              C_O_FLAG_NORM="-Os"
   1.753 +              C_O_FLAG_NONE=""
   1.754 +              ;;
   1.755 +            *)
   1.756 +              C_O_FLAG_HI="-O3"
   1.757 +              C_O_FLAG_NORM="-O2"
   1.758 +              C_O_FLAG_NONE="-O0"
   1.759 +              ;;
   1.760 +          esac
   1.761 +          CXX_O_FLAG_HI="$C_O_FLAG_HI"
   1.762 +          CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
   1.763 +          CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
   1.764 +          CFLAGS_DEBUG_SYMBOLS="-g"
   1.765 +          CXXFLAGS_DEBUG_SYMBOLS="-g"
   1.766 +          if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
   1.767              CFLAGS_DEBUG_SYMBOLS="-g1"
   1.768              CXXFLAGS_DEBUG_SYMBOLS="-g1"
   1.769 -        fi
   1.770 -        ;;
   1.771 -      ossc )
   1.772 -        #
   1.773 -        # Forte has different names for this with their C++ compiler...
   1.774 -        #
   1.775 -        C_FLAG_DEPS="-xMMD -xMF"
   1.776 -        CXX_FLAG_DEPS="-xMMD -xMF"
   1.777 +          fi
   1.778 +          ;;
   1.779 +        ossc )
   1.780 +          #
   1.781 +          # Forte has different names for this with their C++ compiler...
   1.782 +          #
   1.783 +          C_FLAG_DEPS="-xMMD -xMF"
   1.784 +          CXX_FLAG_DEPS="-xMMD -xMF"
   1.785  
   1.786 -        # Extra options used with HIGHEST
   1.787 -        #
   1.788 -        # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
   1.789 -        #          done with care, there are some assumptions below that need to
   1.790 -        #          be understood about the use of pointers, and IEEE behavior.
   1.791 -        #
   1.792 -        # Use non-standard floating point mode (not IEEE 754)
   1.793 -        CC_HIGHEST="$CC_HIGHEST -fns"
   1.794 -        # Do some simplification of floating point arithmetic (not IEEE 754)
   1.795 -        CC_HIGHEST="$CC_HIGHEST -fsimple"
   1.796 -        # Use single precision floating point with 'float'
   1.797 -        CC_HIGHEST="$CC_HIGHEST -fsingle"
   1.798 -        # Assume memory references via basic pointer types do not alias
   1.799 -        #   (Source with excessing pointer casting and data access with mixed
   1.800 -        #    pointer types are not recommended)
   1.801 -        CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
   1.802 -        # Use intrinsic or inline versions for math/std functions
   1.803 -        #   (If you expect perfect errno behavior, do not use this)
   1.804 -        CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
   1.805 -        # Loop data dependency optimizations (need -xO3 or higher)
   1.806 -        CC_HIGHEST="$CC_HIGHEST -xdepend"
   1.807 -        # Pointer parameters to functions do not overlap
   1.808 -        #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
   1.809 -        #    If you pass in multiple pointers to the same data, do not use this)
   1.810 -        CC_HIGHEST="$CC_HIGHEST -xrestrict"
   1.811 -        # Inline some library routines
   1.812 -        #   (If you expect perfect errno behavior, do not use this)
   1.813 -        CC_HIGHEST="$CC_HIGHEST -xlibmil"
   1.814 -        # Use optimized math routines
   1.815 -        #   (If you expect perfect errno behavior, do not use this)
   1.816 -        #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
   1.817 -        #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
   1.818 +          # Extra options used with HIGHEST
   1.819 +          #
   1.820 +          # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
   1.821 +          #          done with care, there are some assumptions below that need to
   1.822 +          #          be understood about the use of pointers, and IEEE behavior.
   1.823 +          #
   1.824 +          # Use non-standard floating point mode (not IEEE 754)
   1.825 +          CC_HIGHEST="$CC_HIGHEST -fns"
   1.826 +          # Do some simplification of floating point arithmetic (not IEEE 754)
   1.827 +          CC_HIGHEST="$CC_HIGHEST -fsimple"
   1.828 +          # Use single precision floating point with 'float'
   1.829 +          CC_HIGHEST="$CC_HIGHEST -fsingle"
   1.830 +          # Assume memory references via basic pointer types do not alias
   1.831 +          #   (Source with excessing pointer casting and data access with mixed
   1.832 +          #    pointer types are not recommended)
   1.833 +          CC_HIGHEST="$CC_HIGHEST -xalias_level=basic"
   1.834 +          # Use intrinsic or inline versions for math/std functions
   1.835 +          #   (If you expect perfect errno behavior, do not use this)
   1.836 +          CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all"
   1.837 +          # Loop data dependency optimizations (need -xO3 or higher)
   1.838 +          CC_HIGHEST="$CC_HIGHEST -xdepend"
   1.839 +          # Pointer parameters to functions do not overlap
   1.840 +          #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
   1.841 +          #    If you pass in multiple pointers to the same data, do not use this)
   1.842 +          CC_HIGHEST="$CC_HIGHEST -xrestrict"
   1.843 +          # Inline some library routines
   1.844 +          #   (If you expect perfect errno behavior, do not use this)
   1.845 +          CC_HIGHEST="$CC_HIGHEST -xlibmil"
   1.846 +          # Use optimized math routines
   1.847 +          #   (If you expect perfect errno behavior, do not use this)
   1.848 +          #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
   1.849 +          #CC_HIGHEST="$CC_HIGHEST -xlibmopt"
   1.850  
   1.851 -        if test "x$OPENJDK_TARGET_CPU" = xsparc; then
   1.852 -          CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
   1.853 -          CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
   1.854 -        fi
   1.855 +          if test "x$OPENJDK_TARGET_CPU" = xsparc; then
   1.856 +            CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
   1.857 +            CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
   1.858 +          fi
   1.859  
   1.860 -        case $OPENJDK_TARGET_CPU_ARCH in
   1.861 -          x86)
   1.862 -            C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
   1.863 -            C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
   1.864 -            C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
   1.865 -            C_O_FLAG_NONE="-xregs=no%frameptr"
   1.866 -            CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
   1.867 -            CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
   1.868 -            CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
   1.869 -            CXX_O_FLAG_NONE="-xregs=no%frameptr"
   1.870 -            if test "x$OPENJDK_TARGET_CPU" = xx86; then
   1.871 -               C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
   1.872 -               CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
   1.873 -            fi
   1.874 -            ;;
   1.875 -          sparc)
   1.876 -            CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
   1.877 -            CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
   1.878 -            C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
   1.879 -            C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
   1.880 -            C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
   1.881 -            C_O_FLAG_NONE=""
   1.882 -            CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
   1.883 -            CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
   1.884 -            CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
   1.885 -            CXX_O_FLAG_NONE=""
   1.886 -            ;;
   1.887 -        esac
   1.888 +          case $OPENJDK_TARGET_CPU_ARCH in
   1.889 +            x86)
   1.890 +              C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
   1.891 +              C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
   1.892 +              C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
   1.893 +              C_O_FLAG_NONE="-xregs=no%frameptr"
   1.894 +              CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
   1.895 +              CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
   1.896 +              CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
   1.897 +              CXX_O_FLAG_NONE="-xregs=no%frameptr"
   1.898 +              if test "x$OPENJDK_TARGET_CPU" = xx86; then
   1.899 +                C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
   1.900 +                CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
   1.901 +              fi
   1.902 +              ;;
   1.903 +            sparc)
   1.904 +              CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
   1.905 +              CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
   1.906 +              C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
   1.907 +              C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
   1.908 +              C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
   1.909 +              C_O_FLAG_NONE=""
   1.910 +              CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
   1.911 +              CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
   1.912 +              CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
   1.913 +              CXX_O_FLAG_NONE=""
   1.914 +              ;;
   1.915 +          esac
   1.916  
   1.917 -    CFLAGS_DEBUG_SYMBOLS="-g -xs"
   1.918 -    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
   1.919 -    esac
   1.920 -    ;;
   1.921 -  CL )
   1.922 -    C_O_FLAG_HIGHEST="-O2"
   1.923 -    C_O_FLAG_HI="-O1"
   1.924 -    C_O_FLAG_NORM="-O1"
   1.925 -    C_O_FLAG_NONE="-Od"
   1.926 -    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
   1.927 -    CXX_O_FLAG_HI="$C_O_FLAG_HI"
   1.928 -    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
   1.929 -    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
   1.930 -    ;;
   1.931 -esac
   1.932 +          CFLAGS_DEBUG_SYMBOLS="-g -xs"
   1.933 +          CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
   1.934 +      esac
   1.935 +      ;;
   1.936 +    CL )
   1.937 +      C_O_FLAG_HIGHEST="-O2"
   1.938 +      C_O_FLAG_HI="-O1"
   1.939 +      C_O_FLAG_NORM="-O1"
   1.940 +      C_O_FLAG_NONE="-Od"
   1.941 +      CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
   1.942 +      CXX_O_FLAG_HI="$C_O_FLAG_HI"
   1.943 +      CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
   1.944 +      CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
   1.945 +      ;;
   1.946 +  esac
   1.947  
   1.948 -if test -z "$C_O_FLAG_HIGHEST"; then
   1.949 -   C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
   1.950 -fi
   1.951 +  if test -z "$C_O_FLAG_HIGHEST"; then
   1.952 +    C_O_FLAG_HIGHEST="$C_O_FLAG_HI"
   1.953 +  fi
   1.954  
   1.955 -if test -z "$CXX_O_FLAG_HIGHEST"; then
   1.956 -   CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
   1.957 -fi
   1.958 +  if test -z "$CXX_O_FLAG_HIGHEST"; then
   1.959 +    CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI"
   1.960 +  fi
   1.961  
   1.962 -AC_SUBST(C_O_FLAG_HIGHEST)
   1.963 -AC_SUBST(C_O_FLAG_HI)
   1.964 -AC_SUBST(C_O_FLAG_NORM)
   1.965 -AC_SUBST(C_O_FLAG_NONE)
   1.966 -AC_SUBST(CXX_O_FLAG_HIGHEST)
   1.967 -AC_SUBST(CXX_O_FLAG_HI)
   1.968 -AC_SUBST(CXX_O_FLAG_NORM)
   1.969 -AC_SUBST(CXX_O_FLAG_NONE)
   1.970 -AC_SUBST(C_FLAG_DEPS)
   1.971 -AC_SUBST(CXX_FLAG_DEPS)
   1.972 +  AC_SUBST(C_O_FLAG_HIGHEST)
   1.973 +  AC_SUBST(C_O_FLAG_HI)
   1.974 +  AC_SUBST(C_O_FLAG_NORM)
   1.975 +  AC_SUBST(C_O_FLAG_NONE)
   1.976 +  AC_SUBST(CXX_O_FLAG_HIGHEST)
   1.977 +  AC_SUBST(CXX_O_FLAG_HI)
   1.978 +  AC_SUBST(CXX_O_FLAG_NORM)
   1.979 +  AC_SUBST(CXX_O_FLAG_NONE)
   1.980 +  AC_SUBST(C_FLAG_DEPS)
   1.981 +  AC_SUBST(CXX_FLAG_DEPS)
   1.982  ])
   1.983  
   1.984  AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK],
   1.985  [
   1.986  
   1.987 -if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
   1.988 -   AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
   1.989 -fi
   1.990 +  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
   1.991 +    AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
   1.992 +  fi
   1.993  
   1.994 -if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
   1.995 -   AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags])
   1.996 -fi
   1.997 +  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
   1.998 +    AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags])
   1.999 +  fi
  1.1000  
  1.1001 -if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
  1.1002 -   AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags])
  1.1003 -fi
  1.1004 +  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
  1.1005 +    AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags])
  1.1006 +  fi
  1.1007  
  1.1008 -AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags],
  1.1009 -    [extra flags to be used when compiling jdk c-files])])
  1.1010 +  AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags],
  1.1011 +      [extra flags to be used when compiling jdk c-files])])
  1.1012  
  1.1013 -AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags],
  1.1014 -    [extra flags to be used when compiling jdk c++-files])])
  1.1015 +  AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags],
  1.1016 +      [extra flags to be used when compiling jdk c++-files])])
  1.1017  
  1.1018 -AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
  1.1019 -    [extra flags to be used when linking jdk])])
  1.1020 +  AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
  1.1021 +      [extra flags to be used when linking jdk])])
  1.1022  
  1.1023 -CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
  1.1024 -CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
  1.1025 -LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
  1.1026 +  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
  1.1027 +  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
  1.1028 +  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
  1.1029  
  1.1030 -# Hotspot needs these set in their legacy form
  1.1031 -LEGACY_EXTRA_CFLAGS=$with_extra_cflags
  1.1032 -LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
  1.1033 -LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
  1.1034 +  # Hotspot needs these set in their legacy form
  1.1035 +  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
  1.1036 +  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
  1.1037 +  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
  1.1038  
  1.1039 -AC_SUBST(LEGACY_EXTRA_CFLAGS)
  1.1040 -AC_SUBST(LEGACY_EXTRA_CXXFLAGS)
  1.1041 -AC_SUBST(LEGACY_EXTRA_LDFLAGS)
  1.1042 +  AC_SUBST(LEGACY_EXTRA_CFLAGS)
  1.1043 +  AC_SUBST(LEGACY_EXTRA_CXXFLAGS)
  1.1044 +  AC_SUBST(LEGACY_EXTRA_LDFLAGS)
  1.1045  
  1.1046 -###############################################################################
  1.1047 -#
  1.1048 -# Now setup the CFLAGS and LDFLAGS for the JDK build.
  1.1049 -# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
  1.1050 -#
  1.1051 -case $COMPILER_NAME in
  1.1052 -      gcc )
  1.1053 -      	  CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
  1.1054 -                          -pipe \
  1.1055 -                          -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
  1.1056 -	  case $OPENJDK_TARGET_CPU_ARCH in
  1.1057 -	  arm )
  1.1058 -            # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
  1.1059 -	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
  1.1060 -	  ;;
  1.1061 -	  ppc )
  1.1062 -            # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
  1.1063 -	  ;;
  1.1064 -	  * )
  1.1065 -	    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
  1.1066 -	    CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
  1.1067 +  ###############################################################################
  1.1068 +  #
  1.1069 +  # Now setup the CFLAGS and LDFLAGS for the JDK build.
  1.1070 +  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
  1.1071 +  #
  1.1072 +  case $COMPILER_NAME in
  1.1073 +    gcc )
  1.1074 +      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
  1.1075 +      -pipe \
  1.1076 +      -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
  1.1077 +      case $OPENJDK_TARGET_CPU_ARCH in
  1.1078 +        arm )
  1.1079 +          # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
  1.1080 +          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
  1.1081            ;;
  1.1082 -	  esac
  1.1083 +        ppc )
  1.1084 +          # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
  1.1085            ;;
  1.1086 -      ossc )
  1.1087 -          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
  1.1088 -          case $OPENJDK_TARGET_CPU_ARCH in
  1.1089 -          x86 )
  1.1090 -            CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
  1.1091 -       	    CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
  1.1092 +        * )
  1.1093 +          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
  1.1094 +          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
  1.1095            ;;
  1.1096 -          esac
  1.1097 +      esac
  1.1098 +      ;;
  1.1099 +    ossc )
  1.1100 +      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
  1.1101 +      case $OPENJDK_TARGET_CPU_ARCH in
  1.1102 +        x86 )
  1.1103 +          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
  1.1104 +          CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
  1.1105 +          ;;
  1.1106 +      esac
  1.1107  
  1.1108 -      	  CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
  1.1109 -      	  CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
  1.1110 +      CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
  1.1111 +      CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
  1.1112  
  1.1113 -          LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
  1.1114 -          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
  1.1115 +      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
  1.1116 +      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
  1.1117 +      ;;
  1.1118 +    cl )
  1.1119 +      CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
  1.1120 +      -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
  1.1121 +      -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
  1.1122 +      -DWIN32 -DIAL"
  1.1123 +      case $OPENJDK_TARGET_CPU in
  1.1124 +        x86 )
  1.1125 +          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
  1.1126            ;;
  1.1127 -      cl )
  1.1128 -          CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
  1.1129 -               -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
  1.1130 -	       -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
  1.1131 -	       -DWIN32 -DIAL"
  1.1132 -          case $OPENJDK_TARGET_CPU in
  1.1133 -              x86 )
  1.1134 -                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
  1.1135 -                  ;;
  1.1136 -              x86_64 )
  1.1137 -                  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
  1.1138 -                  ;;
  1.1139 -          esac
  1.1140 +        x86_64 )
  1.1141 +          CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
  1.1142            ;;
  1.1143 -esac
  1.1144 +      esac
  1.1145 +      ;;
  1.1146 +  esac
  1.1147  
  1.1148 -###############################################################################
  1.1149 +  ###############################################################################
  1.1150  
  1.1151 -# Adjust flags according to debug level.
  1.1152 -case $DEBUG_LEVEL in
  1.1153 -      fastdebug )
  1.1154 -              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
  1.1155 -              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
  1.1156 -	      C_O_FLAG_HI="$C_O_FLAG_NORM"
  1.1157 -	      C_O_FLAG_NORM="$C_O_FLAG_NORM"
  1.1158 -	      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
  1.1159 -	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
  1.1160 -              JAVAC_FLAGS="$JAVAC_FLAGS -g"
  1.1161 -              ;;
  1.1162 -      slowdebug )
  1.1163 -              CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
  1.1164 -              CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
  1.1165 -	      C_O_FLAG_HI="$C_O_FLAG_NONE"
  1.1166 -	      C_O_FLAG_NORM="$C_O_FLAG_NONE"
  1.1167 -	      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
  1.1168 -	      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
  1.1169 -              JAVAC_FLAGS="$JAVAC_FLAGS -g"
  1.1170 -              ;;
  1.1171 -esac
  1.1172 +  # Adjust flags according to debug level.
  1.1173 +  case $DEBUG_LEVEL in
  1.1174 +    fastdebug )
  1.1175 +      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
  1.1176 +      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
  1.1177 +      C_O_FLAG_HI="$C_O_FLAG_NORM"
  1.1178 +      C_O_FLAG_NORM="$C_O_FLAG_NORM"
  1.1179 +      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
  1.1180 +      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
  1.1181 +      JAVAC_FLAGS="$JAVAC_FLAGS -g"
  1.1182 +      ;;
  1.1183 +    slowdebug )
  1.1184 +      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
  1.1185 +      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
  1.1186 +      C_O_FLAG_HI="$C_O_FLAG_NONE"
  1.1187 +      C_O_FLAG_NORM="$C_O_FLAG_NONE"
  1.1188 +      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
  1.1189 +      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
  1.1190 +      JAVAC_FLAGS="$JAVAC_FLAGS -g"
  1.1191 +      ;;
  1.1192 +  esac
  1.1193  
  1.1194 -CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
  1.1195 +  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
  1.1196  
  1.1197 -# The package path is used only on macosx?
  1.1198 -PACKAGE_PATH=/opt/local
  1.1199 -AC_SUBST(PACKAGE_PATH)
  1.1200 +  # The package path is used only on macosx?
  1.1201 +  PACKAGE_PATH=/opt/local
  1.1202 +  AC_SUBST(PACKAGE_PATH)
  1.1203  
  1.1204 -if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
  1.1205 +  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
  1.1206      # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
  1.1207      #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
  1.1208      #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
  1.1209      #   Note: -Dmacro         is the same as    #define macro 1
  1.1210 -    #         -Dmacro=	    is the same as    #define macro
  1.1211 +    #         -Dmacro=        is the same as    #define macro
  1.1212      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
  1.1213 -        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
  1.1214 +      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
  1.1215      else
  1.1216 -        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
  1.1217 +      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
  1.1218      fi
  1.1219 -else
  1.1220 +  else
  1.1221      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
  1.1222 -fi
  1.1223 -if test "x$OPENJDK_TARGET_OS" = xlinux; then
  1.1224 +  fi
  1.1225 +  if test "x$OPENJDK_TARGET_OS" = xlinux; then
  1.1226      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX"
  1.1227 -fi
  1.1228 -if test "x$OPENJDK_TARGET_OS" = xwindows; then
  1.1229 +  fi
  1.1230 +  if test "x$OPENJDK_TARGET_OS" = xwindows; then
  1.1231      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS"
  1.1232 -fi
  1.1233 -if test "x$OPENJDK_TARGET_OS" = xsolaris; then
  1.1234 +  fi
  1.1235 +  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
  1.1236      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS"
  1.1237 -fi
  1.1238 -if test "x$OPENJDK_TARGET_OS" = xmacosx; then
  1.1239 +  fi
  1.1240 +  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
  1.1241      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
  1.1242      # Setting these parameters makes it an error to link to macosx APIs that are
  1.1243      # newer than the given OS version and makes the linked binaries compatible even
  1.1244 @@ -919,118 +921,118 @@
  1.1245      # command line.
  1.1246      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
  1.1247      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
  1.1248 -fi
  1.1249 -if test "x$OPENJDK_TARGET_OS" = xbsd; then
  1.1250 +  fi
  1.1251 +  if test "x$OPENJDK_TARGET_OS" = xbsd; then
  1.1252      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"
  1.1253 -fi
  1.1254 -if test "x$DEBUG_LEVEL" = xrelease; then
  1.1255 +  fi
  1.1256 +  if test "x$DEBUG_LEVEL" = xrelease; then
  1.1257      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
  1.1258 -    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
  1.1259 -        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
  1.1260 -    fi
  1.1261 -else
  1.1262 +  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
  1.1263 +    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
  1.1264 +  fi
  1.1265 +  else
  1.1266      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
  1.1267 -fi
  1.1268 +  fi
  1.1269  
  1.1270 -CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
  1.1271 -CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
  1.1272 +  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
  1.1273 +  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'"
  1.1274  
  1.1275 -CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
  1.1276 -        -I${JDK_OUTPUTDIR}/include \
  1.1277 -        -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
  1.1278 -        -I${JDK_TOPDIR}/src/share/javavm/export \
  1.1279 -        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
  1.1280 -        -I${JDK_TOPDIR}/src/share/native/common \
  1.1281 -        -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
  1.1282 +  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
  1.1283 +      -I${JDK_OUTPUTDIR}/include \
  1.1284 +      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
  1.1285 +      -I${JDK_TOPDIR}/src/share/javavm/export \
  1.1286 +      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/javavm/export \
  1.1287 +      -I${JDK_TOPDIR}/src/share/native/common \
  1.1288 +      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
  1.1289  
  1.1290 -# The shared libraries are compiled using the picflag.
  1.1291 -CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
  1.1292 -CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
  1.1293 +  # The shared libraries are compiled using the picflag.
  1.1294 +  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
  1.1295 +  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
  1.1296  
  1.1297 -# Executable flags
  1.1298 -CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
  1.1299 -CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
  1.1300 +  # Executable flags
  1.1301 +  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
  1.1302 +  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
  1.1303  
  1.1304 -# Now this is odd. The JDK native libraries have to link against libjvm.so
  1.1305 -# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
  1.1306 -# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
  1.1307 -# is identical for client and server? Yes. Which is picked at runtime (client or server)?
  1.1308 -# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
  1.1309 -# libraries will link to whatever is in memory. Yuck.
  1.1310 -#
  1.1311 -# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
  1.1312 -if test "x$COMPILER_NAME" = xcl; then
  1.1313 +  # Now this is odd. The JDK native libraries have to link against libjvm.so
  1.1314 +  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
  1.1315 +  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
  1.1316 +  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
  1.1317 +  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
  1.1318 +  # libraries will link to whatever is in memory. Yuck.
  1.1319 +  #
  1.1320 +  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
  1.1321 +  if test "x$COMPILER_NAME" = xcl; then
  1.1322      LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
  1.1323      if test "x$OPENJDK_TARGET_CPU" = xx86; then
  1.1324 -        LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
  1.1325 +      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
  1.1326      fi
  1.1327      # TODO: make -debug optional "--disable-full-debug-symbols"
  1.1328      LDFLAGS_JDK="$LDFLAGS_JDK -debug"
  1.1329      LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
  1.1330      LDFLAGS_JDKLIB_SUFFIX=""
  1.1331      if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
  1.1332 -        LDFLAGS_STACK_SIZE=1048576
  1.1333 +      LDFLAGS_STACK_SIZE=1048576
  1.1334      else
  1.1335 -        LDFLAGS_STACK_SIZE=327680
  1.1336 +      LDFLAGS_STACK_SIZE=327680
  1.1337      fi
  1.1338      LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
  1.1339 -else
  1.1340 +  else
  1.1341      if test "x$COMPILER_NAME" = xgcc; then
  1.1342 -        # If this is a --hash-style=gnu system, use --hash-style=both, why?
  1.1343 -        HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
  1.1344 -        if test -n "$HAS_GNU_HASH"; then
  1.1345 -            LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
  1.1346 +      # If this is a --hash-style=gnu system, use --hash-style=both, why?
  1.1347 +      HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
  1.1348 +      if test -n "$HAS_GNU_HASH"; then
  1.1349 +        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
  1.1350 +      fi
  1.1351 +      if test "x$OPENJDK_TARGET_OS" = xlinux; then
  1.1352 +        # And since we now know that the linker is gnu, then add -z defs, to forbid
  1.1353 +        # undefined symbols in object files.
  1.1354 +        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
  1.1355 +        if test "x$DEBUG_LEVEL" = "xrelease"; then
  1.1356 +          # When building release libraries, tell the linker optimize them.
  1.1357 +          # Should this be supplied to the OSS linker as well?
  1.1358 +          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
  1.1359          fi
  1.1360 -        if test "x$OPENJDK_TARGET_OS" = xlinux; then
  1.1361 -          # And since we now know that the linker is gnu, then add -z defs, to forbid
  1.1362 -          # undefined symbols in object files.
  1.1363 -          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
  1.1364 -          if test "x$DEBUG_LEVEL" = "xrelease"; then
  1.1365 -              # When building release libraries, tell the linker optimize them.
  1.1366 -              # Should this be supplied to the OSS linker as well?
  1.1367 -              LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
  1.1368 -          fi
  1.1369 -        fi
  1.1370 +      fi
  1.1371      fi
  1.1372      LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
  1.1373 -                    -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
  1.1374 +        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
  1.1375  
  1.1376      # On some platforms (mac) the linker warns about non existing -L dirs.
  1.1377      # Add server first if available. Linking aginst client does not always produce the same results.
  1.1378      # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
  1.1379      # Default to server for other variants.
  1.1380      if test "x$JVM_VARIANT_SERVER" = xtrue; then
  1.1381 -        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
  1.1382 +      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
  1.1383      elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
  1.1384 -        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
  1.1385 +      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
  1.1386      elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
  1.1387 -        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
  1.1388 +      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
  1.1389      else
  1.1390 -        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
  1.1391 +      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
  1.1392      fi
  1.1393  
  1.1394      LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
  1.1395      if test "x$COMPILER_NAME" = xossc; then
  1.1396 -        LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
  1.1397 +      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
  1.1398      fi
  1.1399  
  1.1400      LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
  1.1401      if test "x$OPENJDK_TARGET_OS" = xlinux; then
  1.1402 -        LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
  1.1403 +      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
  1.1404      fi
  1.1405 -fi
  1.1406 +  fi
  1.1407  
  1.1408 -AC_SUBST(CFLAGS_JDKLIB)
  1.1409 -AC_SUBST(CFLAGS_JDKEXE)
  1.1410 +  AC_SUBST(CFLAGS_JDKLIB)
  1.1411 +  AC_SUBST(CFLAGS_JDKEXE)
  1.1412  
  1.1413 -AC_SUBST(CXXFLAGS_JDKLIB)
  1.1414 -AC_SUBST(CXXFLAGS_JDKEXE)
  1.1415 +  AC_SUBST(CXXFLAGS_JDKLIB)
  1.1416 +  AC_SUBST(CXXFLAGS_JDKEXE)
  1.1417  
  1.1418 -AC_SUBST(LDFLAGS_JDKLIB)
  1.1419 -AC_SUBST(LDFLAGS_JDKEXE)
  1.1420 -AC_SUBST(LDFLAGS_JDKLIB_SUFFIX)
  1.1421 -AC_SUBST(LDFLAGS_JDKEXE_SUFFIX)
  1.1422 -AC_SUBST(LDFLAGS_CXX_JDK)
  1.1423 +  AC_SUBST(LDFLAGS_JDKLIB)
  1.1424 +  AC_SUBST(LDFLAGS_JDKEXE)
  1.1425 +  AC_SUBST(LDFLAGS_JDKLIB_SUFFIX)
  1.1426 +  AC_SUBST(LDFLAGS_JDKEXE_SUFFIX)
  1.1427 +  AC_SUBST(LDFLAGS_CXX_JDK)
  1.1428  ])
  1.1429  
  1.1430  
  1.1431 @@ -1046,18 +1048,16 @@
  1.1432    saved_cflags="$CFLAGS"
  1.1433    CFLAGS="$CFLAGS $1"
  1.1434    AC_LANG_PUSH([C])
  1.1435 -  AC_COMPILE_IFELSE([
  1.1436 -    AC_LANG_SOURCE([[int i;]])
  1.1437 -  ], [], [supports=no])
  1.1438 +  AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int i;]])], [], 
  1.1439 +      [supports=no])
  1.1440    AC_LANG_POP([C])
  1.1441    CFLAGS="$saved_cflags"
  1.1442  
  1.1443    saved_cxxflags="$CXXFLAGS"
  1.1444    CXXFLAGS="$CXXFLAG $1"
  1.1445    AC_LANG_PUSH([C++])
  1.1446 -  AC_COMPILE_IFELSE([
  1.1447 -    AC_LANG_SOURCE([[int i;]])
  1.1448 -  ], [], [supports=no])
  1.1449 +  AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int i;]])], [], 
  1.1450 +      [supports=no])
  1.1451    AC_LANG_POP([C++])
  1.1452    CXXFLAGS="$saved_cxxflags"
  1.1453  
  1.1454 @@ -1086,8 +1086,8 @@
  1.1455    # Check that the compiler supports -mX flags
  1.1456    # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
  1.1457    TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([-m${OPENJDK_TARGET_CPU_BITS}],
  1.1458 -    [COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
  1.1459 -    [COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
  1.1460 +      [COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
  1.1461 +      [COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
  1.1462    AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG)
  1.1463  ])
  1.1464  
  1.1465 @@ -1095,9 +1095,9 @@
  1.1466  AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
  1.1467  [
  1.1468    AC_ARG_WITH(jtreg, [AS_HELP_STRING([--with-jtreg],
  1.1469 -  [Regression Test Harness @<:@probed@:>@])],
  1.1470 -  [],
  1.1471 -  [with_jtreg=no])
  1.1472 +      [Regression Test Harness @<:@probed@:>@])],
  1.1473 +      [],
  1.1474 +      [with_jtreg=no])
  1.1475  
  1.1476    if test "x$with_jtreg" = xno; then
  1.1477      # jtreg disabled

mercurial