diff options
author | stwo <stwo> | 2010-02-19 13:36:52 (GMT) |
---|---|---|
committer | stwo <stwo> | 2010-02-19 13:36:52 (GMT) |
commit | ba7d6fdad5a4d07c0c5cdbe8f4dde1a5c896498d (patch) | |
tree | f3fd954a16cea280064c5ec623141011397db7b7 | |
parent | e6e4973e6ac3dd76e4de51082f4ecf53f5ac7eb4 (diff) | |
download | tcl-ba7d6fdad5a4d07c0c5cdbe8f4dde1a5c896498d.zip tcl-ba7d6fdad5a4d07c0c5cdbe8f4dde1a5c896498d.tar.gz tcl-ba7d6fdad5a4d07c0c5cdbe8f4dde1a5c896498d.tar.bz2 |
Correct compiler/linker flags for threaded builds on OpenBSD.
-rw-r--r-- | ChangeLog | 6 | ||||
-rwxr-xr-x | unix/configure | 10 | ||||
-rw-r--r-- | unix/tcl.m4 | 9 |
3 files changed, 22 insertions, 3 deletions
@@ -1,3 +1,9 @@ +2010-02-19 Stuart Cassoff <stwo@users.sourceforge.net> + + * tcl.m4: Correct compiler/linker flags + for threaded builds on OpenBSD. + * configure: (regenerated). + 2010-02-19 Donal K. Fellows <dkf@users.sf.net> * unix/installManPage: [Bug 2954638]: Correct behaviour of manual page diff --git a/unix/configure b/unix/configure index 8622d91..40115bf 100755 --- a/unix/configure +++ b/unix/configure @@ -8067,6 +8067,14 @@ else LDFLAGS="" fi + if test "${TCL_THREADS}" = "1"; then + + # OpenBSD builds and links with -pthread, never -lpthread. + LIBS=`echo $LIBS | sed s/-lpthread//` + CFLAGS="$CFLAGS -pthread" + SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread" + +fi # OpenBSD doesn't do version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' @@ -9289,7 +9297,7 @@ fi BSD/OS*) ;; CYGWIN_*) ;; IRIX*) ;; - NetBSD-*|FreeBSD-*) ;; + NetBSD-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; SCO_SV-3.2*) ;; *) SHLIB_CFLAGS="-fPIC" ;; diff --git a/unix/tcl.m4 b/unix/tcl.m4 index b7cb2ac..a4a18eb 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1547,7 +1547,12 @@ dnl AC_CHECK_TOOL(AR, ar) AS_IF([test $tcl_cv_ld_elf = yes], [ LDFLAGS=-Wl,-export-dynamic ], [LDFLAGS=""]) - + AS_IF([test "${TCL_THREADS}" = "1"], [ + # OpenBSD builds and links with -pthread, never -lpthread. + LIBS=`echo $LIBS | sed s/-lpthread//` + CFLAGS="$CFLAGS -pthread" + SHLIB_CFLAGS="$SHLIB_CFLAGS -pthread" + ]) # OpenBSD doesn't do version numbers with dots. UNSHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.a' TCL_LIB_VERSIONS_OK=nodots @@ -2084,7 +2089,7 @@ dnl # preprocessing tests use only CPPFLAGS. BSD/OS*) ;; CYGWIN_*) ;; IRIX*) ;; - NetBSD-*|FreeBSD-*) ;; + NetBSD-*|FreeBSD-*|OpenBSD-*) ;; Darwin-*) ;; SCO_SV-3.2*) ;; *) SHLIB_CFLAGS="-fPIC" ;; |