diff options
author | Tor Lillqvist <tlillqvist@novell.com> | 2011-01-16 20:45:18 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@novell.com> | 2011-01-16 20:57:08 +0200 |
commit | 9cf5f41bedbb0830716f2f62deadfae30d675796 (patch) | |
tree | ada3212a21fbc4edabec1302df93f6aab604fafc | |
parent | 7f761bded4d83f2dfbaacec140a1e3fd15e8aac1 (diff) |
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.
-rwxr-xr-x | configure.in | 41 | ||||
-rwxr-xr-x | set_soenv.in | 107 |
2 files changed, 69 insertions, 79 deletions
diff --git a/configure.in b/configure.in index bb8302f1a303..4fa3a81b5979 100755 --- a/configure.in +++ b/configure.in @@ -1223,9 +1223,9 @@ AC_ARG_WITH(unix-wrapper, AC_ARG_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 AC_MSG_CHECKING([for a friendly Microsoft C/C++ compiler installation path]) if test -z "$with_cl_home"; then 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 with_cl_home=$vctest; fi else - if test -x "$vctest/bin/x86_amd64/cl.exe"; then + if test -x "$vctest/bin/amd64/cl.exe"; then with_cl_home=$vctest; fi fi @@ -2194,15 +2194,15 @@ if test "$_os" = "WINNT"; then PATH="$MSPDB_PATH:$PATH" 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 CC="$with_cl_home/bin/cl.exe" fi - else - if test -x "$with_cl_home/bin/x86_amd64/cl.exe"; then - CC="$with_cl_home/bin/x86_amd64/cl.exe" + else + if test -x "$with_cl_home/bin/amd64/cl.exe"; then + CC="$with_cl_home/bin/amd64/cl.exe" fi - fi + fi if test -z "$CC"; then AC_PATH_PROG(CC, cl.exe) fi @@ -2213,7 +2213,7 @@ if test "$_os" = "WINNT"; then CC=`cygpath -u "$CC"` # Remove /cl.exe from CC case insensitive 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]]@@'` else if test -n "$with_cl_home"; then @@ -6051,21 +6051,28 @@ fi AC_SUBST(CYGWIN_PATH) dnl *************************************** -dnl testing ml.exe assembler path +dnl testing assembler path 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 - AC_MSG_CHECKING([ml.exe assembler path]) + AC_MSG_CHECKING([$assembler assembler path]) if test -n "$with_asm_home"; then with_asm_home=`cygpath -u "$with_asm_home"` fi - if test ! -x "$with_asm_home/ml.exe"; then - AC_PATH_PROG(ML_EXE, ml.exe) + if test ! -x "$with_asm_home/$assembler"; then + AC_PATH_PROG(ML_EXE, $assembler) if test -z "$ML_EXE"; then - if test -x "$with_cl_home/bin/ml.exe"; then - with_asm_home=$with_cl_home/bin + if test -x "$with_cl_home/$assembler_bin/$assembler"; then + with_asm_home=$with_cl_home/$assembler_bin AC_MSG_RESULT([found ($with_asm_home)]) else - AC_MSG_ERROR([Configure did not find ml.exe assembler.]) + AC_MSG_ERROR([Configure did not find $assembler assembler.]) fi else with_asm_home="ASM_IN_PATH" diff --git a/set_soenv.in b/set_soenv.in index feeb83d1c14b..0533441b722e 100755 --- a/set_soenv.in +++ b/set_soenv.in @@ -683,7 +683,9 @@ elsif ( $platform =~ m/cygwin/ ) $FRAME_HOME = PathFormat('@FRAME_HOME@'); $USE_NEW_SDK = "TRUE"; $CPUNAME = "INTEL"; + $CPUNAME = "X86_64" if $CL_X64; $CPU = "I"; + $CPU = "X" if $CL_X64; $GUI = "WNT"; $GUIBASE = "WIN"; $GVER = "NT351"; @@ -693,7 +695,7 @@ elsif ( $platform =~ m/cygwin/ ) $use_shl_versions = "TRUE"; $wps = ';'; # Windows style path seperator 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... "; $FLIPCMD = "slfl.pl"; $PATH_SEPERATOR = ';'; @@ -711,42 +713,35 @@ elsif ( $platform =~ m/cygwin/ ) $COMPATH = PathFormat('@COMPATH@'); $COM = "MSC"; $OUTPATH = "wntmsci@COMEX@"; + $OUTPATH = "wntmscx@COMEX@" if $CL_X64; $INPATH = $OUTPATH.$PROEXT; $COMEX = '@COMEX@'; - if ( "@COMEX@" eq "10" ) { # .NET 2003 needs M1310 - $CVER = "M1310"; - $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"; + if ( "@COMEX@" eq "12" ) { + $CVER = "M1500"; } elsif ( "@COMEX@" eq "13" ) { $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_INCLUDE = $COMPATH.$ds."atlmfc".$ds."include"; - } else { # Unsupported - die "Unsupported value for COMEX variable.\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_INCLUDE = $COMPATH.$ds."atlmfc".$ds."include"; - $MFC_LIB = $COMPATH.$ds."atlmfc".$ds."lib"; - $MFC_INCLUDE = $PSDK_HOME.$ds."include".$ds."mfc"; - } + $MFC_LIB = $COMPATH.$ds."atlmfc".$ds."lib"; + $MFC_INCLUDE = $PSDK_HOME.$ds."include".$ds."mfc"; + } + if ($CL_X64) { + $ATL_LIB .= $ds."amd64"; + $MFC_LIB .= $ds."amd64"; } - print "Setting W32 build with bash shell specific values... "; - # No speacial treatment for CC an CXX anymore. - $FLIPCMD = "slfl.pl"; - $PATH_SEPERATOR = ';'; + print "Setting Windows build specific values... "; + # No speacial treatment for CC an CXX anymore. + $FLIPCMD = "slfl.pl"; + $PATH_SEPERATOR = ';'; } } elsif ( $platform =~ m/os2/ ) @@ -1115,12 +1110,6 @@ if ($platform =~ m/cygwin|os2/) $ILIB .= $wps.$FRAME_HOME.$LIB; if ( '@ENABLE_DIRECTX@' ne "" ) { $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 = WinPath( $ILIB, ";" ); @@ -1202,32 +1191,31 @@ elsif ($platform =~ m/cygwin/) # Add path to compiler $tmppath = CygFormat($COMPATH).$BIN; + $tmppath .= $ds."amd64" if $CL_X64; $tmppath =~ s/^\/\//\//; $PATH .= $ps.$tmppath; if ( $COM eq "MSC" ) { $tmppath = CygFormat($MSPDB_PATH); - # for .NET to find mspdb71.dll (needed by CL.EXE C/C++ Compiler) - if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) { - $PATH .= $ps.$tmppath; - } - if ( ( $COMEX ge "10" ) ) { - # .NET needs midl.exe - $tmppath = CygFormat($MIDL_PATH); - if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) { - $PATH .= $ps.$tmppath; - } - # .NET needs csc.exe - $tmppath = CygFormat($CSC_PATH); - if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) { - $PATH .= $ps.$tmppath; - } - # Native installer needs some files if the Windows Installer SDK - $tmppath = CygFormat($PSDK_HOME); - if ( $PATH !~ /(?:[:]|\A)(?:$tmppath\/bin)(?:[:]|\Z)/i ) { - $PATH .= $ps.$tmppath.$BIN; - } - } + # for MSVC to find mspdb71.dll + if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) { + $PATH .= $ps.$tmppath; + } + # need midl.exe + $tmppath = CygFormat($MIDL_PATH); + if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) { + $PATH .= $ps.$tmppath; + } + # needs csc.exe + $tmppath = CygFormat($CSC_PATH); + if ( $PATH !~ /(?:[:]|\A)(?:$tmppath)(?:[:]|\Z)/ ) { + $PATH .= $ps.$tmppath; + } + # Installer needs some files if the Windows Installer SDK + $tmppath = CygFormat($PSDK_HOME); + if ( $PATH !~ /(?:[:]|\A)(?:$tmppath\/bin)(?:[:]|\Z)/i ) { + $PATH .= $ps.$tmppath.$BIN; + } } else { # Mingw is different # Native installer needs some files if the Windows Installer SDK $tmppath = CygFormat($PSDK_HOME); @@ -1504,11 +1492,6 @@ elsif ($platform =~ m/cygwin/) $I.'$COMPATH'.$ds."include"; if ( '@ENABLE_DIRECTX@' ne "" ) { $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" ) |