patch-Makefile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. --- mdadm-3.3.1.orig/Makefile 2014-06-05 08:45:56.000000000 +0200
  2. +++ mdadm-3.3.1/Makefile 2014-06-07 21:00:16.000000000 +0200
  3. @@ -43,9 +43,9 @@ KLIBC_GCC = gcc -nostdinc -iwithprefix i
  4. CC = $(CROSS_COMPILE)gcc
  5. CXFLAGS ?= -ggdb
  6. -CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
  7. +CWFLAGS = -Wall -Wstrict-prototypes -Wextra -Wno-unused-parameter
  8. ifdef WARN_UNUSED
  9. -CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3
  10. +CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2
  11. endif
  12. ifdef DEBIAN
  13. @@ -70,7 +70,7 @@ CONFFILEFLAGS = -DCONFFILE=\"$(CONFFILE)
  14. # pivotroot from early boot to late boot.
  15. # /run is best, but for distros that don't support that.
  16. # /dev can work, in which case you probably want /dev/.mdadm
  17. -RUN_DIR=/run/mdadm
  18. +RUN_DIR=/var/run/mdadm
  19. CHECK_RUN_DIR=1
  20. MAP_DIR=$(RUN_DIR)
  21. MAP_FILE = map
  22. @@ -82,7 +82,8 @@ SYSTEMD_DIR=/lib/systemd/system
  23. DIRFLAGS = -DMAP_DIR=\"$(MAP_DIR)\" -DMAP_FILE=\"$(MAP_FILE)\"
  24. DIRFLAGS += -DMDMON_DIR=\"$(MDMON_DIR)\"
  25. DIRFLAGS += -DFAILED_SLOTS_DIR=\"$(FAILED_SLOTS_DIR)\"
  26. -CFLAGS = $(CWFLAGS) $(CXFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(DIRFLAGS)
  27. +CFLAGS ?=
  28. +CFLAGS += $(CWFLAGS) -DSendmail=\""$(MAILCMD)"\" $(CONFFILEFLAGS) $(DIRFLAGS)
  29. VERSION = $(shell [ -d .git ] && git describe HEAD | sed 's/mdadm-//')
  30. VERS_DATE = $(shell [ -d .git ] && date --date="`git log -n1 --format=format:%cd --date=short`" '+%0dth %B %Y' | sed -e 's/1th/1st/' -e 's/2th/2nd/' -e 's/11st/11th/' -e 's/12nd/12th/')
  31. @@ -100,9 +101,9 @@ endif
  32. # If you want a static binary, you might uncomment these
  33. # LDFLAGS = -static
  34. -# STRIP = -s
  35. +STRIP =
  36. -INSTALL = /usr/bin/install
  37. +INSTALL = install
  38. DESTDIR =
  39. BINDIR = /sbin
  40. MANDIR = /usr/share/man
  41. @@ -196,7 +197,7 @@ mdmon.O2 : $(MON_SRCS) $(INCL) mdmon.h
  42. # use '-z now' to guarantee no dynamic linker interactions with the monitor thread
  43. mdmon : check_rundir $(MON_OBJS)
  44. - $(CC) $(CFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -Wl,-z,now -o mdmon $(MON_OBJS) $(LDLIBS)
  45. + $(CC) $(CFLAGS) $(LDFLAGS) $(MON_LDFLAGS) -o mdmon $(MON_OBJS) $(LDLIBS)
  46. msg.o: msg.c msg.h
  47. test_stripe : restripe.c xmalloc.o mdadm.h
  48. @@ -258,7 +259,7 @@ $(MON_OBJS) : $(INCL) mdmon.h
  49. sha1.o : sha1.c sha1.h md5.h
  50. $(CC) $(CFLAGS) -DHAVE_STDINT_H -o sha1.o -c sha1.c
  51. -install : mdadm mdmon install-man install-udev
  52. +install : mdadm mdmon
  53. $(INSTALL) -D $(STRIP) -m 755 mdadm $(DESTDIR)$(BINDIR)/mdadm
  54. $(INSTALL) -D $(STRIP) -m 755 mdmon $(DESTDIR)$(BINDIR)/mdmon