1From cc2dd3995dc9a9e6f0e705e11e791f3f3c7d7326 Mon Sep 17 00:00:00 2001
2From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3Date: Tue, 18 Jan 2022 22:41:36 +0100
4Subject: [PATCH] fix build with gcc 4.8
5
6Drop "-Wno-unused-const-variable -Wimplicit-fallthrough=0" as
7"-Wno-implicit-fallthrough -Wno-unused-const-variable" is already set in
8CFLAGS. This will avoid the following build failure with gcc 4.8 raised
9since version 1.13.0 and
10https://github.com/mongrel2/mongrel2/commit/725209578599bd7784753d86aee34f6441ff78a5:
11
12arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-Wimplicit-fallthrough=0'
13
14Fixes:
15 - http://autobuild.buildroot.org/results/de324b733e09057c87352220069fe65f6e535eb8
16
17Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
18[Upstream status: https://github.com/mongrel2/mongrel2/pull/354]
19---
20 Makefile            | 1 -
21 tools/m2sh/Makefile | 4 ++--
22 2 files changed, 2 insertions(+), 3 deletions(-)
23
24diff --git a/Makefile b/Makefile
25index f6627ed..fb8d028 100644
26--- a/Makefile
27+++ b/Makefile
28@@ -22,7 +22,6 @@ all: bin/mongrel2 tests m2sh procer
29
30 ${OBJECTS_NOEXT}: CFLAGS += ${NOEXTCFLAGS}
31 ${OBJECTS}: | builddirs
32-$(RAGEL_OBJECTS): CFLAGS += -Wno-unused-const-variable -Wimplicit-fallthrough=0
33
34 .PHONY: builddirs
35 builddirs:
36diff --git a/tools/m2sh/Makefile b/tools/m2sh/Makefile
37index 83e7ae4..86364af 100644
38--- a/tools/m2sh/Makefile
39+++ b/tools/m2sh/Makefile
40@@ -10,7 +10,7 @@ LIB_SRC=$(filter-out src/m2sh.c,${SOURCES})
41 LIB_OBJ=$(filter-out src/m2sh.o,${OBJECTS})
42 RAGEL_OBJECTS=src/lexer.o src/cli.o
43
44-$(RAGEL_OBJECTS): CFLAGS += -Wno-unused-const-variable -Wimplicit-fallthrough=0 -Wno-unused-parameter
45+$(RAGEL_OBJECTS): CFLAGS += -Wno-unused-parameter
46
47 all: ../lemon/lemon tests build/m2sh
48
49@@ -20,7 +20,7 @@ dev: all
50 install: build/m2sh
51 	install build/m2sh ${DESTDIR}${PREFIX}/bin
52
53-src/parser.o: CFLAGS += -Wno-unused-const-variable -Wno-unused-parameter
54+src/parser.o: CFLAGS += -Wno-unused-parameter
55
56 build/libm2sh.a: ${LIB_OBJ}
57 	mkdir -p build
58--
592.34.1
60
61