diff options
author | Alexey Ushakov <Alexey.Ushakov@jetbrains.com> | 2018-04-03 12:17:06 +0300 |
---|---|---|
committer | Alexey Ushakov <Alexey.Ushakov@jetbrains.com> | 2018-04-03 12:17:06 +0300 |
commit | 6d47516721bb6ee116465db66f92ccb040377e23 (patch) | |
tree | 83c9fd466a65f108aef3dd94c35347cceac02038 | |
parent | b8bb01069e7907560ab6f726d99935f4913fba4b (diff) | |
download | jdk8u-6d47516721bb6ee116465db66f92ccb040377e23.tar.gz |
JRE-718 Support VS2013 in JBRE buildjb8u152-b1267jb8u152-b1265jb8u152-b1263jb8u152-b1262jb8u152-b1261jb8u152-b1253jb8u152-b1251jb8u152-b1250jb8u152-b1248.9jb8u152-b1248.8jb8u152-b1248.7jb8u152-b1248.6jb8u152-b1248.5jb8u152-b1248.4jb8u152-b1248.3jb8u152-b1248.22jb8u152-b1248.21jb8u152-b1248.20jb8u152-b1248.19jb8u152-b1248.18jb8u152-b1248.17jb8u152-b1248.16jb8u152-b1248.15jb8u152-b1248.14jb8u152-b1248.1jb8u152-b1248jb8u152-b1239.3jb8u152-b1239.2jb8u152-b1239.1jb8u152-b1239jb8u152-b1238jb8u152-b1237jb8u152-b1236jb8u152-b1235jb8u152-b1234jb8u152-b1233jb8u152-b1232jb8u152-b1231jb8u152-b1229jb8u152-b1228jb8u152-b1227jb8u152-b1226.9jb8u152-b1226.8jb8u152-b1226.7jb8u152-b1226.6jb8u152-b1226.3jb8u152-b1226.2jb8u152-b1226.10jb8u152-b1226.1jb8u152-b1226jb8u152-b1224jb8u152-b1221jb8u152-b1220jb8u152-b1219jb8u152-b1218jb8u152-b1217jb8u152-b1216
Updated build scripts to support VS2013
-rw-r--r-- | common/autoconf/basics_windows.m4 | 6 | ||||
-rw-r--r-- | common/autoconf/generated-configure.sh | 54 | ||||
-rw-r--r-- | common/autoconf/toolchain.m4 | 10 | ||||
-rw-r--r-- | common/autoconf/toolchain_windows.m4 | 16 |
4 files changed, 69 insertions, 17 deletions
diff --git a/common/autoconf/basics_windows.m4 b/common/autoconf/basics_windows.m4 index df3b3bf..31b9817 100644 --- a/common/autoconf/basics_windows.m4 +++ b/common/autoconf/basics_windows.m4 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -321,8 +321,8 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS], AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path]) fi AC_MSG_CHECKING([cygwin root directory as unix-style path]) - # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away - cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"` + # The cmd output ends with Windows line endings (CR/LF) + cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'` # Force cygpath to report the proper root by including a trailing space, and then stripping it off again. CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "` AC_MSG_RESULT([$CYGWIN_ROOT_PATH]) diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index 99257c8..cc27fc7 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -3239,7 +3239,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # -# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -3912,7 +3912,7 @@ fi #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1468207795 +DATE_WHEN_GENERATED=1522743827 ############################################################################### # @@ -7310,8 +7310,8 @@ $as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but a fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; } - # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away - cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"` + # The cmd output ends with Windows line endings (CR/LF) + cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'` # Force cygpath to report the proper root by including a trailing space, and then stripping it off again. CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5 @@ -16980,6 +16980,7 @@ $as_echo "no" >&6; } if test "x$with_toolsdir" != x; then if test "x$VS_ENV_CMD" = x; then + VS_VERSION="2010" VS100BASE="$with_toolsdir/../.." METHOD="--with-tools-dir" @@ -17021,6 +17022,7 @@ $as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio if test "x$VS100COMNTOOLS" != x; then if test "x$VS_ENV_CMD" = x; then + VS_VERSION="2010" VS100BASE="$VS100COMNTOOLS/../.." METHOD="VS100COMNTOOLS variable" @@ -17051,6 +17053,7 @@ $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studi if test "x$PROGRAMFILES" != x; then if test "x$VS_ENV_CMD" = x; then + VS_VERSION="2010" VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0" METHOD="well-known name" @@ -17080,6 +17083,7 @@ $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studi fi if test "x$VS_ENV_CMD" = x; then + VS_VERSION="2010" VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0" METHOD="well-known name" @@ -17108,6 +17112,7 @@ $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studi if test "x$VS_ENV_CMD" = x; then + VS_VERSION="2010" VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0" METHOD="well-known name" @@ -17135,6 +17140,35 @@ $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studi fi + if test "x$VS_ENV_CMD" = x; then + VS_VERSION="2013" + VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 12.0" + METHOD="well-known name" + + windows_path="$VS100BASE" + if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then + unix_path=`$CYGPATH -u "$windows_path"` + VS100BASE="$unix_path" + elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then + unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'` + VS100BASE="$unix_path" + fi + + if test -d "$VS100BASE"; then + if test -f "$VS100BASE/$VCVARSFILE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 +$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} + VS_ENV_CMD="$VS100BASE/$VCVARSFILE" + else + { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5 +$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5 +$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;} + fi + fi + fi + + if test "x$ProgramW6432" != x; then if test "x$VS_ENV_CMD" = x; then @@ -29734,6 +29768,7 @@ fi COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \ -pipe \ -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" + CXXSTD_CXXFLAG="-std=gnu++98" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG $CFLAGS_WARNINGS_ARE_ERRORS\"" >&5 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG $CFLAGS_WARNINGS_ARE_ERRORS\"... " >&6; } @@ -29785,7 +29820,6 @@ $as_echo "$supports" >&6; } ;; * ) COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer" - CXXFLAGS_JDK="$CXXFLAGS_JDK -std=gnu++98" CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing" ;; esac @@ -30031,8 +30065,16 @@ $as_echo "$supports" >&6; } LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK" ;; cl ) + # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to + # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual + # studio. + STATIC_CPPLIB_FLAGS="" + if test "x$VS_VERSION" = "x2010"; then + STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB" + fi + COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \ - -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \ + $STATIC_CPPLIB_FLAGS -DWIN32_LEAN_AND_MEAN \ -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \ -DWIN32 -DIAL" case $OPENJDK_TARGET_CPU in diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4 index b5a09b3..e8c034f 100644 --- a/common/autoconf/toolchain.m4 +++ b/common/autoconf/toolchain.m4 @@ -1064,8 +1064,16 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK], LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK" ;; cl ) + # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to + # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual + # studio. + STATIC_CPPLIB_FLAGS="" + if test "x$VS_VERSION" = "x2010"; then + STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB" + fi + COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \ - -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \ + $STATIC_CPPLIB_FLAGS -DWIN32_LEAN_AND_MEAN \ -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \ -DWIN32 -DIAL" case $OPENJDK_TARGET_CPU in diff --git a/common/autoconf/toolchain_windows.m4 b/common/autoconf/toolchain_windows.m4 index 37da555..df050ba 100644 --- a/common/autoconf/toolchain_windows.m4 +++ b/common/autoconf/toolchain_windows.m4 @@ -26,8 +26,9 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT], [ if test "x$VS_ENV_CMD" = x; then - VS100BASE="$1" - METHOD="$2" + VS_VERSION="$1" + VS100BASE="$2" + METHOD="$3" BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS100BASE) if test -d "$VS100BASE"; then if test -f "$VS100BASE/$VCVARSFILE"; then @@ -80,7 +81,7 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE], VS_ENV_CMD="" VS_ENV_ARGS="" if test "x$with_toolsdir" != x; then - TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$with_toolsdir/../..], [--with-tools-dir]) + TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([2010], [$with_toolsdir/../..], [--with-tools-dir]) fi if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then @@ -92,13 +93,14 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE], fi if test "x$VS100COMNTOOLS" != x; then - TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$VS100COMNTOOLS/../..], [VS100COMNTOOLS variable]) + TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([2010], [$VS100COMNTOOLS/../..], [VS100COMNTOOLS variable]) fi if test "x$PROGRAMFILES" != x; then - TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$PROGRAMFILES/Microsoft Visual Studio 10.0], [well-known name]) + TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([2010], [$PROGRAMFILES/Microsoft Visual Studio 10.0], [well-known name]) fi - TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([C:/Program Files/Microsoft Visual Studio 10.0], [well-known name]) - TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([C:/Program Files (x86)/Microsoft Visual Studio 10.0], [well-known name]) + TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([2010], [C:/Program Files/Microsoft Visual Studio 10.0], [well-known name]) + TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([2010], [C:/Program Files (x86)/Microsoft Visual Studio 10.0], [well-known name]) + TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([2013], [C:/Program Files (x86)/Microsoft Visual Studio 12.0], [well-known name]) if test "x$ProgramW6432" != x; then TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin], [well-known name]) |