diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-01-21 15:46:16 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-01-21 15:46:16 (GMT) |
commit | 60150421819d8e02ef7c6b55a2ded6fecaf3424c (patch) | |
tree | 8f7b7fb6876427a456eb6dfdd44127911a9bc96b /win | |
parent | 4f9310b032722d011f7ebf6390f3c4ea0ad66662 (diff) | |
parent | 6e7980fe9485de0efd87b164ebbba7f4e4a5a31e (diff) | |
download | tcl-60150421819d8e02ef7c6b55a2ded6fecaf3424c.zip tcl-60150421819d8e02ef7c6b55a2ded6fecaf3424c.tar.gz tcl-60150421819d8e02ef7c6b55a2ded6fecaf3424c.tar.bz2 |
Merge 8.6
Diffstat (limited to 'win')
-rw-r--r-- | win/Makefile.in | 6 | ||||
-rwxr-xr-x | win/configure | 36 | ||||
-rw-r--r-- | win/rules.vc | 2 | ||||
-rw-r--r-- | win/tcl.m4 | 14 |
4 files changed, 54 insertions, 4 deletions
diff --git a/win/Makefile.in b/win/Makefile.in index c93f50a..127286c 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -687,13 +687,13 @@ tclPkgConfig.${OBJEXT}: tclPkgConfig.c # as DLL objects but none of the symbols should be exported tclStubLib.${OBJEXT}: tclStubLib.c - $(CC) -c $(CC_SWITCHES) -DSTATIC_BUILD @DEPARG@ $(CC_OBJNAME) + $(CC) -c $(CC_SWITCHES) -DSTATIC_BUILD @CFLAGS_NOLTO@ @DEPARG@ $(CC_OBJNAME) tclTomMathStubLib.${OBJEXT}: tclTomMathStubLib.c - $(CC) -c $(CC_SWITCHES) -DSTATIC_BUILD @DEPARG@ $(CC_OBJNAME) + $(CC) -c $(CC_SWITCHES) @CFLAGS_NOLTO@ @DEPARG@ $(CC_OBJNAME) tclOOStubLib.${OBJEXT}: tclOOStubLib.c - $(CC) -c $(CC_SWITCHES) -DSTATIC_BUILD @DEPARG@ $(CC_OBJNAME) + $(CC) -c $(CC_SWITCHES) @CFLAGS_NOLTO@ @DEPARG@ $(CC_OBJNAME) tclWinPanic.${OBJEXT}: tclWinPanic.c $(CC) -c $(CC_SWITCHES) -DSTATIC_BUILD @DEPARG@ $(CC_OBJNAME) diff --git a/win/configure b/win/configure index 5ad3d2f..97a680b 100755 --- a/win/configure +++ b/win/configure @@ -744,6 +744,7 @@ TOMMATH_LIBS ZLIB_LIBS TOMMATH_DLL_FILE ZLIB_DLL_FILE +CFLAGS_NOLTO CFLAGS_WARNING CFLAGS_OPTIMIZE CFLAGS_DEBUG @@ -4288,6 +4289,40 @@ printf "%s\n" "$ac_cv_municode" >&6; } else extra_cflags="$extra_cflags -DTCL_BROKEN_MAINARGS" fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working -fno-lto" >&5 +printf %s "checking for working -fno-lto... " >&6; } +if test ${ac_cv_nolto+y} +then : + printf %s "(cached) " >&6 +else $as_nop + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + ac_cv_nolto=yes +else $as_nop + ac_cv_nolto=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_nolto" >&5 +printf "%s\n" "$ac_cv_nolto" >&6; } + CFLAGS=$hold_cflags + if test "$ac_cv_nolto" = "yes" ; then + CFLAGS_NOLTO="-fno-lto" + else + CFLAGS_NOLTO="" + fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking compiler flags" >&5 @@ -4792,6 +4827,7 @@ printf "%s\n" "#define HAVE_CAST_TO_UNION 1" >>confdefs.h + # Cross-compiling case ${host_alias} in *mingw32*) diff --git a/win/rules.vc b/win/rules.vc index c8708cb..e678c34 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -1510,7 +1510,7 @@ pkgcflags_nostubs = $(appcflags_nostubs) $(PKGNAMEFLAGS) /DBUILD_$(PROJECT) # so we do not remove it from cflags. -GL may prevent extensions
# compiled with one VC version to fail to link against stubs library
# compiled with another VC version. Check for this and fix accordingly.
-stubscflags = $(cflags) $(PKGNAMEFLAGS) $(PRJ_DEFINES) $(OPTDEFINES) -Zl /DSTATIC_BUILD $(INCLUDES) $(USE_STUBS_DEFS)
+stubscflags = $(cflags) $(PKGNAMEFLAGS) $(PRJ_DEFINES) $(OPTDEFINES) /Zl /GL- /DSTATIC_BUILD $(INCLUDES) $(USE_STUBS_DEFS)
# Link flags
@@ -455,6 +455,7 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [ # CFLAGS_DEBUG # CFLAGS_OPTIMIZE # CFLAGS_WARNING +# CFLAGS_NOLTO # LDFLAGS_DEBUG # LDFLAGS_OPTIMIZE # LDFLAGS_CONSOLE @@ -604,6 +605,18 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ else extra_cflags="$extra_cflags -DTCL_BROKEN_MAINARGS" fi + AC_CACHE_CHECK(for working -fno-lto, + ac_cv_nolto, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], + [ac_cv_nolto=yes], + [ac_cv_nolto=no]) + ) + CFLAGS=$hold_cflags + if test "$ac_cv_nolto" = "yes" ; then + CFLAGS_NOLTO="-fno-lto" + else + CFLAGS_NOLTO="" + fi fi AC_MSG_CHECKING([compiler flags]) @@ -940,6 +953,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AC_SUBST(CFLAGS_DEBUG) AC_SUBST(CFLAGS_OPTIMIZE) AC_SUBST(CFLAGS_WARNING) + AC_SUBST(CFLAGS_NOLTO) ]) #------------------------------------------------------------------------ |