@matheusbsbs / matheus-bagliano / commits / 158629b2c9
Fork 0

Make Pthread link flags configurable

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> Signed-off-by: Junio C Hamano <gitster@pobox.com>

David M. Syzdek committed Nov 2, 2008 at 14:43 UTC 158629b2c9baffd0352306bd8dfa0784c981955d
1 file changed +3 -1
Makefile
+3 -1
@@ -229,6 +229,7 @@ INSTALL = install
229 RPMBUILD = rpmbuild
230 TCL_PATH = tclsh
231 TCLTK_PATH = wish
232 +PTHREAD_LIBS = -lpthread
233
234 export TCL_PATH TCLTK_PATH
235
@@ -695,6 +696,7 @@ ifeq ($(uname_S),FreeBSD)
696 COMPAT_CFLAGS += -Icompat/regex
697 COMPAT_OBJS += compat/regex/regex.o
698 ifeq ($(shell expr "$(uname_R)" : '4\.'),2)
699 + PTHREAD_LIBS = -pthread
700 NO_UINTMAX_T = YesPlease
701 NO_STRTOUMAX = YesPlease
702 endif
@@ -1023,7 +1025,7 @@ endif
1025
1026 ifdef THREADED_DELTA_SEARCH
1027 BASIC_CFLAGS += -DTHREADED_DELTA_SEARCH
1026 - EXTLIBS += -lpthread
1028 + EXTLIBS += $(PTHREAD_LIBS)
1029 LIB_OBJS += thread-utils.o
1030 endif
1031 ifdef DIR_HAS_BSD_GROUP_SEMANTICS