summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-01-03 21:06:09 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-01-03 21:06:09 (GMT)
commitec03772bad27bd87af2bb98f697ede5b5c6b5d07 (patch)
treefd389e13254ab85db37ccbff8fee96857b16e032
parentce5d124270a583363c29a727a81feadfc90a7ba0 (diff)
downloadtcl-ec03772bad27bd87af2bb98f697ede5b5c6b5d07.zip
tcl-ec03772bad27bd87af2bb98f697ede5b5c6b5d07.tar.gz
tcl-ec03772bad27bd87af2bb98f697ede5b5c6b5d07.tar.bz2
[Bug 1636685]: Use the configuration for modern FreeBSD suggested by the
FreeBSD porter.
-rw-r--r--ChangeLog13
-rw-r--r--unix/tcl.m425
2 files changed, 33 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index de681eb..b346e52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,14 @@
+2010-01-03 Donal K. Fellows <dkf@users.sf.net>
+
+ * unix/tcl.m4 (SC_CONFIG_CFLAGS): [Bug 1636685]: Use the configuration
+ for modern FreeBSD suggested by the FreeBSD porter.
+
2010-01-03 Miguel Sofer <msofer@users.sf.net>
- * generic/tclBasic.c: Fix leak of coroutines on namespace
- * generic/tclCompile.h: deletion, [Bug 2724403]. Added a test
- * generic/tclNamesp.c: for this leak, and also a test for
- * tests/coroutine.test: leaks on namespace deletion.
+ * generic/tclBasic.c: [Bug 2724403]: Fix leak of coroutines on
+ * generic/tclCompile.h: namespace deletion. Added a test for this
+ * generic/tclNamesp.c: leak, and also a test for leaks on namespace
+ * tests/coroutine.test: deletion.
* tests/namespace.test:
2009-12-30 Donal K. Fellows <dkf@users.sf.net>
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 8bb395e..4f62e7b 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1552,7 +1552,7 @@ dnl AC_CHECK_TOOL(AR, ar)
UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
TCL_LIB_VERSIONS_OK=nodots
;;
- NetBSD-*|FreeBSD-*)
+ NetBSD-*|FreeBSD-[[3-4]].*)
# FreeBSD 3.* and greater have ELF.
# NetBSD 2.* has ELF and can use 'cc -shared' to build shared libs
SHLIB_CFLAGS="-fPIC"
@@ -1580,6 +1580,29 @@ dnl AC_CHECK_TOOL(AR, ar)
;;
esac
;;
+ FreeBSD-*)
+ # This configuration from FreeBSD Ports.
+ SHLIB_CFLAGS="-fPIC"
+ SHLIB_LD="${CC} -shared"
+ TCL_SHLIB_LD_EXTRAS="-soname \$@"
+ SHLIB_LD_LIBS='${LIBS}'
+ SHLIB_SUFFIX=".so"
+ DL_OBJS="tclLoadDl.o"
+ DL_LIBS=""
+ LDFLAGS=""
+ CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'
+ LD_SEARCH_FLAGS='-rpath ${LIB_RUNTIME_DIR}'
+ AS_IF([test "${TCL_THREADS}" = "1"], [
+ # The -pthread needs to go in the LDFLAGS, not LIBS
+ LIBS=`echo $LIBS | sed s/-pthread//`
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ LDFLAGS="$LDFLAGS $PTHREAD_LIBS"])
+ # Version numbers are dot-stripped by system policy.
+ TCL_TRIM_DOTS=`echo ${VERSION} | tr -d .`
+ UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a'
+ SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}\$\{DBGX\}.so.1'
+ TCL_LIB_VERSIONS_OK=nodots
+ ;;
Darwin-*)
CFLAGS_OPTIMIZE="-Os"
SHLIB_CFLAGS="-fno-common"