summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-02-17 12:07:17 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-02-17 12:07:17 (GMT)
commit54198747bb48292d91a43b0e328aebb6d8eaa1df (patch)
tree6f85c157663440de2f3dd429f7f26ba287d1ef6f /win
parentdabd6dee2d365e65a816652ccb036c9f817debfa (diff)
parent36024b4c2dfa88a5b42c42342e1630cb846b59f0 (diff)
downloadtcl-54198747bb48292d91a43b0e328aebb6d8eaa1df.zip
tcl-54198747bb48292d91a43b0e328aebb6d8eaa1df.tar.gz
tcl-54198747bb48292d91a43b0e328aebb6d8eaa1df.tar.bz2
Merge 9.0
Diffstat (limited to 'win')
-rw-r--r--win/README22
-rwxr-xr-xwin/configure16
-rw-r--r--win/configure.ac6
-rw-r--r--win/makefile.vc3
-rw-r--r--win/rules-ext.vc5
-rw-r--r--win/rules.vc11
-rw-r--r--win/tcl.m44
-rwxr-xr-xwin/x86_64-w64-mingw32-nmakehlp.exebin0 -> 25088 bytes
8 files changed, 46 insertions, 21 deletions
diff --git a/win/README b/win/README
index 6f73f69..9b001ba 100644
--- a/win/README
+++ b/win/README
@@ -20,7 +20,7 @@ In order to compile Tcl for Windows, you need the following:
and
- Visual C++ 6 or newer
+ Visual Studio 2015 or newer
or
@@ -42,6 +42,11 @@ In order to compile Tcl for Windows, you need the following:
Msys + MinGW-w64 [https://www.mingw-w64.org/]
(win32 or win64)
+ or
+
+ LLVM MinGW [https://github.com/mstorsjo/llvm-mingw/]
+ (win32 or win64, IX86, AMD64 or ARM64)
+
In practice, this release is built with Visual C++ 6.0 and the TEA
Makefile.
@@ -62,8 +67,9 @@ configure/build process works just like the UNIX one, so you will want
to refer to ../unix/README for available configure options.
If you want 64-bit executables (x86_64), you need to configure using
-the --enable-64bit option. Make sure that the x86_64-w64-mingw32
-compiler is present. For Cygwin this compiler can be found in the
+the --enable-64bit (or --enable-64bit=arm64) option. Make sure that
+the x86_64-w64-mingw32 (or aarch64-w64-mingw32) compiler is present.
+For Cygwin the x86_64 compiler can be found in the
"mingw64-x86_64-gcc-core" package, which can be installed through
the normal Cygwin install process. If you only want 32-bit executables,
the "mingw64-i686-gcc-core" package is what you need. For Linux, Darwin
@@ -74,11 +80,13 @@ Use the Makefile "install" target to install Tcl. It will install it
according to the prefix options you provided in the correct directory
structure.
-Note that in order to run tclsh90.exe, you must ensure that tcl90.dll is
-on your path, in the system directory, or in the directory containing
-tclsh90.exe.
+Note that in order to run tclsh90.exe, you must ensure that tcl90.dll,
+libtommath.dll and zlib1.dll are on your path, in the system
+directory, or in the directory containing tclsh90.exe.
-Note: Tcl no longer provides support for Win32s.
+Note: Tcl no longer provides support for systems earlier than Windows 7.
+You will also need the Windows Universal C runtime (UCRT):
+ [https://support.microsoft.com/en-us/topic/update-for-universal-c-runtime-in-windows-c0514201-7fe6-95a3-b0a5-287930f3560c]
3. Test suite
-------------
diff --git a/win/configure b/win/configure
index bbe0562..66d807a 100755
--- a/win/configure
+++ b/win/configure
@@ -4085,7 +4085,7 @@ printf "%s\n" "$ac_cv_cross" >&6; }
RC="x86_64-w64-mingw32-windres"
;;
arm64|aarch64)
- CC="aarch64-w64-mingw32-${CC}"
+ CC="aarch64-w64-mingw32-clang"
LD="aarch64-w64-mingw32-ld"
AR="aarch64-w64-mingw32-ar"
RANLIB="aarch64-w64-mingw32-ranlib"
@@ -4181,7 +4181,7 @@ printf "%s\n" "$ac_cv_win32" >&6; }
if test "$ac_cv_win32" != "yes"; then
as_fn_error $? "${CC} cannot produce win32 executables." "$LINENO" 5
fi
- if test "$MACHINE" != "ARM64"; then
+ if test "$do64bit" != "arm64"; then
extra_cflags="$extra_cflags -DHAVE_CPUID=1"
fi
@@ -4936,15 +4936,17 @@ then :
ZLIB_LIBS=\${ZLIB_DIR_NATIVE}/win64-arm/libz.dll.a
+ TOMMATH_LIBS=\${TOMMATH_DIR_NATIVE}/win64-arm/libtommath.dll.a
+
else $as_nop
ZLIB_LIBS=\${ZLIB_DIR_NATIVE}/win64-arm/zdll.lib
+ TOMMATH_LIBS=\${TOMMATH_DIR_NATIVE}/win64-arm/tommath.lib
-fi
- TOMMATH_LIBS=\${TOMMATH_DIR_NATIVE}/win64/libtommath.dll.a
+fi
else $as_nop
@@ -4953,15 +4955,17 @@ then :
ZLIB_LIBS=\${ZLIB_DIR_NATIVE}/win64/libz.dll.a
+ TOMMATH_LIBS=\${TOMMATH_DIR_NATIVE}/win64/libtommath.dll.a
+
else $as_nop
ZLIB_LIBS=\${ZLIB_DIR_NATIVE}/win64/zdll.lib
+ TOMMATH_LIBS=\${TOMMATH_DIR_NATIVE}/win64/tommath.lib
-fi
- TOMMATH_LIBS=\${TOMMATH_DIR_NATIVE}/win64/tommath.lib
+fi
fi
diff --git a/win/configure.ac b/win/configure.ac
index e114473..dccc3b6 100644
--- a/win/configure.ac
+++ b/win/configure.ac
@@ -130,17 +130,19 @@ AS_IF([test "$tcl_ok" = "yes"], [
AS_IF([test "$do64bit" = "arm64"], [
AS_IF([test "$GCC" == "yes"],[
AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR_NATIVE}/win64-arm/libz.dll.a])
+ AC_SUBST(TOMMATH_LIBS,[\${TOMMATH_DIR_NATIVE}/win64-arm/libtommath.dll.a])
], [
AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR_NATIVE}/win64-arm/zdll.lib])
+ AC_SUBST(TOMMATH_LIBS,[\${TOMMATH_DIR_NATIVE}/win64-arm/tommath.lib])
])
- AC_SUBST(TOMMATH_LIBS,[\${TOMMATH_DIR_NATIVE}/win64/libtommath.dll.a])
], [
AS_IF([test "$GCC" == "yes"],[
AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR_NATIVE}/win64/libz.dll.a])
+ AC_SUBST(TOMMATH_LIBS,[\${TOMMATH_DIR_NATIVE}/win64/libtommath.dll.a])
], [
AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR_NATIVE}/win64/zdll.lib])
+ AC_SUBST(TOMMATH_LIBS,[\${TOMMATH_DIR_NATIVE}/win64/tommath.lib])
])
- AC_SUBST(TOMMATH_LIBS,[\${TOMMATH_DIR_NATIVE}/win64/tommath.lib])
])
], [
AC_SUBST(ZLIB_LIBS,[\${ZLIB_DIR_NATIVE}/win32/zdll.lib])
diff --git a/win/makefile.vc b/win/makefile.vc
index d791fcb..eb55af8 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -602,7 +602,7 @@ $(TCLSCRIPTZIP): $(TCLDDELIB) $(TCLREGLIB)
!endif
@echo file delete -force {$@} > "$(OUT_DIR)\zipper.tcl"
@echo zipfs mkzip {$@} {$(LIBTCLVFS)} {$(LIBTCLVFS)} >> "$(OUT_DIR)\zipper.tcl"
- @cd "$(OUT_DIR)" && $(TCLSH) zipper.tcl
+ @cd "$(OUT_DIR)" && $(TCLSH_NATIVE) zipper.tcl
pkgs:
@@ -1014,6 +1014,7 @@ install-libraries: tclConfig tcl-nmake install-msgs install-tzdata
@$(CPY) "$(WIN_DIR)\rules.vc" "$(LIB_INSTALL_DIR)\nmake\"
@$(CPY) "$(WIN_DIR)\targets.vc" "$(LIB_INSTALL_DIR)\nmake\"
@$(CPY) "$(WIN_DIR)\nmakehlp.c" "$(LIB_INSTALL_DIR)\nmake\"
+ @$(CPY) "$(WIN_DIR)\x86_64-w64-mingw32-nmakehlp.exe" "$(LIB_INSTALL_DIR)\nmake\"
@$(CPY) "$(OUT_DIR)\tcl.nmake" "$(LIB_INSTALL_DIR)\nmake\"
!if !$(TCL_EMBED_SCRIPTS)
@echo Installing package cookiejar $(PKG_COOKIEJAR_VER)
diff --git a/win/rules-ext.vc b/win/rules-ext.vc
index 6da5689..6d31a03 100644
--- a/win/rules-ext.vc
+++ b/win/rules-ext.vc
@@ -31,8 +31,13 @@ macro to the name of the project makefile.
# We extract version numbers using the nmakehlp program. For now use
# the local copy of nmakehlp. Once we locate Tcl, we will use that
# one if it is newer.
+!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
!if [$(CC) -nologo -DNDEBUG "nmakehlp.c" -link -subsystem:console > nul]
!endif
+!else
+!if [copy x86_64-w64-mingw32-nmakehlp.exe nmakehlp.exe >NUL]
+!endif
+!endif
# First locate the Tcl directory that we are working with.
!if "$(TCLDIR)" != ""
diff --git a/win/rules.vc b/win/rules.vc
index 2f01de0..372d70a 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -550,8 +550,13 @@ NMAKEHLPC = $(_TCLDIR)\win\nmakehlp.c
# We always build nmakehlp even if it exists since we do not know
# what source it was built from.
+!if "$(MACHINE)" == "IX86" || "$(MACHINE)" == "$(NATIVE_ARCH)"
!if [$(cc32) -nologo "$(NMAKEHLPC)" -link -subsystem:console > nul]
!endif
+!else
+!if [copy $(NMAKEHLPC:nmakehlp.c=x86_64-w64-mingw32-nmakehlp.exe) nmakehlp.exe >NUL]
+!endif
+!endif
################################################################
# 5. Test for compiler features
@@ -1379,7 +1384,7 @@ OPTDEFINES = $(OPTDEFINES) /DUSE_THREAD_ALLOC=1
OPTDEFINES = $(OPTDEFINES) /DSTATIC_BUILD
!elseif $(TCL_VERSION) > 86
OPTDEFINES = $(OPTDEFINES) /DTCL_WITH_EXTERNAL_TOMMATH
-!if "$(MACHINE)" == "AMD64"
+!if "$(MACHINE)" == "AMD64" || "$(MACHINE)" == "ARM64"
OPTDEFINES = $(OPTDEFINES) /DMP_64BIT
!endif
!endif
@@ -1407,7 +1412,7 @@ OPTDEFINES = $(OPTDEFINES) /DTCL_CFG_OPTIMIZED
!if $(PROFILE)
OPTDEFINES = $(OPTDEFINES) /DTCL_CFG_PROFILED
!endif
-!if "$(MACHINE)" == "AMD64"
+!if "$(MACHINE)" == "AMD64" || "$(MACHINE)" == "ARM64"
OPTDEFINES = $(OPTDEFINES) /DTCL_CFG_DO64BIT
!endif
!if $(VCVERSION) < 1300
@@ -1469,7 +1474,7 @@ cdebug = $(cdebug) -Zi
# cwarn includes default warning levels.
cwarn = $(WARNINGS)
-!if "$(MACHINE)" == "AMD64"
+!if "$(MACHINE)" == "AMD64" || "$(MACHINE)" == "ARM64"
# Disable pointer<->int warnings related to cast between different sizes
# There are a gadzillion of these due to use of ClientData and
# clutter up compiler
diff --git a/win/tcl.m4 b/win/tcl.m4
index 454aef1..dc98570 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -527,7 +527,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
RC="x86_64-w64-mingw32-windres"
;;
arm64|aarch64)
- CC="aarch64-w64-mingw32-${CC}"
+ CC="aarch64-w64-mingw32-clang"
LD="aarch64-w64-mingw32-ld"
AR="aarch64-w64-mingw32-ar"
RANLIB="aarch64-w64-mingw32-ranlib"
@@ -593,7 +593,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
if test "$ac_cv_win32" != "yes"; then
AC_MSG_ERROR([${CC} cannot produce win32 executables.])
fi
- if test "$MACHINE" != "ARM64"; then
+ if test "$do64bit" != "arm64"; then
extra_cflags="$extra_cflags -DHAVE_CPUID=1"
fi
diff --git a/win/x86_64-w64-mingw32-nmakehlp.exe b/win/x86_64-w64-mingw32-nmakehlp.exe
new file mode 100755
index 0000000..f821add
--- /dev/null
+++ b/win/x86_64-w64-mingw32-nmakehlp.exe
Binary files differ