git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Make Pthread link flags configurable

From
david.syzdek@acsalaska.net <david.syzdek@acsalaska.net>
Date
Nov 2, 2008, 23:43 UTC
Message-ID
<1225669400-79505-1-git-send-email-david.syzdek@acsalaska.net>
From: David M. Syzdek <david.syzdek@acsalaska.net>

FreeBSD 4.x systems use the linker flags `-pthread' instead of the linker flags `-lpthread' when linking against the pthread library.

Signed-off-by: David M. Syzdek <david.syzdek@acsalaska.net>
---
 Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 489774d..6737cb0 100644
--- a/Makefile
+++ b/Makefile
@@ -229,6 +229,7 @@ INSTALL = install
 RPMBUILD = rpmbuild
 TCL_PATH = tclsh
 TCLTK_PATH = wish
+PTHREAD_LIBS = -lpthread
 
 export TCL_PATH TCLTK_PATH
 
@@ -691,6 +692,7 @@ ifeq ($(uname_S),FreeBSD)
 	DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
 	THREADED_DELTA_SEARCH = YesPlease
 	ifeq ($(shell expr "$(uname_R)" : '4\.'),2)
+		PTHREAD_LIBS = -pthread
 		NO_UINTMAX_T = YesPlease
 		NO_STRTOUMAX = YesPlease
 	endif
@@ -1017,7 +1019,7 @@ endif
 
 ifdef THREADED_DELTA_SEARCH
 	BASIC_CFLAGS += -DTHREADED_DELTA_SEARCH
-	EXTLIBS += -lpthread
+	EXTLIBS += $(PTHREAD_LIBS)
 	LIB_OBJS += thread-utils.o
 endif
 ifdef DIR_HAS_BSD_GROUP_SEMANTICS
-- 
1.6.0.2.GIT
Next: Jakub Narebski
Message 1 of 4 in “Make Pthread link flags configurable”
  1. Make Pthread link flags configurabledavid.syzdek@acsalaska.net, Nov 2, 2008
  2. Jakub NarebskiNov 3, 2008
  3. David SyzdekNov 3, 2008
  4. Jakub NarebskiNov 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.