NeilBrown: Don't link mdadm with pthreads

Martin F. Krafft madduck at alioth.debian.org
Fri Sep 3 09:54:29 UTC 2010


Module: mdadm
Branch: build
Commit: 5d40884d6b88db7dff80de25adafc54bb721e431
URL:    http://git.debian.org/?p=pkg-mdadm/mdadm.git;a=commit;h=5d40884d6b88db7dff80de25adafc54bb721e431

Author: NeilBrown <neilb at suse.de>
Date:   Fri Aug  6 20:11:43 2010 +1000

Don't link mdadm with pthreads

Only mdmon needs pthreads, so link accordingly.

Signed-off-by: NeilBrown <neilb at suse.de>
Reported-by: martin f krafft <madduck at madduck.net>

---

 Makefile |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index fd274f1..e2c65a5 100644
--- a/Makefile
+++ b/Makefile
@@ -80,7 +80,7 @@ CFLAGS = $(CWFLAGS) $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(DI
 USE_PTHREADS = 1
 ifdef USE_PTHREADS
 CFLAGS += -DUSE_PTHREADS
-LDFLAGS += -pthread
+MON_LDFLAGS += -pthread
 endif
 
 # If you want a static binary, you might uncomment these
@@ -163,11 +163,11 @@ mdadm.O2 : $(SRCS) mdadm.h mdmon.O2
 	$(CC) -o mdadm.O2 $(CFLAGS) $(LDFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(SRCS)
 
 mdmon.O2 : $(MON_SRCS) mdadm.h mdmon.h
-	$(CC) -o mdmon.O2 $(CFLAGS) $(LDFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(MON_SRCS)
+	$(CC) -o mdmon.O2 $(CFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(MON_SRCS)
 
 # use '-z now' to guarantee no dynamic linker interactions with the monitor thread
 mdmon : $(MON_OBJS)
-	$(CC) $(LDFLAGS) -z now -o mdmon $(MON_OBJS) $(LDLIBS)
+	$(CC) $(LDFLAGS) $(MON_LDFLAGS) -z now -o mdmon $(MON_OBJS) $(LDLIBS)
 msg.o: msg.c msg.h
 
 test_stripe : restripe.c mdadm.h




More information about the pkg-mdadm-commits mailing list