Skip to content

Commit e6c298b

Browse files
author
jan.nijtmans
committed
TEA update
1 parent d0e0c12 commit e6c298b

3 files changed

Lines changed: 52 additions & 12 deletions

File tree

configure

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3989,8 +3989,11 @@ printf "%s\n" "$TEA_PLATFORM" >&6; }
39893989

39903990
# The BUILD_$pkg is to define the correct extern storage class
39913991
# handling when making this package
3992+
# To be able to sefely use the package name in a #define, it must not
3993+
# contain anything other than alphanumeric characters and underscores
3994+
SAFE_PKG_NAME=sample
39923995

3993-
printf "%s\n" "#define BUILD_${PACKAGE_NAME} /**/" >>confdefs.h
3996+
printf "%s\n" "#define BUILD_${SAFE_PKG_NAME} /**/" >>confdefs.h
39943997

39953998
# Do this here as we have fully defined TEA_PLATFORM now
39963999
if test "${TEA_PLATFORM}" = "windows" ; then
@@ -6527,6 +6530,7 @@ fi
65276530
MACHINE="IA64"
65286531
;;
65296532
esac
6533+
do64bit_ok=yes
65306534
fi
65316535

65326536
if test "$GCC" != "yes" ; then
@@ -9033,6 +9037,42 @@ printf "%s\n" "#define TK_MAJOR_VERSION 8" >>confdefs.h
90339037
if test "$GCC" = "yes"; then
90349038
SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
90359039
fi
9040+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker understands --disable-high-entropy-va" >&5
9041+
printf %s "checking if the linker understands --disable-high-entropy-va... " >&6; }
9042+
if test ${tcl_cv_ld_high_entropy+y}
9043+
then :
9044+
printf %s "(cached) " >&6
9045+
else case e in #(
9046+
e)
9047+
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Wl,--disable-high-entropy-va"
9048+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9049+
/* end confdefs.h. */
9050+
9051+
int
9052+
main (void)
9053+
{
9054+
9055+
;
9056+
return 0;
9057+
}
9058+
_ACEOF
9059+
if ac_fn_c_try_link "$LINENO"
9060+
then :
9061+
tcl_cv_ld_high_entropy=yes
9062+
else case e in #(
9063+
e) tcl_cv_ld_high_entropy=no ;;
9064+
esac
9065+
fi
9066+
rm -f core conftest.err conftest.$ac_objext conftest.beam \
9067+
conftest$ac_exeext conftest.$ac_ext
9068+
CFLAGS=$hold_cflags ;;
9069+
esac
9070+
fi
9071+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_high_entropy" >&5
9072+
printf "%s\n" "$tcl_cv_ld_high_entropy" >&6; }
9073+
if test $tcl_cv_ld_high_entropy = yes; then
9074+
SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--disable-high-entropy-va"
9075+
fi
90369076
eval eval "PKG_LIB_FILE8=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
90379077
eval eval "PKG_LIB_FILE9=${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
90389078
eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"

win/nmakehlp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ CheckForCompilerFeature(
271271
if (!ok) {
272272
DWORD err = GetLastError();
273273
int chars = snprintf(msg, sizeof(msg) - 1,
274-
"Tried to launch: \"%s\", but got error [%u]: ", cmdline, err);
274+
"Tried to launch: \"%s\", but got error [%lu]: ", cmdline, err);
275275

276276
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS|
277277
FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPSTR)&msg[chars],
@@ -405,12 +405,12 @@ CheckForLinkerFeature(
405405
if (!ok) {
406406
DWORD err = GetLastError();
407407
int chars = snprintf(msg, sizeof(msg) - 1,
408-
"Tried to launch: \"%s\", but got error [%u]: ", cmdline, err);
408+
"Tried to launch: \"%s\", but got error [%lu]: ", cmdline, err);
409409

410410
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS|
411411
FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPSTR)&msg[chars],
412412
(300-chars), 0);
413-
WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, lstrlen(msg), &err,NULL);
413+
WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, lstrlen(msg), &err, NULL);
414414
return 2;
415415
}
416416

