diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-10-29 14:09:10 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-10-29 14:09:10 (GMT) |
commit | 5dab749a31b11a06605c7236dae5c91b0d74a760 (patch) | |
tree | 95216ac91690e94865ff1d918172e87318a0bc95 | |
parent | 6c33a5829de2164ea44a4b04a48188bdc4633b48 (diff) | |
parent | ac0e4f752a2eaa41e81125e91e90c17759d7ed79 (diff) | |
download | tk-5dab749a31b11a06605c7236dae5c91b0d74a760.zip tk-5dab749a31b11a06605c7236dae5c91b0d74a760.tar.gz tk-5dab749a31b11a06605c7236dae5c91b0d74a760.tar.bz2 |
Always compile with -D__USE_MINGW_ANSI_STDIO=0.
Fix implib library names
Fix win64 build using high-entropy-va opotion
-rw-r--r-- | win/Makefile.in | 14 | ||||
-rwxr-xr-x | win/configure | 8 | ||||
-rw-r--r-- | win/configure.in | 6 | ||||
-rw-r--r-- | win/tcl.m4 | 2 | ||||
-rw-r--r-- | win/tkWin32Dll.c | 2 |
5 files changed, 20 insertions, 12 deletions
diff --git a/win/Makefile.in b/win/Makefile.in index c561f61..e2b4dd9 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -129,20 +129,22 @@ TCL_SRC_DIR_NATIVE = $(shell $(CYGPATH) '$(TCL_SRC_DIR)') DLLSUFFIX = @DLLSUFFIX@ LIBSUFFIX = @LIBSUFFIX@ EXESUFFIX = @EXESUFFIX@ +VER = @TK_MAJOR_VERSION@@TK_MINOR_VERSION@ +DOTVER = @TK_MAJOR_VERSION@.@TK_MINOR_VERSION@ TK_STUB_LIB_FILE = @TK_STUB_LIB_FILE@ TK_LIB_FILE = @TK_LIB_FILE@ TK_DLL_FILE = @TK_DLL_FILE@ TEST_DLL_FILE = tktest$(VER)${DLLSUFFIX} -TEST_LIB_FILE = @LIBPREFIX@tktest$(VER)${LIBSUFFIX} +TEST_LIB_FILE = @LIBPREFIX@tktest$(VER)${DLLSUFFIX}${LIBSUFFIX} SHARED_LIBRARIES = $(TK_DLL_FILE) $(TK_STUB_LIB_FILE) STATIC_LIBRARIES = $(TK_LIB_FILE) WISH = wish$(VER)${EXESUFFIX} -TKTEST = tktest.exe -CAT32 = cat32.exe -MAN2TCL = man2tcl.exe +TKTEST = tktest${EXESUFFIX} +CAT32 = cat32${EXESUFFIX} +MAN2TCL = man2tcl${EXESUFFIX} @SET_MAKE@ @@ -168,7 +170,7 @@ LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@ #CFLAGS = $(CFLAGS_DEBUG) #CFLAGS = $(CFLAGS_OPTIMIZE) #CFLAGS = $(CFLAGS_DEBUG) $(CFLAGS_OPTIMIZE) -CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -D_ATL_XP_TARGETING +CFLAGS = @CFLAGS@ @CFLAGS_DEFAULT@ -D_ATL_XP_TARGETING=1 -D__USE_MINGW_ANSI_STDIO=0 # Special compiler flags to use when building man2tcl on Windows. MAN2TCLFLAGS = @MAN2TCLFLAGS@ @@ -190,8 +192,6 @@ SHLIB_LD = @SHLIB_LD@ SHLIB_LD_LIBS = @SHLIB_LD_LIBS@ SHLIB_CFLAGS = @SHLIB_CFLAGS@ SHLIB_SUFFIX = @SHLIB_SUFFIX@ -VER = @TK_MAJOR_VERSION@@TK_MINOR_VERSION@ -DOTVER = @TK_MAJOR_VERSION@.@TK_MINOR_VERSION@ LIBS = $(TCL_STUB_LIB_FILE) @LIBS@ @LIBS_GUI@ RMDIR = rm -rf MKDIR = mkdir -p diff --git a/win/configure b/win/configure index cc28aa3..461eda2 100755 --- a/win/configure +++ b/win/configure @@ -3713,7 +3713,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" @@ -4957,7 +4957,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 e745000..0617e24 100644 --- a/win/configure.in +++ b/win/configure.in @@ -166,7 +166,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 !!!! @@ -715,7 +715,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 */ |