diff options
author | NeilBrown <neilb@suse.de> | 2010-03-03 00:54:17 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-03-03 00:54:17 +0100 |
commit | fcf5762500297536d3c3376945684c4f654ffe44 (patch) | |
tree | df16a74f63ba3739e467c62e580f6bcc7f019389 /Makefile | |
parent | Fix warning about unused variable. (diff) | |
download | mdadm-fcf5762500297536d3c3376945684c4f654ffe44.tar.xz mdadm-fcf5762500297536d3c3376945684c4f654ffe44.zip |
Add _FORTIFY_SOURCE to mdadm.O2 build.
When building mdadm.O2, set _FORTIFY_SOURCE to get more
warnings, and also build mdmon.O2 to find warnings in that
code too.
Then fix the warnings.
Suggested-by: Luca Berra <bluca@comedia.it>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -97,6 +97,10 @@ MON_OBJS = mdmon.o monitor.o managemon.o util.o mdstat.o sysfs.o config.o \ super-ddf.o sha1.o crc32.o msg.o bitmap.o \ platform-intel.o probe_roms.o +MON_SRCS = mdmon.c monitor.c managemon.c util.c mdstat.c sysfs.c config.c \ + Kill.c sg_io.c dlink.c ReadMe.c super0.c super1.c super-intel.c \ + super-ddf.c sha1.c crc32.c msg.c bitmap.c \ + platform-intel.c probe_roms.c STATICSRC = pwgr.c STATICOBJS = pwgr.o @@ -138,8 +142,11 @@ mdadm.klibc : $(SRCS) mdadm.h mdadm.Os : $(SRCS) mdadm.h $(CC) -o mdadm.Os $(CFLAGS) -DHAVE_STDINT_H -Os $(SRCS) -mdadm.O2 : $(SRCS) mdadm.h - $(CC) -o mdadm.O2 $(CFLAGS) -DHAVE_STDINT_H -O2 $(SRCS) +mdadm.O2 : $(SRCS) mdadm.h mdmon.O2 + $(CC) -o mdadm.O2 $(CFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(SRCS) + +mdmon.O2 : $(MON_SRCS) mdadm.h mdmon.h + $(CC) -o mdmon.O2 $(CFLAGS) -DHAVE_STDINT_H -O2 -D_FORTIFY_SOURCE=2 $(MON_SRCS) mdmon : $(MON_OBJS) $(CC) $(LDFLAGS) -o mdmon $(MON_OBJS) $(LDLIBS) |