@@ -797,7 +797,7 @@ static int LocateDependency(const char *keypath)
797797
{
798798
size_t i;
799799
int ret;
800-
static const char *paths[] = {"..", "..\\..", "..\\..\\.."};
800+
static const char *const paths[] = {"..", "..\\..", "..\\..\\.."};
801801

802802
for (i = 0; i < (sizeof(paths)/sizeof(paths[0])); ++i) {
803803
ret = LocateDependencyHelper(paths[i], keypath);

win/rules.vc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -804,10 +804,10 @@ DOTSEPARATED=$(DOTSEPARATED:b=.)
804804
# MSVCRT - 1 -> link to dynamic C runtime even when building static Tcl build
805805
# 0 -> link to static C runtime for static Tcl build.
806806
# Does not impact shared Tcl builds (STATIC_BUILD == 0)
807-
# Default: 1 for Tcl 8.7 and up, 0 otherwise.
807+
# Default: 1 for Tcl 9.0 and up, 0 otherwise.
808808
# TCL_USE_STATIC_PACKAGES - 1 -> statically link the registry and dde extensions
809809
# in the Tcl and Wish shell. 0 -> keep them as shared libraries. Does
810-
# not impact shared Tcl builds. Implied by STATIC_BUILD since Tcl 8.7.
810+
# not impact shared Tcl builds. Implied by STATIC_BUILD since Tcl 9.0.
811811
# USE_THREAD_ALLOC - 1 -> Use a shared global free pool for allocation.
812812
# 0 -> Use the non-thread allocator.
813813
# UNCHECKED - 1 -> when doing a debug build with symbols, use the release
@@ -1042,7 +1042,7 @@ WARNINGS = $(WARNINGS) -Wp64
10421042
# different compilers, build configurations etc.,
10431043
#
10441044
# Naming convention (suffixes):
1045-
# t = full thread support. (Not used for Tcl >= 8.7)
1045+
# t = full thread support. (Not used for Tcl >= 9.0)
10461046
# s = static library (as opposed to an import library)
10471047
# g = linked to the debug enabled C run-time.
10481048
# x = special static build when it links to the dynamic C run-time.
@@ -1173,7 +1173,7 @@ TCLSTUBLIB = $(_TCLDIR)\lib\tclstub.lib
11731173
!endif
11741174
TCLIMPLIB = $(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX:t=).lib
11751175
# When building extensions, may be linking against Tcl that does not add
1176-
# "t" suffix (e.g. 8.5 or 8.7). If lib not found check for that possibility.
1176+
# "t" suffix (e.g. 8.6). If lib not found check for that possibility.
11771177
!if !exist("$(TCLIMPLIB)")
11781178
TCLIMPLIB = $(_TCLDIR)\lib\tcl$(TCL_VERSION)t$(SUFX:t=).lib
11791179
!endif
@@ -1197,7 +1197,7 @@ TCLSTUBLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub.lib
11971197
!endif
11981198
TCLIMPLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX:t=).lib
11991199
# When building extensions, may be linking against Tcl that does not add
1200-
# "t" suffix (e.g. 8.5 or 8.7). If lib not found check for that possibility.
1200+
# "t" suffix (e.g. 8.6). If lib not found check for that possibility.
12011201
!if !exist("$(TCLIMPLIB)")
12021202
TCLIMPLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)t$(SUFX:t=).lib
12031203
!endif
@@ -1262,7 +1262,7 @@ WISH = $(_TKDIR)\bin\$(WISHNAME)
12621262
TKSTUBLIB = $(_TKDIR)\lib\$(TKSTUBLIBNAME)
12631263
TKIMPLIB = $(_TKDIR)\lib\$(TKIMPLIBNAME)
12641264
# When building extensions, may be linking against Tk that does not add
1265-
# "t" suffix (e.g. 8.5 or 8.7). If lib not found check for that possibility.
1265+
# "t" suffix (e.g. 8.6). If lib not found check for that possibility.
12661266
!if !exist("$(TKIMPLIB)")
12671267
TKIMPLIBNAME = tk$(TK_VERSION)$(SUFX:t=).lib
12681268
TKIMPLIB = $(_TKDIR)\lib\$(TKIMPLIBNAME)
@@ -1276,7 +1276,7 @@ WISH = $(_TKDIR)\win\$(BUILDDIRTOP)\$(WISHNAME)
12761276
TKSTUBLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKSTUBLIBNAME)
12771277
TKIMPLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKIMPLIBNAME)
12781278
# When building extensions, may be linking against Tk that does not add
1279-
# "t" suffix (e.g. 8.5 or 8.7). If lib not found check for that possibility.
1279+
# "t" suffix (e.g. 8.6). If lib not found check for that possibility.
12801280
!if !exist("$(TKIMPLIB)")
12811281
TKIMPLIBNAME = tk$(TK_VERSION)$(SUFX:t=).lib
12821282
TKIMPLIB = $(_TKDIR)\win\$(BUILDDIRTOP)\$(TKIMPLIBNAME)

0 commit comments

Comments
 (0)