lkml.org 
[lkml]   [2018]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] kbuild: add -Werror=strict-prototype flag unconditionally
Date
-Wstrict-prototype is added to KBUILD_CFLAGS first, then overridden
by -Werror=strict-prototype later.

Let's add -Werror=strict-prototypes unconditionally because it is
supported by GCC 4.6, and also by Clang.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

Makefile | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 3bbc16a..bcb943e 100644
--- a/Makefile
+++ b/Makefile
@@ -423,7 +423,7 @@ LINUXINCLUDE := \
$(USERINCLUDE)

KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
-KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
+KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
-Werror-implicit-function-declaration \
-Wno-format-security \
@@ -828,9 +828,6 @@ KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
# disallow errors like 'EXPORT_GPL(foo);' with missing header
KBUILD_CFLAGS += $(call cc-option,-Werror=implicit-int)

-# require functions to have arguments in prototypes, not empty 'int foo()'
-KBUILD_CFLAGS += $(call cc-option,-Werror=strict-prototypes)
-
# Prohibit date/time macros, which would make the build non-deterministic
KBUILD_CFLAGS += $(call cc-option,-Werror=date-time)

--
2.7.4
\
 
 \ /
  Last update: 2018-12-14 09:06    [W:0.047 / U:1.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site