common/autoconf/toolchain_windows.m4

changeset 2219
cb1203f48728
parent 2209
cddffb220808
child 2220
47fda751abb6
     1.1 --- a/common/autoconf/toolchain_windows.m4	Wed Apr 18 12:37:18 2018 -0700
     1.2 +++ b/common/autoconf/toolchain_windows.m4	Tue Apr 17 09:33:36 2018 -0700
     1.3 @@ -244,12 +244,22 @@
     1.4      # Need to check if the found msvcr is correct architecture
     1.5      AC_MSG_CHECKING([found msvcr100.dll architecture])
     1.6      MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
     1.7 -    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
     1.8 -      CORRECT_MSVCR_ARCH=386
     1.9 +    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
    1.10 +      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
    1.11 +      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
    1.12 +      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
    1.13 +        CORRECT_MSVCR_ARCH="PE32 executable"
    1.14 +      else
    1.15 +        CORRECT_MSVCR_ARCH="PE32+ executable"
    1.16 +      fi
    1.17      else
    1.18 -      CORRECT_MSVCR_ARCH=x86-64
    1.19 +      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
    1.20 +        CORRECT_MSVCR_ARCH=386
    1.21 +      else
    1.22 +        CORRECT_MSVCR_ARCH=x86-64
    1.23 +      fi
    1.24      fi
    1.25 -    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
    1.26 +    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
    1.27        AC_MSG_RESULT([ok])
    1.28        MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
    1.29        AC_MSG_CHECKING([for msvcr100.dll])

mercurial