0003-fix-build-with-gcc-4.8.patch 2.0 KB

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