Donovan Watteau
2011-07-05 18:18:09 UTC
On OpenBSD, the -pthread option should be used instead of -lpthread to
link threaded code.
See:
http://www.openbsd.org/cgi-bin/man.cgi?query=gcc-local&format=html
---
scripts/checks.sh | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/scripts/checks.sh b/scripts/checks.sh
index c2f048f..64cbbf3 100644
--- a/scripts/checks.sh
+++ b/scripts/checks.sh
@@ -639,6 +639,12 @@ check_x11()
# adds PTHREAD_CFLAGS and PTHREAD_LIBS to config.mk
check_pthread()
{
+ case `uname -s` in
+ OpenBSD)
+ PTHREAD_LIBS="$PTHREAD_LIBS -pthread"
+ ;;
+ esac
+
for __libs in "$PTHREAD_LIBS" -lpthread -lc_r -lkse
do
test -z "$__libs" && continue
link threaded code.
See:
http://www.openbsd.org/cgi-bin/man.cgi?query=gcc-local&format=html
---
scripts/checks.sh | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/scripts/checks.sh b/scripts/checks.sh
index c2f048f..64cbbf3 100644
--- a/scripts/checks.sh
+++ b/scripts/checks.sh
@@ -639,6 +639,12 @@ check_x11()
# adds PTHREAD_CFLAGS and PTHREAD_LIBS to config.mk
check_pthread()
{
+ case `uname -s` in
+ OpenBSD)
+ PTHREAD_LIBS="$PTHREAD_LIBS -pthread"
+ ;;
+ esac
+
for __libs in "$PTHREAD_LIBS" -lpthread -lc_r -lkse
do
test -z "$__libs" && continue
--
1.7.5
1.7.5