]> git.ipfire.org Git - people/arne_f/ipfire-2.x.git/commitdiff
mdadm: fix build with gcc-7
authorArne Fitzenreiter <arne_f@ipfire.org>
Fri, 26 Jan 2018 11:23:00 +0000 (12:23 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 26 Jan 2018 11:23:00 +0000 (12:23 +0100)
lfs/mdadm
src/patches/mdadm/gcc-7.patch [new file with mode: 0644]

index 881a4c5821691a779739c3b0963e4e86dd985815..3e8444cbf5558b89f5bf202569c410f3d1bb60b4 100644 (file)
--- a/lfs/mdadm
+++ b/lfs/mdadm
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007-2011  IPFire Team  <info@ipfire.org>                     #
+# Copyright (C) 2007-2018  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -73,6 +73,7 @@ $(subst %,%_MD5,$(objects)) :
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
        @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/mdadm/gcc-7.patch
        cd $(DIR_APP) && make $(MAKETUNING)
        cd $(DIR_APP) && make install
        @rm -rf $(DIR_APP)
diff --git a/src/patches/mdadm/gcc-7.patch b/src/patches/mdadm/gcc-7.patch
new file mode 100644 (file)
index 0000000..20606d2
--- /dev/null
@@ -0,0 +1,12 @@
+diff -Naur mdadm-4.0.org/Makefile mdadm-4.0/Makefile
+--- mdadm-4.0.org/Makefile     2017-01-09 22:46:34.000000000 +0100
++++ mdadm-4.0/Makefile 2018-01-19 11:18:42.868219725 +0100
+@@ -43,7 +43,7 @@
+ CC ?= $(CROSS_COMPILE)gcc
+ CXFLAGS ?= -ggdb
+-CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
++CWFLAGS = -Wall -Werror -Werror=implicit-fallthrough=0 -Werror=format-overflow=0 -Werror=format-truncation=0 -Wstrict-prototypes -Wextra -Wno-unused-parameter
+ ifdef WARN_UNUSED
+ CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O3
+ endif