summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2005-11-30 00:15:35 (GMT)
committerhobbs <hobbs>2005-11-30 00:15:35 (GMT)
commit08315becbe85b5742b61c005317cc4586a8272b4 (patch)
tree7a34312c78af88bec60c628ccad0bbbccff6791f
parent78e4bd756c392b75621c7d8c46d00a7cc2c03701 (diff)
downloadtcl-08315becbe85b5742b61c005317cc4586a8272b4.zip
tcl-08315becbe85b5742b61c005317cc4586a8272b4.tar.gz
tcl-08315becbe85b5742b61c005317cc4586a8272b4.tar.bz2
* win/tcl.m4: Add build support for Windows-x64 builds.
* win/configure: --enable-64bit now accepts =amd64|ia64 for * win/Makefile.in: Windows 64-bit build variants (default: amd64) * win/makefile.vc: [Bug 1369597]
-rw-r--r--ChangeLog45
-rw-r--r--win/Makefile.in4
-rwxr-xr-xwin/configure75
-rw-r--r--win/makefile.vc8
-rw-r--r--win/tcl.m453
5 files changed, 113 insertions, 72 deletions
diff --git a/ChangeLog b/ChangeLog
index f59f68e..b7ebbdf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-11-29 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * win/tcl.m4: Add build support for Windows-x64 builds.
+ * win/configure: --enable-64bit now accepts =amd64|ia64 for
+ * win/Makefile.in: Windows 64-bit build variants (default: amd64)
+ * win/makefile.vc: [Bug 1369597]
+
2005-11-29 Donal K. Fellows <donal.k.fellows@man.ac.uk>
* generic/tclObj.c (Tcl_GetWideIntFromObj): Add more efficient
@@ -26,22 +33,22 @@
* unix/configure.in: fix obsolete autoconf macros, sync gratuitous
formatting/ordering differences with tk/unix/configure.in.
- * unix/Makefile.in: add CFLAGS to tclsh/tcltest link to make executable
- linking the same as during configure (needed to avoid loosing any linker
- relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS).
- Avoid concurrent linking of tclsh and compiling of tclTestInit.o or
- xtTestInit.o during parallel make.
+ * unix/Makefile.in: add CFLAGS to tclsh/tcltest link to make
+ executable linking the same as during configure (needed to avoid
+ loosing any linker relevant flags in CFLAGS, in particular flags
+ that can't be in LDFLAGS). Avoid concurrent linking of tclsh and
+ compiling of tclTestInit.o or xtTestInit.o during parallel make.
(checkstubs, checkdoc, checkexports): dependency and Darwin fixes
- * unix/tclLoadDyld.c (TclpDlopen): use NSADDIMAGE_OPTION_WITH_SEARCHING
- on second NSAddImage only. [Bug 1204237]
+ * unix/tclLoadDyld.c (TclpDlopen): [Bug 1204237] use
+ NSADDIMAGE_OPTION_WITH_SEARCHING on second NSAddImage only.
(TclGuessPackageName): should not be MODULE_SCOPE.
- (TclpLoadMemory): ppc64 and endian (i386) fixes, add support for loading
- universal (fat) bundles from memory.
+ (TclpLoadMemory): ppc64 and endian (i386) fixes, add support for
+ loading universal (fat) bundles from memory.
* unix/tclUnixPort.h:
- * unix/tclUnixFCmd.c: add support for new Tiger copyfile() API to enable
- copying of xattrs & ACLs by [file copy].
+ * unix/tclUnixFCmd.c: add support for new Tiger copyfile() API to
+ enable copying of xattrs & ACLs by [file copy].
* generic/tcl.h: add Darwin specifc configure overrides for TCL_WIDE
defines to support fat compiles of ppc and ppc64 at the same time,
@@ -50,15 +57,15 @@
* generic/tclInt.h: clarify fat compile comment.
- * unix/tclUnixPort.h: add Darwin specifc configure overrides to support
- fat compiles, where configure runs only once for multiple architectures
- (replaces Darwin CVS fix by emoy, rdar://3693001).
+ * unix/tclUnixPort.h: add Darwin specifc configure overrides to
+ support fat compiles, where configure runs only once for multiple
+ architectures (replaces Darwin CVS fix by emoy, rdar://3693001).
* macosx/tclMacOSXBundle.c:
* macosx/tclMacOSXNotify.c:
- * unix/tclUnixNotfy.c:
- * unix/tclUnixPort.h: fix #include order to support compile time
- override of HAVE_COREFOUNDATION in tclUnixPort.h when building for ppc64
+ * unix/tclUnixNotfy.c: fix #include order to support compile time
+ * unix/tclUnixPort.h: override of HAVE_COREFOUNDATION in
+ tclUnixPort.h when building for ppc64
* macosx/Tcl.pbproj/default.pbxuser (new file):
* macosx/Tcl.pbproj/jingham.pbxuser:
@@ -67,8 +74,8 @@
* macosx/README: clarification/cleanup, sync with HEAD, document
universal (fat) builds via CFLAGS (i.e. all of ppc ppc64 i386 at once).
- * macosx/Makefile: add support for reusing configure cache, build target
- fixes, remove GENERIC_FLAGS override now handled by tcl.m4.
+ * macosx/Makefile: add support for reusing configure cache, build
+ target fixes, remove GENERIC_FLAGS override now handled by tcl.m4.
* generic/tclIOUtil.c:
* generic/tclRegexp.c:
diff --git a/win/Makefile.in b/win/Makefile.in
index 1dd0684..0110120 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -5,7 +5,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.68.2.2 2004/11/16 23:39:52 andreas_kupries Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.68.2.3 2005/11/30 00:15:39 hobbs Exp $
VERSION = @TCL_VERSION@
@@ -329,7 +329,7 @@ cat32.$(OBJEXT): cat.c
$(CC) -c $(CC_SWITCHES) @DEPARG@ $(CC_OBJNAME)
$(CAT32): cat32.$(OBJEXT)
- $(CC) $(CFLAGS) cat32.$(OBJEXT) $(CC_EXENAME) $(LDFLAGS_CONSOLE)
+ $(CC) $(CFLAGS) cat32.$(OBJEXT) $(CC_EXENAME) $(LIBS) $(LDFLAGS_CONSOLE)
# The following targets are configured by autoconf to generate either
# a shared library or static library
diff --git a/win/configure b/win/configure
index 78a498a..4b9d6e5 100755
--- a/win/configure
+++ b/win/configure
@@ -16,7 +16,7 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-shared build and link with shared libraries [--enable-shared]"
ac_help="$ac_help
- --enable-64bit enable 64bit support (where applicable)"
+ --enable-64bit enable 64bit support (where applicable = amd64|ia64)"
ac_help="$ac_help
--enable-symbols build with debugging symbols [--disable-symbols]"
@@ -1519,7 +1519,7 @@ echo "configure:1500: checking for Windows native path bug in windres" >&5
echo $ac_n "checking compiler flags""... $ac_c" 1>&6
echo "configure:1521: checking compiler flags" >&5
if test "${GCC}" = "yes" ; then
- if test "$do64bit" = "yes" ; then
+ if test "$do64bit" != "no" ; then
echo "configure: warning: "64bit mode not supported with GCC on Windows"" 1>&2
fi
SHLIB_LD=""
@@ -1659,34 +1659,49 @@ echo "configure:1521: checking compiler flags" >&5
# This is a 2-stage check to make sure we have the 64-bit SDK
# We have to know where the SDK is installed.
- if test "$do64bit" = "yes" ; then
+ # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
+ # MACHINE is IX86 for LINK, but this is used by the manifest,
+ # which requires x86|amd64|ia64.
+ MACHINE="X86"
+ if test "$do64bit" != "no" ; then
if test "x${MSSDK}x" = "xx" ; then
- MSSDK="C:/Progra~1/Microsoft SDK"
+ MSSDK="C:/Progra~1/Microsoft Platform SDK"
fi
MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'`
- if test ! -d "${MSSDK}/bin/win64" ; then
- echo "configure: warning: "could not find 64-bit SDK to enable 64bit mode"" 1>&2
+ PATH64=""
+ case "$do64bit" in
+ amd64|x64|yes)
+ MACHINE="AMD64" ; # default to AMD64 64-bit build
+ PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
+ ;;
+ ia64)
+ MACHINE="IA64"
+ PATH64="${MSSDK}/Bin/Win64"
+ ;;
+ esac
+ if test ! -d "${PATH64}" ; then
+ echo "configure: warning: Could not find 64-bit $MACHINE SDK to enable 64bit mode" 1>&2
+ echo "configure: warning: Ensure latest Platform SDK is installed" 1>&2
do64bit="no"
+ else
+ echo "$ac_t"" Using 64-bit $MACHINE mode" 1>&6
fi
fi
- if test "$do64bit" = "yes" ; then
- # All this magic is necessary for the Win64 SDK RC1 - hobbs
+ if test "$do64bit" != "no" ; then
# The space-based-path will work for the Makefile, but will
- # not work if AC_TRY_COMPILE is called. TEA has the
- # TEA_PATH_NOSPACE to avoid this issue.
- CC="\"${MSSDK}/Bin/Win64/cl.exe\" \
- -I\"${MSSDK}/Include/prerelease\" \
- -I\"${MSSDK}/Include/Win64/crt\" \
- -I\"${MSSDK}/Include/Win64/crt/sys\" \
- -I\"${MSSDK}/Include\""
+ # not work if AC_TRY_COMPILE is called.
+ CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \
+ -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
RC="\"${MSSDK}/bin/rc.exe\""
CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d"
# Do not use -O2 for Win64 - this has proved buggy in code gen.
CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}"
- lflags="-MACHINE:IA64 -LIBPATH:\"${MSSDK}/Lib/IA64\" \
- -LIBPATH:\"${MSSDK}/Lib/Prerelease/IA64\" -nologo"
- LINKBIN="\"${MSSDK}/bin/win64/link.exe\""
+ lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
+ LINKBIN="\"${PATH64}/link.exe\""
+ # Avoid 'unresolved external symbol __security_cookie' errors.
+ # c.f. http://support.microsoft.com/?id=894573
+ LIBS="user32.lib advapi32.lib bufferoverflowU.lib"
else
RC="rc"
# -Od - no optimization
@@ -1696,9 +1711,9 @@ echo "configure:1521: checking compiler flags" >&5
CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}"
lflags="-nologo"
LINKBIN="link"
+ LIBS="user32.lib advapi32.lib"
fi
- LIBS="user32.lib advapi32.lib"
LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib comctl32.lib shell32.lib"
SHLIB_LD="${LINKBIN} -dll -incremental:no ${lflags}"
# link -lib only works when -lib is the first arg
@@ -1743,7 +1758,7 @@ echo "configure:1521: checking compiler flags" >&5
echo $ac_n "checking for build with symbols""... $ac_c" 1>&6
-echo "configure:1747: checking for build with symbols" >&5
+echo "configure:1762: checking for build with symbols" >&5
# Check whether --enable-symbols or --disable-symbols was given.
if test "${enable_symbols+set}" = set; then
enableval="$enable_symbols"
@@ -1803,7 +1818,7 @@ TCL_DBGX=${DBGX}
#--------------------------------------------------------------------
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1807: checking how to run the C preprocessor" >&5
+echo "configure:1822: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1818,13 +1833,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1822 "configure"
+#line 1837 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1835,13 +1850,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1839 "configure"
+#line 1854 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1852,13 +1867,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1856 "configure"
+#line 1871 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -1884,17 +1899,17 @@ echo "$ac_t""$CPP" 1>&6
ac_safe=`echo "errno.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for errno.h""... $ac_c" 1>&6
-echo "configure:1888: checking for errno.h" >&5
+echo "configure:1903: checking for errno.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1893 "configure"
+#line 1908 "configure"
#include "confdefs.h"
#include <errno.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
diff --git a/win/makefile.vc b/win/makefile.vc
index 31b5b67..7b8fe5f 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -12,7 +12,7 @@
# Copyright (c) 2001-2002 David Gravereaux.
#
#------------------------------------------------------------------------------
-# RCS: @(#) $Id: makefile.vc,v 1.100.2.6 2005/03/08 21:50:37 hobbs Exp $
+# RCS: @(#) $Id: makefile.vc,v 1.100.2.7 2005/11/30 00:15:39 hobbs Exp $
#------------------------------------------------------------------------------
# Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR)
@@ -399,7 +399,11 @@ conlflags = $(lflags) -subsystem:console
guilflags = $(lflags) -subsystem:windows
baselibs = kernel32.lib advapi32.lib user32.lib
-
+# Avoid 'unresolved external symbol __security_cookie' errors.
+# c.f. http://support.microsoft.com/?id=894573
+!if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64"
+baselibs = $(baselibs) bufferoverflowU.lib
+!endif
#---------------------------------------------------------------------
# TclTest flags
diff --git a/win/tcl.m4 b/win/tcl.m4
index 540fcc1..680c999 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -382,7 +382,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
# Step 0: Enable 64 bit support?
AC_MSG_CHECKING([if 64bit support is requested])
- AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support (where applicable)], [do64bit=$enableval], [do64bit=no])
+ AC_ARG_ENABLE(64bit,[ --enable-64bit enable 64bit support (where applicable = amd64|ia64)], [do64bit=$enableval], [do64bit=no])
AC_MSG_RESULT($do64bit)
# Set some defaults (may get changed below)
@@ -427,7 +427,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
AC_MSG_CHECKING([compiler flags])
if test "${GCC}" = "yes" ; then
- if test "$do64bit" = "yes" ; then
+ if test "$do64bit" != "no" ; then
AC_MSG_WARN("64bit mode not supported with GCC on Windows")
fi
SHLIB_LD=""
@@ -567,34 +567,49 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
# This is a 2-stage check to make sure we have the 64-bit SDK
# We have to know where the SDK is installed.
- if test "$do64bit" = "yes" ; then
+ # This magic is based on MS Platform SDK for Win2003 SP1 - hobbs
+ # MACHINE is IX86 for LINK, but this is used by the manifest,
+ # which requires x86|amd64|ia64.
+ MACHINE="X86"
+ if test "$do64bit" != "no" ; then
if test "x${MSSDK}x" = "xx" ; then
- MSSDK="C:/Progra~1/Microsoft SDK"
+ MSSDK="C:/Progra~1/Microsoft Platform SDK"
fi
MSSDK=`echo "$MSSDK" | sed -e 's!\\\!/!g'`
- if test ! -d "${MSSDK}/bin/win64" ; then
- AC_MSG_WARN("could not find 64-bit SDK to enable 64bit mode")
+ PATH64=""
+ case "$do64bit" in
+ amd64|x64|yes)
+ MACHINE="AMD64" ; # default to AMD64 64-bit build
+ PATH64="${MSSDK}/Bin/Win64/x86/AMD64"
+ ;;
+ ia64)
+ MACHINE="IA64"
+ PATH64="${MSSDK}/Bin/Win64"
+ ;;
+ esac
+ if test ! -d "${PATH64}" ; then
+ AC_MSG_WARN([Could not find 64-bit $MACHINE SDK to enable 64bit mode])
+ AC_MSG_WARN([Ensure latest Platform SDK is installed])
do64bit="no"
+ else
+ AC_MSG_RESULT([ Using 64-bit $MACHINE mode])
fi
fi
- if test "$do64bit" = "yes" ; then
- # All this magic is necessary for the Win64 SDK RC1 - hobbs
+ if test "$do64bit" != "no" ; then
# The space-based-path will work for the Makefile, but will
- # not work if AC_TRY_COMPILE is called. TEA has the
- # TEA_PATH_NOSPACE to avoid this issue.
- CC="\"${MSSDK}/Bin/Win64/cl.exe\" \
- -I\"${MSSDK}/Include/prerelease\" \
- -I\"${MSSDK}/Include/Win64/crt\" \
- -I\"${MSSDK}/Include/Win64/crt/sys\" \
- -I\"${MSSDK}/Include\""
+ # not work if AC_TRY_COMPILE is called.
+ CC="\"${PATH64}/cl.exe\" -I\"${MSSDK}/Include\" \
+ -I\"${MSSDK}/Include/crt\" -I\"${MSSDK}/Include/crt/sys\""
RC="\"${MSSDK}/bin/rc.exe\""
CFLAGS_DEBUG="-nologo -Zi -Od ${runtime}d"
# Do not use -O2 for Win64 - this has proved buggy in code gen.
CFLAGS_OPTIMIZE="-nologo -O1 ${runtime}"
- lflags="-MACHINE:IA64 -LIBPATH:\"${MSSDK}/Lib/IA64\" \
- -LIBPATH:\"${MSSDK}/Lib/Prerelease/IA64\" -nologo"
- LINKBIN="\"${MSSDK}/bin/win64/link.exe\""
+ lflags="-nologo -MACHINE:${MACHINE} -LIBPATH:\"${MSSDK}/Lib/${MACHINE}\""
+ LINKBIN="\"${PATH64}/link.exe\""
+ # Avoid 'unresolved external symbol __security_cookie' errors.
+ # c.f. http://support.microsoft.com/?id=894573
+ LIBS="user32.lib advapi32.lib bufferoverflowU.lib"
else
RC="rc"
# -Od - no optimization
@@ -604,9 +619,9 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}"
lflags="-nologo"
LINKBIN="link"
+ LIBS="user32.lib advapi32.lib"
fi
- LIBS="user32.lib advapi32.lib"
LIBS_GUI="gdi32.lib comdlg32.lib imm32.lib comctl32.lib shell32.lib"
SHLIB_LD="${LINKBIN} -dll -incremental:no ${lflags}"
# link -lib only works when -lib is the first arg