Skip to content

Commit 0817d25

Browse files
Alexey Dobriyanmasahir0y
authored andcommitted
kbuild: flatten KBUILD_CFLAGS
Make it slightly easier to see which compiler options are added and removed (and not worry about column limit too!). Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Reviewed-by: Nicolas Schier <n.schier@avm.de> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent 1c67921 commit 0817d25

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

Makefile

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -555,11 +555,23 @@ LINUXINCLUDE := \
555555
$(USERINCLUDE)
556556

557557
KBUILD_AFLAGS := -D__ASSEMBLY__ -fno-PIE
558-
KBUILD_CFLAGS := -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs \
559-
-fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE \
560-
-Werror=implicit-function-declaration -Werror=implicit-int \
561-
-Werror=return-type -Wno-format-security -funsigned-char \
562-
-std=gnu11
558+
559+
KBUILD_CFLAGS :=
560+
KBUILD_CFLAGS += -std=gnu11
561+
KBUILD_CFLAGS += -fshort-wchar
562+
KBUILD_CFLAGS += -funsigned-char
563+
KBUILD_CFLAGS += -fno-common
564+
KBUILD_CFLAGS += -fno-PIE
565+
KBUILD_CFLAGS += -fno-strict-aliasing
566+
KBUILD_CFLAGS += -Wall
567+
KBUILD_CFLAGS += -Wundef
568+
KBUILD_CFLAGS += -Werror=implicit-function-declaration
569+
KBUILD_CFLAGS += -Werror=implicit-int
570+
KBUILD_CFLAGS += -Werror=return-type
571+
KBUILD_CFLAGS += -Werror=strict-prototypes
572+
KBUILD_CFLAGS += -Wno-format-security
573+
KBUILD_CFLAGS += -Wno-trigraphs
574+
563575
KBUILD_CPPFLAGS := -D__KERNEL__
564576
KBUILD_RUSTFLAGS := $(rust_common_flags) \
565577
--target=$(objtree)/scripts/target.json \

0 commit comments

Comments
 (0)