From 33e3a1bd8487762b1286ddb360fdf855af752871 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Fri, 26 Jan 2018 12:23:00 +0100 Subject: [PATCH] mdadm: fix build with gcc-7 --- lfs/mdadm | 3 ++- src/patches/mdadm/gcc-7.patch | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 src/patches/mdadm/gcc-7.patch diff --git a/lfs/mdadm b/lfs/mdadm index 881a4c5821..3e8444cbf5 100644 --- a/lfs/mdadm +++ b/lfs/mdadm @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2011 IPFire Team # +# Copyright (C) 2007-2018 IPFire Team # # # # 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 index 0000000000..20606d21fd --- /dev/null +++ b/src/patches/mdadm/gcc-7.patch @@ -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 -- 2.39.2