kumquat-buildroot/package/rtl_433/0001-minor-Fix-a-compiler-flag-needs-GCC-7.patch
Fabrice Fontaine 7ee6c37939 package/rtl_433: fix build with gcc 4.8
Fix the following build failure with gcc 4.8 raised since bump to
version 21.12 in commit 84b29ef40b:

arm-none-linux-gnueabi-gcc: error: unrecognized command line option '-Wimplicit-fallthrough'

Fixes:
 - http://autobuild.buildroot.org/results/bea144f267215cd2dc27f235d6e3fb0adedb33ea

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2021-12-26 16:00:10 +01:00

28 lines
1.1 KiB
Diff

From 2010e8f949ab7b4555b99dbf184e149a3f33df46 Mon Sep 17 00:00:00 2001
From: "Christian W. Zuckschwerdt" <christian@zuckschwerdt.org>
Date: Fri, 24 Dec 2021 11:03:06 +0100
Subject: [PATCH] minor: Fix a compiler flag needs GCC 7
[Retrieved from:
https://github.com/merbanan/rtl_433/commit/2010e8f949ab7b4555b99dbf184e149a3f33df46]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
CMakeLists.txt | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a3f11ac99..bfa6595ca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,7 +74,9 @@ if(("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_C_COMPILER_ID}" MATCHES
ADD_DEFINITIONS(-pedantic)
ADD_DEFINITIONS(-Wshadow)
ADD_DEFINITIONS(-Wmissing-prototypes)
- ADD_DEFINITIONS(-Wimplicit-fallthrough)
+ if("${CMAKE_C_COMPILER_ID}" MATCHES "Clang" OR NOT "7.0.0" VERSION_GREATER CMAKE_C_COMPILER_VERSION)
+ ADD_DEFINITIONS(-Wimplicit-fallthrough)
+ endif()
#ADD_DEFINITIONS(-Wfloat-equal)
#ADD_DEFINITIONS(-Wbad-function-cast)
#ADD_DEFINITIONS(-Wdocumentation)