Kaydet (Commit) 9cf5f41b authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Cleanups and hacks on the start of support for 64-bit Windows build

* configure.in: Look for the x64 assembler ml64.exe when building 64-bit
  binaries, not ml.exe. Use the 64-bit tools in VC/bin/amd64, not
  the 32-bit cross-compiling tools in VC/bin/x86_amd64. We can
  currently build 64-bit only on a 64-bit OS anyway, for instance
  because of the unit tests.

* set_soenv.in: Set CPUNAME, CPU and OUTPATH appropriately for
  64-bit build. We end up with "wntsmcx12" for 64-bit MSVC 2008
  build. Drop sections for no longer supported MSVC versions. Don't
  talk about ".NET 2005" etc, ".NET" was part of the MS suite product
  name only in the 2003 version. Add Emacs and vim mode lines.
üst 7f761bde
...@@ -1223,9 +1223,9 @@ AC_ARG_WITH(unix-wrapper, ...@@ -1223,9 +1223,9 @@ AC_ARG_WITH(unix-wrapper,
AC_ARG_WITH(asm-home, AC_ARG_WITH(asm-home,
AS_HELP_STRING([--with-asm-home], AS_HELP_STRING([--with-asm-home],
[For Windows users, please supply the path for the ml.exe assembler.]) [For Windows, please supply the path for the ml.exe or ml64.exe assembler.])
[ [
Usage: --with-asm-home=<path to ml.exe directory> Usage: --with-asm-home=<path to assembler directory>
], ],
,) ,)
...@@ -2141,12 +2141,12 @@ if test "$_os" = "WINNT"; then ...@@ -2141,12 +2141,12 @@ if test "$_os" = "WINNT"; then
AC_MSG_CHECKING([for a friendly Microsoft C/C++ compiler installation path]) AC_MSG_CHECKING([for a friendly Microsoft C/C++ compiler installation path])
if test -z "$with_cl_home"; then if test -z "$with_cl_home"; then
vctest=`./oowintool --msvc-productdir`; vctest=`./oowintool --msvc-productdir`;
if test "$enable_cl_x64" = "" -o "$enable_cl_x64" = "no"; then if test $CL_X64 = ""; then
if test -x "$vctest/bin/cl.exe"; then if test -x "$vctest/bin/cl.exe"; then
with_cl_home=$vctest; with_cl_home=$vctest;
fi fi
else else
if test -x "$vctest/bin/x86_amd64/cl.exe"; then if test -x "$vctest/bin/amd64/cl.exe"; then
with_cl_home=$vctest; with_cl_home=$vctest;
fi fi
fi fi
...@@ -2194,15 +2194,15 @@ if test "$_os" = "WINNT"; then ...@@ -2194,15 +2194,15 @@ if test "$_os" = "WINNT"; then
PATH="$MSPDB_PATH:$PATH" PATH="$MSPDB_PATH:$PATH"
AC_MSG_CHECKING([the Microsoft C/C++ Compiler]) AC_MSG_CHECKING([the Microsoft C/C++ Compiler])
if test "$enable_cl_x64" = "" -o "$enable_cl_x64" = "no"; then if test $CL_X64 = ""; then
if test -x "$with_cl_home/bin/cl.exe"; then if test -x "$with_cl_home/bin/cl.exe"; then
CC="$with_cl_home/bin/cl.exe" CC="$with_cl_home/bin/cl.exe"
fi fi
else else
if test -x "$with_cl_home/bin/x86_amd64/cl.exe"; then if test -x "$with_cl_home/bin/amd64/cl.exe"; then
CC="$with_cl_home/bin/x86_amd64/cl.exe" CC="$with_cl_home/bin/amd64/cl.exe"
fi fi
fi fi
if test -z "$CC"; then if test -z "$CC"; then
AC_PATH_PROG(CC, cl.exe) AC_PATH_PROG(CC, cl.exe)
fi fi
...@@ -2213,7 +2213,7 @@ if test "$_os" = "WINNT"; then ...@@ -2213,7 +2213,7 @@ if test "$_os" = "WINNT"; then
CC=`cygpath -u "$CC"` CC=`cygpath -u "$CC"`
# Remove /cl.exe from CC case insensitive # Remove /cl.exe from CC case insensitive
AC_MSG_RESULT([found ($CC)]) AC_MSG_RESULT([found ($CC)])
if test "$enable_cl_x64" = "" -o "$enable_cl_x64" = "no"; then if test $CL_X64 = ""; then
COMPATH=`echo $CC | $SED 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]]@@'` COMPATH=`echo $CC | $SED 's@\/[[Bb]][[Ii]][[Nn]]\/[[cC]][[lL]]\.[[eE]][[xX]][[eE]]@@'`
else else
if test -n "$with_cl_home"; then if test -n "$with_cl_home"; then
...@@ -6051,21 +6051,28 @@ fi ...@@ -6051,21 +6051,28 @@ fi
AC_SUBST(CYGWIN_PATH) AC_SUBST(CYGWIN_PATH)
dnl *************************************** dnl ***************************************
dnl testing ml.exe assembler path dnl testing assembler path
dnl *************************************** dnl ***************************************
if test $CL_X64 = ""; then
assembler=ml.exe
assembler_bin=bin
else
assembler=ml64.exe
assembler_bin=bin/amd64
fi
if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then
AC_MSG_CHECKING([ml.exe assembler path]) AC_MSG_CHECKING([$assembler assembler path])
if test -n "$with_asm_home"; then if test -n "$with_asm_home"; then
with_asm_home=`cygpath -u "$with_asm_home"` with_asm_home=`cygpath -u "$with_asm_home"`
fi fi
if test ! -x "$with_asm_home/ml.exe"; then if test ! -x "$with_asm_home/$assembler"; then
AC_PATH_PROG(ML_EXE, ml.exe) AC_PATH_PROG(ML_EXE, $assembler)
if test -z "$ML_EXE"; then if test -z "$ML_EXE"; then
if test -x "$with_cl_home/bin/ml.exe"; then if test -x "$with_cl_home/$assembler_bin/$assembler"; then
with_asm_home=$with_cl_home/bin with_asm_home=$with_cl_home/$assembler_bin
AC_MSG_RESULT([found ($with_asm_home)]) AC_MSG_RESULT([found ($with_asm_home)])
else else
AC_MSG_ERROR([Configure did not find ml.exe assembler.]) AC_MSG_ERROR([Configure did not find $assembler assembler.])
fi fi
else else
with_asm_home="ASM_IN_PATH" with_asm_home="ASM_IN_PATH"
......
...@@ -683,7 +683,9 @@ elsif ( $platform =~ m/cygwin/ ) ...@@ -683,7 +683,9 @@ elsif ( $platform =~ m/cygwin/ )
$FRAME_HOME = PathFormat('@FRAME_HOME@'); $FRAME_HOME = PathFormat('@FRAME_HOME@');
$USE_NEW_SDK = "TRUE"; $USE_NEW_SDK = "TRUE";
$CPUNAME = "INTEL"; $CPUNAME = "INTEL";
$CPUNAME = "X86_64" if $CL_X64;
$CPU = "I"; $CPU = "I";
$CPU = "X" if $CL_X64;
$GUI = "WNT"; $GUI = "WNT";
$GUIBASE = "WIN"; $GUIBASE = "WIN";
$GVER = "NT351"; $GVER = "NT351";
...@@ -693,7 +695,7 @@ elsif ( $platform =~ m/cygwin/ ) ...@@ -693,7 +695,7 @@ elsif ( $platform =~ m/cygwin/ )
$use_shl_versions = "TRUE"; $use_shl_versions = "TRUE";
$wps = ';'; # Windows style path seperator $wps = ';'; # Windows style path seperator
if ( $MINGW eq "yes" ) if ( $MINGW eq "yes" )
{ # At the moment this implies the use of tcsh { # At the moment this implies the use of tcsh, wtf?
print "Setting Windows NT cygwin MinGW specific values... "; print "Setting Windows NT cygwin MinGW specific values... ";
$FLIPCMD = "slfl.pl"; $FLIPCMD = "slfl.pl";
$PATH_SEPERATOR = ';'; $PATH_SEPERATOR = ';';
...@@ -711,42 +713,35 @@ elsif ( $platform =~ m/cygwin/ ) ...@@ -711,42 +713,35 @@ elsif ( $platform =~ m/cygwin/ )
$COMPATH = PathFormat('@COMPATH@'); $COMPATH = PathFormat('@COMPATH@');
$COM = "MSC"; $COM = "MSC";
$OUTPATH = "wntmsci@COMEX@"; $OUTPATH = "wntmsci@COMEX@";
$OUTPATH = "wntmscx@COMEX@" if $CL_X64;
$INPATH = $OUTPATH.$PROEXT; $INPATH = $OUTPATH.$PROEXT;
$COMEX = '@COMEX@'; $COMEX = '@COMEX@';
if ( "@COMEX@" eq "10" ) { # .NET 2003 needs M1310 if ( "@COMEX@" eq "12" ) {
$CVER = "M1310"; $CVER = "M1500";
$ATL_LIB = $COMPATH.$ds."atlmfc".$ds."lib";
$ATL_INCLUDE = $COMPATH.$ds."atlmfc".$ds."include";
$MFC_LIB = "";
$MFC_INCLUDE = "";
} elsif ( "@COMEX@" ge "11" ) { # .NET 2005 needs M1400
if ( "@COMEX@" eq "11" ) {
$CVER = "M1400";
} elsif ( "@COMEX@" eq "12" ) {
$CVER = "M1500";
} elsif ( "@COMEX@" eq "13" ) { } elsif ( "@COMEX@" eq "13" ) {
$CVER = "M1600"; $CVER = "M1600";
} else { # Unsupported
die "Unsupported compiler version.\n";
}
if ( "@DISABLE_ACTIVEX@" ) {
$ATL_LIB = $PSDK_HOME.$ds."lib"; # Doesn't exist for VSE
$ATL_INCLUDE = $PSDK_HOME.$ds."include".$ds."atl";
$MFC_LIB = $PSDK_HOME.$ds."lib"; # Doesn't exist for VSE
$MFC_INCLUDE = $PSDK_HOME.$ds."include".$ds."mfc";
} else {
$ATL_LIB = $COMPATH.$ds."atlmfc".$ds."lib"; $ATL_LIB = $COMPATH.$ds."atlmfc".$ds."lib";
$ATL_INCLUDE = $COMPATH.$ds."atlmfc".$ds."include"; $ATL_INCLUDE = $COMPATH.$ds."atlmfc".$ds."include";
} else { # Unsupported $MFC_LIB = $COMPATH.$ds."atlmfc".$ds."lib";
die "Unsupported value for COMEX variable.\n"; $MFC_INCLUDE = $PSDK_HOME.$ds."include".$ds."mfc";
} }
if ( "@DISABLE_ACTIVEX@" ) { if ($CL_X64) {
$ATL_LIB = $PSDK_HOME.$ds."lib"; # Doesn't exist for VSE $ATL_LIB .= $ds."amd64";
$ATL_INCLUDE = $PSDK_HOME.$ds."include".$ds."atl"; $MFC_LIB .= $ds."amd64";
$MFC_LIB = $PSDK_HOME.$ds."lib"; # Doesn't exist for VSE
$MFC_INCLUDE = $PSDK_HOME.$ds."include".$ds."mfc";
} else {
$ATL_LIB = $COMPATH.$ds."atlmfc".$ds."lib";
$ATL_INCLUDE = $COMPATH.$ds."atlmfc".$ds."include";
$MFC_LIB = $COMPATH.$ds."atlmfc".$ds."lib";
$MFC_INCLUDE = $PSDK_HOME.$ds."include".$ds."mfc";
}
} }
print "Setting W32 build with bash shell specific values... "; print "Setting Windows build specific values... ";
# No speacial treatment for CC an CXX anymore. # No speacial treatment for CC an CXX anymore.
$FLIPCMD = "slfl.pl"; $FLIPCMD = "slfl.pl";
$PATH_SEPERATOR = ';'; $PATH_SEPERATOR = ';';
} }
} }
elsif ( $platform =~ m/os2/ ) elsif ( $platform =~ m/os2/ )
...@@ -1115,12 +1110,6 @@ if ($platform =~ m/cygwin|os2/) ...@@ -1115,12 +1110,6 @@ if ($platform =~ m/cygwin|os2/)
$ILIB .= $wps.$FRAME_HOME.$LIB; $ILIB .= $wps.$FRAME_HOME.$LIB;
if ( '@ENABLE_DIRECTX@' ne "" ) { if ( '@ENABLE_DIRECTX@' ne "" ) {
$ILIB .= $wps.$DIRECTXSDK_LIB; $ILIB .= $wps.$DIRECTXSDK_LIB;
if ( '@COMEX@' eq "10" ) {
# .NET2003 provides and compiles against DirectX 5 libraries and is
# hereby still Win9x compatible.
$ILIB .= $wps.'$COMPATH'.$ds.'PlatformSDK'.$LIB;
$USE_DIRECTX5 = "YES";
}
} }
# ILIB needs to use '\' directory seperators; # ILIB needs to use '\' directory seperators;
$ILIB = WinPath( $ILIB, ";" ); $ILIB = WinPath( $ILIB, ";" );
...@@ -1202,32 +1191,31 @@ elsif ($platform =~ m/cygwin/) ...@@ -1202,32 +1191,31 @@ elsif ($platform =~ m/cygwin/)
# Add path to compiler # Add path to compiler
$tmppath = CygFormat($COMPATH).$BIN; $tmppath = CygFormat($COMPATH).$BIN;
$tmppath .= $ds."amd64" if $CL_X64;
$tmppath =~ s/^\/\//\//; $tmppath =~ s/^\/\//\//;
$PATH .= $ps.$tmppath; $PATH .= $ps.$tmppath;
if ( $COM eq "MSC" ) { if ( $COM eq "MSC" ) {
$tmppath = CygFormat($MSPDB_PATH); $tmppath = CygFormat($MSPDB_PATH);
# for .NET to find mspdb71.dll (needed by CL.EXE C/C++ Compiler) # for MSVC to find mspdb71.dll
if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) { if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
$PATH .= $ps.$tmppath; $PATH .= $ps.$tmppath;
} }
if ( ( $COMEX ge "10" ) ) { # need midl.exe
# .NET needs midl.exe $tmppath = CygFormat($MIDL_PATH);
$tmppath = CygFormat($MIDL_PATH); if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) { $PATH .= $ps.$tmppath;
$PATH .= $ps.$tmppath; }
} # needs csc.exe
# .NET needs csc.exe $tmppath = CygFormat($CSC_PATH);
$tmppath = CygFormat($CSC_PATH); if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) {
if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) { $PATH .= $ps.$tmppath;
$PATH .= $ps.$tmppath; }
} # Installer needs some files if the Windows Installer SDK
# Native installer needs some files if the Windows Installer SDK $tmppath = CygFormat($PSDK_HOME);
$tmppath = CygFormat($PSDK_HOME); if ( $PATH !~ /(?:[:]|\A)(?:$tmppath\/bin)(?:[:]|\Z)/i ) {
if ( $PATH !~ /(?:[:]|\A)(?:$tmppath\/bin)(?:[:]|\Z)/i ) { $PATH .= $ps.$tmppath.$BIN;
$PATH .= $ps.$tmppath.$BIN; }
}
}
} else { # Mingw is different } else { # Mingw is different
# Native installer needs some files if the Windows Installer SDK # Native installer needs some files if the Windows Installer SDK
$tmppath = CygFormat($PSDK_HOME); $tmppath = CygFormat($PSDK_HOME);
...@@ -1504,11 +1492,6 @@ elsif ($platform =~ m/cygwin/) ...@@ -1504,11 +1492,6 @@ elsif ($platform =~ m/cygwin/)
$I.'$COMPATH'.$ds."include"; $I.'$COMPATH'.$ds."include";
if ( '@ENABLE_DIRECTX@' ne "" ) { if ( '@ENABLE_DIRECTX@' ne "" ) {
$SOLARINC .= $I.PathFormat('@DIRECTXSDK_HOME@').$INCLUDE; $SOLARINC .= $I.PathFormat('@DIRECTXSDK_HOME@').$INCLUDE;
if ( '@COMEX@' eq "10" ) {
# .NET2003 provides and compiles against DirectX 5 libraries and is
# hereby still Win9x compatible.
$SOLARINC .= $I.'$COMPATH'.$ds.'PlatformSDK'.$ds."include";
}
} }
} }
elsif ( $COM eq "GCC" ) elsif ( $COM eq "GCC" )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment