Skip to contentSkip to conversation

: Fix typo in -lpthread

PATCH In review Sukadev Bhattiprolu 2 participants 3 messages Jul 22, 2009 – Jul 23, 2009 2 messages not in the archive Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Fix typo in -lpthread

From 55cb828036ff604fc9cdf686b51afb35247c8f57 Mon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <suka@suka.(none)>
Date: Wed, 22 Jul 2009 13:22:38 -0700
Subject: [PATCH] Fix typo in -lpthread

---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -1
index 53e3a46..3dbc63d 100644
@@ -44,7 +44,7 @@ all: $(PROGS)
 
 ckptinfo: ckptinfo_types.o
 
-mktree:	CFLAGS += -D__REENTRANT -pthreads
+mktree:	CFLAGS += -D__REENTRANT -lpthread
 
 ckptinfo_types.o: ckptinfo_types.c
 	@echo $(CC) -c $(CFLAGS) $<
Signature · 1 line
1.6.0.4

A message that is not in the archive (sent off-list or not yet received): 20090722202837.GA18639-r/[email protected]

#2 lore raw
Quoted 15 lines · Sukadev Bhattiprolu

From 55cb828036ff604fc9cdf686b51afb35247c8f57 Mon Sep 17 00:00:00 2001
From: Sukadev Bhattiprolu <suka@suka.(none)>
Date: Wed, 22 Jul 2009 13:22:38 -0700
Subject: [PATCH] Fix typo in -lpthread

---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +0 -0
index 53e3a46..3dbc63d 100644

Makefile all: $(PROGS) · line 47

Quoted 5 lines
Makefile +1 -1
@@ -44,7 +44,7 @@ all: $(PROGS)
 
 ckptinfo: ckptinfo_types.o
 
-mktree:	CFLAGS += -D__REENTRANT -pthreads
+mktree:	CFLAGS += -D__REENTRANT -lpthread

Hmmm .. I actually meant '-pthread' which is a gcc option. I thought it is better to use it than '-lpthread' directly. For instance, see:
http://stackoverflow.com/questions/875789/gcc-do-i-need-dreentrant-with-pthreads

(seems like '-pthreads' is a synonym, at least on x86).

Does it break on your system ?

Oren.

Quoted 3 lines
Makefile +0 -0
 ckptinfo_types.o: ckptinfo_types.c
 	@echo $(CC) -c $(CFLAGS) $<

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Oren Laadan [[email protected]] wrote:

| > -mktree:	CFLAGS += -D__REENTRANT -pthreads
| > +mktree:	CFLAGS += -D__REENTRANT -lpthread
| 
| Hmmm .. I actually meant '-pthread' which is a gcc option.

Ok. I get "unrecognized option '-pthreads'" on x86 for following gcc versions

- gcc (Ubuntu 4.3.3-5ubuntu4)
- gcc (GCC) 4.1.2 20071124 (Red Hat 4.1.2-42)

But '-pthread' works.