From: Mike Frysinger Date: Mon, 11 Apr 2011 04:54:42 +0000 (+1000) Subject: mdadm/mdmon: use CFLAGS when linking X-Git-Tag: mdadm-3.2.2~102 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ccca44dde83e91a162373c681d3ad3bf9023c0e;p=thirdparty%2Fmdadm.git mdadm/mdmon: use CFLAGS when linking People often put flags that control ABI options into CFLAGS (like -mcpu) and don't duplicate them in LDFLAGS because most build systems nowadays (like autotools) use both when linking. So make that work with mdadm's custom build system too. Signed-off-by: Mike Frysinger Signed-off-by: NeilBrown --- diff --git a/Makefile b/Makefile index 222358f2..72087bea 100644 --- a/Makefile +++ b/Makefile @@ -149,10 +149,10 @@ everything-test: all mdadm.static swap_super test_stripe \ # mdadm.tcc doesn't work.. mdadm : $(OBJS) - $(CC) $(LDFLAGS) -o mdadm $(OBJS) $(LDLIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -o mdadm $(OBJS) $(LDLIBS) mdadm.static : $(OBJS) $(STATICOBJS) - $(CC) $(LDFLAGS) -static -o mdadm.static $(OBJS) $(STATICOBJS) + $(CC) $(CFLAGS) $(LDFLAGS) -static -o mdadm.static $(OBJS) $(STATICOBJS) mdadm.tcc : $(SRCS) $(INCL) $(TCC) -o mdadm.tcc $(SRCS) @@ -172,7 +172,7 @@ mdmon.O2 : $(MON_SRCS) $(INCL) mdmon.h # use '-z now' to guarantee no dynamic linker interactions with the monitor thread mdmon : $(MON_OBJS) - $(CC) $(LDFLAGS) $(MON_LDFLAGS) -Wl,-z,now -o mdmon $(MON_OBJS) $(LDLIBS) + $(CC) $(CFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -Wl,-z,now -o mdmon $(MON_OBJS) $(LDLIBS) msg.o: msg.c msg.h test_stripe : restripe.c mdadm.h