From: NeilBrown Date: Fri, 6 Aug 2010 10:11:43 +0000 (+1000) Subject: Don't link mdadm with pthreads X-Git-Tag: mdadm-3.1.4~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5d40884d6b88db7dff80de25adafc54bb721e431;p=thirdparty%2Fmdadm.git Don't link mdadm with pthreads Only mdmon needs pthreads, so link accordingly. Signed-off-by: NeilBrown Reported-by: martin f krafft --- diff --git a/Makefile b/Makefile index fd274f12..e2c65a5d 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