summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-02-08 14:54:25 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-02-08 14:54:25 (GMT)
commit810339303d0954eba26d1902ead30e0efcb8152a (patch)
tree7c3a2674bbae0cc2e7e99a5a0723d78369716e47 /win
parenteb68ebd08b602042505553b4d249f3ea23875c3b (diff)
downloadtk-810339303d0954eba26d1902ead30e0efcb8152a.zip
tk-810339303d0954eba26d1902ead30e0efcb8152a.tar.gz
tk-810339303d0954eba26d1902ead30e0efcb8152a.tar.bz2
More changes for arm64 (or aarch64)
Diffstat (limited to 'win')
-rwxr-xr-xwin/configure19
-rw-r--r--win/tcl.m419
2 files changed, 28 insertions, 10 deletions
diff --git a/win/configure b/win/configure
index bba1a24..6e3d0f2 100755
--- a/win/configure
+++ b/win/configure
@@ -3408,7 +3408,7 @@ fi
SHLIB_SUFFIX=".dll"
# MACHINE is IX86 for LINK, but this is used by the manifest,
- # which requires x86|amd64|ia64.
+ # which requires x86|amd64|arm64|ia64.
MACHINE="X86"
if test "$GCC" = "yes"; then
@@ -3481,6 +3481,13 @@ echo "${ECHO_T}$ac_cv_cross" >&6
RANLIB="x86_64-w64-mingw32-ranlib"
RC="x86_64-w64-mingw32-windres"
;;
+ arm64|aarch64)
+ CC="aarch64-w64-mingw32-${CC}"
+ LD="aarch64-w64-mingw32-ld"
+ AR="aarch64-w64-mingw32-ar"
+ RANLIB="aarch64-w64-mingw32-ranlib"
+ RC="aarch64-w64-mingw32-windres"
+ ;;
*)
CC="i686-w64-mingw32-${CC}"
LD="i686-w64-mingw32-ld"
@@ -3599,6 +3606,9 @@ echo "${ECHO_T}$ac_cv_win32" >&6
echo "$as_me: error: ${CC} cannot produce win32 executables." >&2;}
{ (exit 1); exit 1; }; }
fi
+ if test "$MACHINE" != "ARM64"; then
+ extra_cflags="$extra_cflags -DHAVE_CPUID=1"
+ fi
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -mwindows -municode -Dmain=xxmain"
echo "$as_me:$LINENO: checking for working -municode linker flag" >&5
@@ -3892,7 +3902,7 @@ echo "$as_me: error: ${CC} does not support the -shared option.
echo "$as_me:$LINENO: result: Using 64-bit $MACHINE mode" >&5
echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6
;;
- arm64)
+ arm64|aarch64)
MACHINE="ARM64"
echo "$as_me:$LINENO: result: Using ARM64 $MACHINE mode" >&5
echo "${ECHO_T} Using ARM64 $MACHINE mode" >&6
@@ -3997,7 +4007,7 @@ echo "${ECHO_T}using shared flags" >&6
amd64|x64|yes)
MACHINE="AMD64" ; # assume AMD64 as default 64-bit build
;;
- arm64)
+ arm64|aarch64)
MACHINE="ARM64"
;;
ia64)
@@ -4021,8 +4031,7 @@ echo "${ECHO_T} Using 64-bit $MACHINE mode" >&6
if test "$do64bit" != "no" ; then
RC="rc"
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}"
+ CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}"
lflags="${lflags} -nologo -MACHINE:${MACHINE}"
LINKBIN="link"
# Avoid 'unresolved external symbol __security_cookie' errors.
diff --git a/win/tcl.m4 b/win/tcl.m4
index e2117d2..d60e946 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -557,7 +557,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
SHLIB_SUFFIX=".dll"
# MACHINE is IX86 for LINK, but this is used by the manifest,
- # which requires x86|amd64|ia64.
+ # which requires x86|amd64|arm64|ia64.
MACHINE="X86"
if test "$GCC" = "yes"; then
@@ -582,6 +582,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
RANLIB="x86_64-w64-mingw32-ranlib"
RC="x86_64-w64-mingw32-windres"
;;
+ arm64|aarch64)
+ CC="aarch64-w64-mingw32-${CC}"
+ LD="aarch64-w64-mingw32-ld"
+ AR="aarch64-w64-mingw32-ar"
+ RANLIB="aarch64-w64-mingw32-ranlib"
+ RC="aarch64-w64-mingw32-windres"
+ ;;
*)
CC="i686-w64-mingw32-${CC}"
LD="i686-w64-mingw32-ld"
@@ -642,6 +649,9 @@ 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
+ extra_cflags="$extra_cflags -DHAVE_CPUID=1"
+ fi
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -mwindows -municode -Dmain=xxmain"
AC_CACHE_CHECK(for working -municode linker flag,
@@ -783,7 +793,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
MACHINE="AMD64" ; # assume AMD64 as default 64-bit build
AC_MSG_RESULT([ Using 64-bit $MACHINE mode])
;;
- arm64)
+ arm64|aarch64)
MACHINE="ARM64"
AC_MSG_RESULT([ Using ARM64 $MACHINE mode])
;;
@@ -841,7 +851,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
amd64|x64|yes)
MACHINE="AMD64" ; # assume AMD64 as default 64-bit build
;;
- arm64)
+ arm64|aarch64)
MACHINE="ARM64"
;;
ia64)
@@ -864,8 +874,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
if test "$do64bit" != "no" ; then
RC="rc"
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}"
+ CFLAGS_OPTIMIZE="-nologo -O2 ${runtime}"
lflags="${lflags} -nologo -MACHINE:${MACHINE}"
LINKBIN="link"
# Avoid 'unresolved external symbol __security_cookie' errors.