pkgsrc/lang/tcl/patches/patch-af

128 lines
4.5 KiB
Text
Raw Normal View History

$NetBSD: patch-af,v 1.13 2004/11/26 10:30:01 adam Exp $
--- tcl.m4.orig 2004-11-19 18:49:51.000000000 +0000
+++ tcl.m4
@@ -826,6 +826,7 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
Update to version 8.3.4 Besides more bug fixes and several enhancements some of the NetBSD relevant changes (taken from "changes" in the distribution): 2001-04-03 (doc fixes) numerous doc corrections and clarifications. Update of READMEs. 2001-03-29 (bug fix) prevent potential race condition and security leak in tmp filename creation on Unix. (max) 2001-03-13 (bug fix) Correctly possible memory corruption in string map {} $str (fellows) 2001-01-30 (bug fix) Fixed possible hangs in fcopy. (porter) 2000-11-23 (mem leak) fixed potential memory leak in error case of lsort (fellows) 2000-11-01 (mem leak) Corrected excessive mem use of info exists on a non-existent array element (hobbs) 2000-09-27 (bug fix) fixed a bug introduced by a partial fix in 8.3.2 that didn't set nonBlocking correctly when resetting the flags for the write side (mem leak) Correct mem leak in channels when statePtr was released (hobbs) 2001-07-18 (bug fix) corrected memory overwrite error when buffer size of a channel is changed after channel use has already begun (kupries, porter) 2001-08-07 (bug fix) corrected bytecode stack management during [break] (see test foreach-5.5) (sofer, tallneil, jstrot) 2001-08-08 (new features) updated packages msgcat 1.1.1, opt 0.4.3, tcltest 1.0.1, dependencies checked (porter) 2001-08-24 (bug fix) [auto_import] now matches patterns like [namespace import], not like [string match] (porter) **** POTENTIAL INCOMPATABILITY **** 2001-08-27 (new feature) added Tcl_SetMainLoop() to enable loading Tk as a true package (hobbs) 2001-09-06 (new feature) http 2.4: honor the Content-encoding and charset parameters; add -binary switch for forcing the issue (hobbs, saoukhi, orwell) 2001-09-10 (bug fix) protect against alias loops (hobbs) 2001-09-19 (bug fix) [format] and [scan] corrected for 64-bit machines (rmax) 2001-09-26 (bug fix) corrected potential deadlock in channels that do not provide a BlockModeProc (kupries, kogorman) 2001-10-11 (bug fix) corrected cleanup of self-referential bytecodes at interpreter deletion (sofer, rbrunner)
2001-12-23 18:02:30 +01:00
# Step 3: set configuration options based on system name and version.
do64bit_ok=no
+ TCL_LIB_SPEC_RPATH=""
LDFLAGS_ORIG="$LDFLAGS"
TCL_EXPORT_FILE_SUFFIX=""
UNSHARED_LIB_SUFFIX=""
@@ -1100,6 +1101,9 @@ dnl AC_CHECK_TOOL(AR, ar)
DL_LIBS=""
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ TCL_LIB_VERSIONS_OK=nodots
;;
IRIX-6.*)
SHLIB_CFLAGS=""
@@ -1125,6 +1129,9 @@ dnl AC_CHECK_TOOL(AR, ar)
esac
LDFLAGS="$LDFLAGS -n32"
fi
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ TCL_LIB_VERSIONS_OK=nodots
;;
IRIX64-6.*)
SHLIB_CFLAGS=""
@@ -1148,6 +1155,9 @@ dnl AC_CHECK_TOOL(AR, ar)
LDFLAGS="$LDFLAGS -64"
fi
fi
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ TCL_LIB_VERSIONS_OK=nodots
;;
Linux*)
SHLIB_CFLAGS="-fPIC"
@@ -1193,6 +1203,9 @@ dnl AC_CHECK_TOOL(AR, ar)
# XIM peeking works under XFree86.
AC_DEFINE(PEEK_XCLOSEIM)
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ TCL_LIB_VERSIONS_OK=nodots
;;
GNU*)
SHLIB_CFLAGS="-fPIC"
@@ -1240,28 +1253,36 @@ dnl AC_CHECK_TOOL(AR, ar)
LD_SEARCH_FLAGS=""
;;
NetBSD-*|FreeBSD-[[1-2]].*)
+ if test "X${COMPILER_OPTIMIZATION_BUG}" = "XYES"; then
+ CFLAGS_OPTIMIZE=-O0
+ fi
# Not available on all versions: check for include file.
AC_CHECK_HEADER(dlfcn.h, [
# NetBSD/SPARC needs -fPIC, -fpic will not do.
SHLIB_CFLAGS="-fPIC"
- SHLIB_LD="ld -Bshareable -x"
SHLIB_LD_LIBS=""
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
- LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
AC_MSG_CHECKING(for ELF)
AC_EGREP_CPP(yes, [
#ifdef __ELF__
yes
#endif
- ],
+ ], [
AC_MSG_RESULT(yes)
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so',
+ SHLIB_LD='${TCL_CC} -shared -Wl,-x'
+ LD_SEARCH_FLAGS='-Wl,-R${LIB_RUNTIME_DIR}'
+ TCL_LIB_SPEC_RPATH="-Wl,-R${exec_prefix}/lib"
+ ], [
AC_MSG_RESULT(no)
+ SHLIB_LD="ld -Bshareable -x"
+ LD_SEARCH_FLAGS='-R${LIB_RUNTIME_DIR}'
+ TCL_LIB_SPEC_RPATH="-R${exec_prefix}/lib"
SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1.0'
- )
+ ])
], [
SHLIB_CFLAGS=""
SHLIB_LD="echo tclLdAout $CC \{$SHLIB_CFLAGS\} | `pwd`/tclsh -r"
@@ -1570,6 +1591,9 @@ dnl AC_CHECK_TOOL(AR, ar)
CC_SEARCH_FLAGS='-Wl,-R,${LIB_RUNTIME_DIR}'
LD_SEARCH_FLAGS='-R ${LIB_RUNTIME_DIR}'
fi
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so'
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.a'
+ TCL_LIB_VERSIONS_OK=nodots
;;
ULTRIX-4.*)
SHLIB_CFLAGS="-G 0"
@@ -1749,8 +1773,8 @@ dnl AC_CHECK_TOOL(AR, ar)
if test "${SHARED_BUILD}" = "1" && test "${SHLIB_SUFFIX}" != "" ; then
LIB_SUFFIX=${SHARED_LIB_SUFFIX}
- MAKE_LIB='${SHLIB_LD} -o [$]@ ${SHLIB_LD_FLAGS} ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS}'
- INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
+ MAKE_LIB='${SHLIB_LD} -o ${@:C/\.so.*/.la/} ${SHLIB_LD_FLAGS} ${OBJS:.o=.lo} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS} -version-info 1:0'
+ INSTALL_LIB='$(INSTALL_LIBRARY) $(LIB_FILE:C/\.so.*/.la/) $(LIB_INSTALL_DIR)/$(LIB_FILE)'
else
LIB_SUFFIX=${UNSHARED_LIB_SUFFIX}
@@ -1780,10 +1804,10 @@ dnl esac
# Stub lib does not depend on shared/static configuration
if test "$RANLIB" = "" ; then
- MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS}'
+ MAKE_STUB_LIB='${STLIB_LD} -o [$]@ ${STUB_LIB_OBJS}'
INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)'
else
- MAKE_STUB_LIB='${STLIB_LD} [$]@ ${STUB_LIB_OBJS} ; ${RANLIB} [$]@'
+ MAKE_STUB_LIB='${STLIB_LD} -o [$]@ ${STUB_LIB_OBJS} ; ${RANLIB} [$]@'
INSTALL_STUB_LIB='$(INSTALL_LIBRARY) $(STUB_LIB_FILE) $(LIB_INSTALL_DIR)/$(STUB_LIB_FILE) ; (cd $(LIB_INSTALL_DIR) ; $(RANLIB) $(STUB_LIB_FILE))'
fi