Elyes Haouas has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/83452?usp=email )
Change subject: Makefile.mk: Reorganize CFLAGS_common ......................................................................
Makefile.mk: Reorganize CFLAGS_common
Sort CFLAGS_common by kind and alphabetically.
Change-Id: I3216ef2e0b3cd25f343939d5b9ef932f2f91e56c Signed-off-by: Elyes Haouas ehaouas@noos.fr --- M Makefile.mk 1 file changed, 34 insertions(+), 25 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/52/83452/1
diff --git a/Makefile.mk b/Makefile.mk index b4532c3..c186945 100644 --- a/Makefile.mk +++ b/Makefile.mk @@ -504,46 +504,55 @@ CPPFLAGS_ramstage += -Isrc/device/oprom/include endif
+# Options controlling the kind of output CFLAGS_common += -pipe -CFLAGS_common += -g -CFLAGS_common += -nostdinc +# Options controlling C dialect CFLAGS_common += -std=gnu11 -CFLAGS_common += -nostdlib -CFLAGS_common += -Wall -CFLAGS_common += -Wundef -CFLAGS_common += -Wstrict-prototypes -CFLAGS_common += -Wmissing-prototypes -CFLAGS_common += -Wwrite-strings -CFLAGS_common += -Wredundant-decls -CFLAGS_common += -Wno-trigraphs -CFLAGS_common += -Wimplicit-fallthrough -CFLAGS_common += -Wshadow -CFLAGS_common += -Wdate-time -CFLAGS_common += -Wtype-limits -CFLAGS_common += -Wvla -CFLAGS_common += -Wold-style-definition -CFLAGS_common += -Wdangling-else -CFLAGS_common += -Wmissing-include-dirs -CFLAGS_common += -fno-common +# C language options CFLAGS_common += -ffreestanding CFLAGS_common += -fno-builtin +CFLAGS_common += -nostdinc +CFLAGS_common += -nostdlib +# Options for directory search +CFLAGS_common += -Wmissing-include-dirs +# Options for linking +CFLAGS_common += -fdata-sections +CFLAGS_common += -ffunction-sections +# Options for code generation conventions and control optimization +CFLAGS_common += -fno-common +CFLAGS_common += -fno-pie CFLAGS_common += -fomit-frame-pointer CFLAGS_common += -fstrict-aliasing -CFLAGS_common += -ffunction-sections -CFLAGS_common += -fdata-sections -CFLAGS_common += -fno-pie +# Warning Options +CFLAGS_common += -Wall +CFLAGS_common += -Wdate-time +CFLAGS_common += -Wdangling-else +CFLAGS_common += -Wimplicit-fallthrough +CFLAGS_common += -Wmissing-prototypes +CFLAGS_common += -Wno-trigraphs +CFLAGS_common += -Wold-style-definition +CFLAGS_common += -Wredundant-decls +CFLAGS_common += -Wshadow +CFLAGS_common += -Wstrict-prototypes CFLAGS_common += -Wstring-compare +CFLAGS_common += -Wtrigraphs +CFLAGS_common += -Wtype-limits +CFLAGS_common += -Wundef +CFLAGS_common += -Wvla +CFLAGS_common += -Wwrite-strings +# Debugging options +CFLAGS_common += -g ifeq ($(CONFIG_COMPILER_GCC),y) CFLAGS_common += -Wold-style-declaration CFLAGS_common += -Wcast-function-type # Don't add these GCC specific flags when running scan-build ifeq ($(CCC_ANALYZER_OUTPUT_FORMAT),) -CFLAGS_common += -Wno-packed-not-aligned CFLAGS_common += -fconserve-stack -CFLAGS_common += -Wnull-dereference -CFLAGS_common += -Wlogical-op CFLAGS_common += -Wduplicated-cond +CFLAGS_common += -Wlogical-op CFLAGS_common += -Wno-array-compare +CFLAGS_common += -Wno-packed-not-aligned +CFLAGS_common += -Wnull-dereference endif endif