Git development
 help / color / mirror / Atom feed
* [PATCH] Make Pthread link flags configurable
@ 2008-11-02 23:43 david.syzdek
  2008-11-03  9:44 ` Jakub Narebski
  0 siblings, 1 reply; 4+ messages in thread
From: david.syzdek @ 2008-11-02 23:43 UTC (permalink / raw)
  To: git; +Cc: David M. Syzdek

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Make Pthread link flags configurable
  2008-11-02 23:43 [PATCH] Make Pthread link flags configurable david.syzdek
@ 2008-11-03  9:44 ` Jakub Narebski
  2008-11-03 18:18   ` David Syzdek
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Narebski @ 2008-11-03  9:44 UTC (permalink / raw)
  To: David M. Syzdek; +Cc: git

david.syzdek@acsalaska.net writes:

> 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(-)

Would it be possible to add support for this also to configure.ac
(and config.mak.in)?

-- 
Jakub Narebski
Poland
ShadeHawk on #git

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Make Pthread link flags configurable
  2008-11-03  9:44 ` Jakub Narebski
@ 2008-11-03 18:18   ` David Syzdek
  2008-11-03 18:26     ` Jakub Narebski
  0 siblings, 1 reply; 4+ messages in thread
From: David Syzdek @ 2008-11-03 18:18 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: David M. Syzdek, git

On Mon, Nov 3, 2008 at 12:44 AM, Jakub Narebski <jnareb@gmail.com> wrote:
> david.syzdek@acsalaska.net writes:
>
>> 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(-)
>
> Would it be possible to add support for this also to configure.ac
> (and config.mak.in)?
>

I just sent a patch to the list that adds autoconf tests for pthreads.
 If the test is able to determine which flag to use, then it also sets
THREADED_DELTA_SEARCH.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Make Pthread link flags configurable
  2008-11-03 18:18   ` David Syzdek
@ 2008-11-03 18:26     ` Jakub Narebski
  0 siblings, 0 replies; 4+ messages in thread
From: Jakub Narebski @ 2008-11-03 18:26 UTC (permalink / raw)
  To: David Syzdek; +Cc: David M. Syzdek, git

David Syzdek wrote:
> On Mon, Nov 3, 2008 at 12:44 AM, Jakub Narebski <jnareb@gmail.com> wrote:
>> david.syzdek@acsalaska.net writes:
>>
>>> 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(-)
>>
>> Would it be possible to add support for this also to configure.ac
>> (and config.mak.in)?
>>
> 
> I just sent a patch to the list that adds autoconf tests for pthreads.
>  If the test is able to determine which flag to use, then it also sets
> THREADED_DELTA_SEARCH.

Thanks a lot.

-- 
Jakub Narebski
Poland

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-11-03 18:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-02 23:43 [PATCH] Make Pthread link flags configurable david.syzdek
2008-11-03  9:44 ` Jakub Narebski
2008-11-03 18:18   ` David Syzdek
2008-11-03 18:26     ` Jakub Narebski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox