From 4e6e68ad12b560fd6b201d043653fe8b62ee82a6 Mon Sep 17 00:00:00 2001 From: aspect Date: Fri, 19 May 2017 14:21:46 +0000 Subject: fix build failure with TCL_MEM_DEBUG introduced by [8b717dc06a3e3d49] --- generic/tclInt.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generic/tclInt.h b/generic/tclInt.h index 2938074..7b582c0 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -4766,9 +4766,9 @@ MODULE_SCOPE Tcl_PackageInitProc Procbodytest_SafeInit; #define TclSmallFreeEx(interp, memPtr) \ do { \ Tcl_Obj *_objPtr = (Tcl_Obj *) memPtr; \ - objPtr->bytes = NULL; \ - objPtr->typePtr = NULL; \ - objPtr->refCount = 1; \ + _objPtr->bytes = NULL; \ + _objPtr->typePtr = NULL; \ + _objPtr->refCount = 1; \ TclDecrRefCount(_objPtr); \ } while (0) #endif /* TCL_MEM_DEBUG */ -- cgit v0.12 From dd764b5c8712f19c50ea29ba883d363a3f1fd673 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 21 May 2017 17:42:16 +0000 Subject: Cherrypick Fix build on OpenBSD. [82701b94c4] missed a couple of bits. Tcl/Tk's tcl.m4 isn't identical to TEA's tcl.m4 - be careful! --- unix/configure | 4 +++- unix/tcl.m4 | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/unix/configure b/unix/configure index 8531e81..1ebe843 100755 --- a/unix/configure +++ b/unix/configure @@ -7525,13 +7525,15 @@ fi esac SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" if test $doRpath = yes; then CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}' fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' LDFLAGS="-Wl,-export-dynamic" CFLAGS_OPTIMIZE="-O2" if test "${TCL_THREADS}" = "1"; then diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 22fe8c9..26b2a4a 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1476,10 +1476,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ esac SHLIB_LD='${CC} -shared ${SHLIB_CFLAGS}' SHLIB_SUFFIX=".so" + DL_OBJS="tclLoadDl.o" + DL_LIBS="" AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' LDFLAGS="-Wl,-export-dynamic" CFLAGS_OPTIMIZE="-O2" AS_IF([test "${TCL_THREADS}" = "1"], [ -- cgit v0.12 From 61d54fc957f28469aee7b7eb9db7403ac5839105 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 22 May 2017 08:53:04 +0000 Subject: If SHLIB_VERSION is specified as empty, don't let the SHLIB filename end with a dot (taken over from TEA) Cherry-pick [http://core.tcl.tk/tclconfig/info/c8eddeddb9bbabc4|c8eddeddb9] from TEA: Added /usr/pkg/lib to the paths searched on the journey to find tclConfig.sh --- unix/tcl.m4 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 26b2a4a..8a802fb 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -91,8 +91,9 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ for i in `ls -d ${libdir} 2>/dev/null` \ `ls -d ${exec_prefix}/lib 2>/dev/null` \ `ls -d ${prefix}/lib 2>/dev/null` \ - `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ + `ls -d /usr/local/lib 2>/dev/null` \ + `ls -d /usr/pkg/lib 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ ; do @@ -611,7 +612,6 @@ AC_DEFUN([SC_ENABLE_FRAMEWORK], [ # TCL_THREADS # _REENTRANT # _THREAD_SAFE -# #------------------------------------------------------------------------ AC_DEFUN([SC_ENABLE_THREADS], [ @@ -727,7 +727,6 @@ AC_DEFUN([SC_ENABLE_THREADS], [ # Sets to $(LDFLAGS_OPTIMIZE) if false # DBGX Formerly used as debug library extension; # always blank now. -# #------------------------------------------------------------------------ AC_DEFUN([SC_ENABLE_SYMBOLS], [ @@ -977,7 +976,7 @@ AC_DEFUN([SC_CONFIG_SYSTEM], [ # SHLIB_LD_LIBS - Dependent libraries for the linker to scan when # creating shared libraries. This symbol typically # goes at the end of the "ld" commands that build -# shared libraries. The value of the symbol is +# shared libraries. The value of the symbol defaults to # "${LIBS}" if all of the dependent libraries should # be specified when creating a shared library. If # dependent libraries should not be specified (as on @@ -1107,7 +1106,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ PLAT_OBJS="" PLAT_SRCS="" LDAIX_SRC="" - AS_IF([test x"${SHLIB_VERSION}" = x], [SHLIB_VERSION="1.0"]) + AS_IF([test "x${SHLIB_VERSION}" = x],[SHLIB_VERSION=".1.0"],[SHLIB_VERSION=".${SHLIB_VERSION}"]) case $system in AIX-*) AS_IF([test "${TCL_THREADS}" = "1" -a "$GCC" != "yes"], [ @@ -1481,7 +1480,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ AS_IF([test $doRpath = yes], [ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}']) LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}' LDFLAGS="-Wl,-export-dynamic" CFLAGS_OPTIMIZE="-O2" AS_IF([test "${TCL_THREADS}" = "1"], [ @@ -1804,7 +1803,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ # requires an extra version number at the end of .so file names. # So, the library has to have a name like libtcl75.so.1.0 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}' UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; -- cgit v0.12 From f6e07341e6d9bc5be18d57dc08c1bed03f036212 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 22 May 2017 09:04:22 +0000 Subject: autoconf --- unix/configure | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/unix/configure b/unix/configure index 1ebe843..3e3b4c4 100755 --- a/unix/configure +++ b/unix/configure @@ -6650,8 +6650,10 @@ fi PLAT_OBJS="" PLAT_SRCS="" LDAIX_SRC="" - if test x"${SHLIB_VERSION}" = x; then - SHLIB_VERSION="1.0" + if test "x${SHLIB_VERSION}" = x; then + SHLIB_VERSION=".1.0" +else + SHLIB_VERSION=".${SHLIB_VERSION}" fi case $system in @@ -7533,7 +7535,7 @@ fi fi LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}' LDFLAGS="-Wl,-export-dynamic" CFLAGS_OPTIMIZE="-O2" if test "${TCL_THREADS}" = "1"; then @@ -8274,7 +8276,7 @@ fi # requires an extra version number at the end of .so file names. # So, the library has to have a name like libtcl75.so.1.0 - SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so.${SHLIB_VERSION}' + SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}' UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots ;; -- cgit v0.12