Skip to content

Commit e793a04

Browse files
author
jan.nijtmans
committed
TEA update
1 parent 5ca88f1 commit e793a04

File tree

4 files changed

+93
-4
lines changed

4 files changed

+93
-4
lines changed

configure

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

40944094
# The BUILD_$pkg is to define the correct extern storage class
40954095
# handling when making this package
4096+
# To be able to sefely use the package name in a #define, it must not
4097+
# contain anything other than alphanumeric characters and underscores
4098+
SAFE_PKG_NAME=itcl
40964099

4097-
printf "%s\n" "#define BUILD_${PACKAGE_NAME} /**/" >>confdefs.h
4100+
printf "%s\n" "#define BUILD_${SAFE_PKG_NAME} /**/" >>confdefs.h
40984101

40994102
# Do this here as we have fully defined TEA_PLATFORM now
41004103
if test "${TEA_PLATFORM}" = "windows" ; then
@@ -9333,6 +9336,42 @@ printf "%s\n" "#define TK_MAJOR_VERSION 8" >>confdefs.h
93339336
if test "$GCC" = "yes"; then
93349337
SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
93359338
fi
9339+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker understands --disable-high-entropy-va" >&5
9340+
printf %s "checking if the linker understands --disable-high-entropy-va... " >&6; }
9341+
if test ${tcl_cv_ld_high_entropy+y}
9342+
then :
9343+
printf %s "(cached) " >&6
9344+
else case e in #(
9345+
e)
9346+
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Wl,--disable-high-entropy-va"
9347+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9348+
/* end confdefs.h. */
9349+
9350+
int
9351+
main (void)
9352+
{
9353+
9354+
;
9355+
return 0;
9356+
}
9357+
_ACEOF
9358+
if ac_fn_c_try_link "$LINENO"
9359+
then :
9360+
tcl_cv_ld_high_entropy=yes
9361+
else case e in #(
9362+
e) tcl_cv_ld_high_entropy=no ;;
9363+
esac
9364+
fi
9365+
rm -f core conftest.err conftest.$ac_objext conftest.beam \
9366+
conftest$ac_exeext conftest.$ac_ext
9367+
CFLAGS=$hold_cflags ;;
9368+
esac
9369+
fi
9370+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_high_entropy" >&5
9371+
printf "%s\n" "$tcl_cv_ld_high_entropy" >&6; }
9372+
if test $tcl_cv_ld_high_entropy = yes; then
9373+
SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--disable-high-entropy-va"
9374+
fi
93369375
eval eval "PKG_LIB_FILE8=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
93379376
eval eval "PKG_LIB_FILE9=${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
93389377
eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ eval itcl_SRC_DIR="$srcdir"
263263
itcl_SRC_DIR=`cd "${itcl_SRC_DIR}"; pwd`
264264
AC_SUBST(itcl_SRC_DIR)
265265

266-
eval itcl_INCLUDE_SPEC=\"-I${itcl_SRC_DIR}/generic\"
266+
eval itcl_INCLUDE_SPEC=\"\\\"-I${itcl_SRC_DIR}/generic\\\"\"
267267
AC_SUBST(itcl_INCLUDE_SPEC)
268268

269269
#--------------------------------------------------------------------

itclWidget/configure

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

40434043
# The BUILD_$pkg is to define the correct extern storage class
40444044
# handling when making this package
4045+
# To be able to sefely use the package name in a #define, it must not
4046+
# contain anything other than alphanumeric characters and underscores
4047+
SAFE_PKG_NAME=itclwidget
40454048

4046-
printf "%s\n" "#define BUILD_${PACKAGE_NAME} /**/" >>confdefs.h
4049+
printf "%s\n" "#define BUILD_${SAFE_PKG_NAME} /**/" >>confdefs.h
40474050

40484051
# Do this here as we have fully defined TEA_PLATFORM now
40494052
if test "${TEA_PLATFORM}" = "windows" ; then
@@ -9926,6 +9929,42 @@ printf "%s\n" "#define TK_MAJOR_VERSION 8" >>confdefs.h
99269929
if test "$GCC" = "yes"; then
99279930
SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
99289931
fi
9932+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker understands --disable-high-entropy-va" >&5
9933+
printf %s "checking if the linker understands --disable-high-entropy-va... " >&6; }
9934+
if test ${tcl_cv_ld_high_entropy+y}
9935+
then :
9936+
printf %s "(cached) " >&6
9937+
else case e in #(
9938+
e)
9939+
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Wl,--disable-high-entropy-va"
9940+
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9941+
/* end confdefs.h. */
9942+
9943+
int
9944+
main (void)
9945+
{
9946+
9947+
;
9948+
return 0;
9949+
}
9950+
_ACEOF
9951+
if ac_fn_c_try_link "$LINENO"
9952+
then :
9953+
tcl_cv_ld_high_entropy=yes
9954+
else case e in #(
9955+
e) tcl_cv_ld_high_entropy=no ;;
9956+
esac
9957+
fi
9958+
rm -f core conftest.err conftest.$ac_objext conftest.beam \
9959+
conftest$ac_exeext conftest.$ac_ext
9960+
CFLAGS=$hold_cflags ;;
9961+
esac
9962+
fi
9963+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_ld_high_entropy" >&5
9964+
printf "%s\n" "$tcl_cv_ld_high_entropy" >&6; }
9965+
if test $tcl_cv_ld_high_entropy = yes; then
9966+
SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--disable-high-entropy-va"
9967+
fi
99299968
eval eval "PKG_LIB_FILE8=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
99309969
eval eval "PKG_LIB_FILE9=${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
99319970
eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"

itclWidget/tclconfig/tcl.m4

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,10 @@ AC_DEFUN([TEA_LOAD_TCLCONFIG], [
453453
454454
# The BUILD_$pkg is to define the correct extern storage class
455455
# handling when making this package
456-
AC_DEFINE_UNQUOTED(BUILD_${PACKAGE_NAME}, [],
456+
# To be able to sefely use the package name in a #define, it must not
457+
# contain anything other than alphanumeric characters and underscores
458+
SAFE_PKG_NAME=patsubst(AC_PACKAGE_NAME, [[^A-Za-z0-9_]], [_])
459+
AC_DEFINE_UNQUOTED(BUILD_${SAFE_PKG_NAME}, [],
457460
[Building extension source?])
458461
# Do this here as we have fully defined TEA_PLATFORM now
459462
if test "${TEA_PLATFORM}" = "windows" ; then
@@ -3233,6 +3236,14 @@ print("manifest needed")
32333236
if test "$GCC" = "yes"; then
32343237
SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -static-libgcc"
32353238
fi
3239+
AC_CACHE_CHECK([if the linker understands --disable-high-entropy-va],
3240+
tcl_cv_ld_high_entropy, [
3241+
hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -Wl,--disable-high-entropy-va"
3242+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[tcl_cv_ld_high_entropy=yes],[tcl_cv_ld_high_entropy=no])
3243+
CFLAGS=$hold_cflags])
3244+
if test $tcl_cv_ld_high_entropy = yes; then
3245+
SHLIB_LD_LIBS="${SHLIB_LD_LIBS} -Wl,--disable-high-entropy-va"
3246+
fi
32363247
eval eval "PKG_LIB_FILE8=${PACKAGE_LIB_PREFIX8}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
32373248
eval eval "PKG_LIB_FILE9=${PACKAGE_LIB_PREFIX9}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"
32383249
eval eval "PKG_LIB_FILE=${PACKAGE_LIB_PREFIX}${PACKAGE_NAME}${SHARED_LIB_SUFFIX}"

0 commit comments

Comments
 (0)