summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-29 12:13:36 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-29 12:13:36 (GMT)
commitac0e4f752a2eaa41e81125e91e90c17759d7ed79 (patch)
treea23af8bc1b8c5b4a8ea4aa9b27c21c928710bf8a /win
parent561fe24459c6d4f750c4ebe2a138aa563b1fb58c (diff)
parent1006de1bd6db7a02ce00f2b1bc5376c169498b08 (diff)
downloadtk-ac0e4f752a2eaa41e81125e91e90c17759d7ed79.zip
tk-ac0e4f752a2eaa41e81125e91e90c17759d7ed79.tar.gz
tk-ac0e4f752a2eaa41e81125e91e90c17759d7ed79.tar.bz2
Always compile with -D__USE_MINGW_ANSI_STDIO=0.
Fix implib library names Fix win64 build using high-entropy-va opotion
Diffstat (limited to 'win')
-rw-r--r--win/Makefile.in2
-rwxr-xr-xwin/configure8
-rw-r--r--win/configure.in6
-rw-r--r--win/tcl.m42
-rw-r--r--win/tkWin32Dll.c2
5 files changed, 14 insertions, 6 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index de3f2ae..7d79267 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -170,7 +170,7 @@ NO_DEPRECATED_FLAGS =
#CFLAGS = $(CFLAGS_DEBUG)
#CFLAGS = $(CFLAGS_OPTIMIZE)
#CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE)
-CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ $(NO_DEPRECATED_FLAGS) -D_ATL_XP_TARGETING
+CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ $(NO_DEPRECATED_FLAGS) -D_ATL_XP_TARGETING=1 -D__USE_MINGW_ANSI_STDIO=0
# Special compiler flags to use when building man2tcl on Windows.
MAN2TCLFLAGS = @MAN2TCLFLAGS@
diff --git a/win/configure b/win/configure
index 650e46c..4af36d6 100755
--- a/win/configure
+++ b/win/configure
@@ -3628,7 +3628,7 @@ echo "$as_me: error: ${CC} does not support the -shared option.
SHLIB_LD='${CC} -shared'
SHLIB_LD_LIBS='${LIBS}'
MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \$@ ${extra_ldflags} \
- -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\$@)"
+ -Wl,--out-implib,\$(patsubst %.dll,lib%.dll.a,\$@)"
# DLLSUFFIX is separate because it is the building block for
# users of tclConfig.sh that may build shared or static.
DLLSUFFIX="\${DBGX}.dll"
@@ -4806,7 +4806,11 @@ TK_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
eval "TK_SRC_DIR=\"`cd $srcdir/..; pwd`\""
eval "TK_DLL_FILE=tk$VER${DLLSUFFIX}"
-eval "TK_LIB_FILE=${LIBPREFIX}tk$VER${LIBSUFFIX}"
+if test ${SHARED_BUILD} = 0 ; then
+ eval "TK_LIB_FILE=\"${LIBPREFIX}tk${VER}${LIBSUFFIX}\""
+else
+ eval "TK_LIB_FILE=\"${LIBPREFIX}tk${VER}${DLLSUFFIX}.a\""
+fi
eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}"
# FIXME: All of this var junk needs to be done in tcl.m4 !!!!
diff --git a/win/configure.in b/win/configure.in
index 9dd7fb8..ead30e3 100644
--- a/win/configure.in
+++ b/win/configure.in
@@ -152,7 +152,11 @@ TK_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
eval "TK_SRC_DIR=\"`cd $srcdir/..; pwd`\""
eval "TK_DLL_FILE=tk$VER${DLLSUFFIX}"
-eval "TK_LIB_FILE=${LIBPREFIX}tk$VER${LIBSUFFIX}"
+if test ${SHARED_BUILD} = 0 ; then
+ eval "TK_LIB_FILE=\"${LIBPREFIX}tk${VER}${LIBSUFFIX}\""
+else
+ eval "TK_LIB_FILE=\"${LIBPREFIX}tk${VER}${DLLSUFFIX}.a\""
+fi
eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}"
# FIXME: All of this var junk needs to be done in tcl.m4 !!!!
diff --git a/win/tcl.m4 b/win/tcl.m4
index 5abc0e6..4932788 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -697,7 +697,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
SHLIB_LD='${CC} -shared'
SHLIB_LD_LIBS='${LIBS}'
MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -o \[$]@ ${extra_ldflags} \
- -Wl,--out-implib,\$(patsubst %.dll,lib%.a,\[$]@)"
+ -Wl,--out-implib,\$(patsubst %.dll,lib%.dll.a,\[$]@)"
# DLLSUFFIX is separate because it is the building block for
# users of tclConfig.sh that may build shared or static.
DLLSUFFIX="\${DBGX}.dll"
diff --git a/win/tkWin32Dll.c b/win/tkWin32Dll.c
index 88b0507..8cfddee 100644
--- a/win/tkWin32Dll.c
+++ b/win/tkWin32Dll.c
@@ -134,7 +134,7 @@ DllMain(
"leaq %[registration], %%rdx" "\n\t"
"movq %%gs:0, %%rax" "\n\t"
"movq %%rax, 0x0(%%rdx)" "\n\t" /* link */
- "leaq 1f, %%rax" "\n\t"
+ "leaq 1f(%%rip), %%rax" "\n\t"
"movq %%rax, 0x8(%%rdx)" "\n\t" /* handler */
"movq %%rbp, 0x10(%%rdx)" "\n\t" /* rbp */
"movq %%rsp, 0x18(%%rdx)" "\n\t" /* rsp */