summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2024-06-27 02:09:59 +0200
committerFelix Singer <felixsinger@posteo.net>2024-06-29 07:07:56 +0000
commit0adf35537bd6093b79b1701becee823d3436d975 (patch)
tree2302ec6ae9a228a0b11f288fe8507aad101e0aca
parent0486f2b3bb53f8f470b8842eda794f929dfee92c (diff)
Makefile.mk: Use one line per *_common flag
Use one line per *_common flag like it's done elsewhere in the tree. It makes the list of options more readable. Change-Id: I33c500e6eb74daf1e66c2b5e07b50f81c0f4587d Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83226 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
-rw-r--r--Makefile.mk67
1 files changed, 52 insertions, 15 deletions
diff --git a/Makefile.mk b/Makefile.mk
index 16b65395d6..1b658b58c2 100644
--- a/Makefile.mk
+++ b/Makefile.mk
@@ -475,7 +475,11 @@ COREBOOT_EXTRA_VERSION := -$(call strip_quotes,$(CONFIG_LOCALVERSION))
COREBOOT_EXPORTS += COREBOOT_EXTRA_VERSION
endif
-CPPFLAGS_common := -Isrc -Isrc/include -Isrc/commonlib/include -Isrc/commonlib/bsd/include -I$(obj)
+CPPFLAGS_common := -Isrc
+CPPFLAGS_common += -Isrc/include
+CPPFLAGS_common += -Isrc/commonlib/include
+CPPFLAGS_common += -Isrc/commonlib/bsd/include
+CPPFLAGS_common += -I$(obj)
VBOOT_SOURCE ?= 3rdparty/vboot
CPPFLAGS_common += -I$(VBOOT_SOURCE)/firmware/include
CPPFLAGS_common += -include $(src)/include/kconfig.h
@@ -493,13 +497,34 @@ ifeq ($(CONFIG_PCI_OPTION_ROM_RUN_YABEL)$(CONFIG_PCI_OPTION_ROM_RUN_REALMODE),y)
CPPFLAGS_ramstage += -Isrc/device/oprom/include
endif
-CFLAGS_common += -pipe -g -nostdinc -std=gnu11
-CFLAGS_common += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes
-CFLAGS_common += -Wwrite-strings -Wredundant-decls -Wno-trigraphs -Wimplicit-fallthrough
-CFLAGS_common += -Wshadow -Wdate-time -Wtype-limits -Wvla -Wold-style-definition
-CFLAGS_common += -Wdangling-else -Wmissing-include-dirs
-CFLAGS_common += -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer
-CFLAGS_common += -fstrict-aliasing -ffunction-sections -fdata-sections -fno-pie
+CFLAGS_common += -pipe
+CFLAGS_common += -g
+CFLAGS_common += -nostdinc
+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
+CFLAGS_common += -ffreestanding
+CFLAGS_common += -fno-builtin
+CFLAGS_common += -fomit-frame-pointer
+CFLAGS_common += -fstrict-aliasing
+CFLAGS_common += -ffunction-sections
+CFLAGS_common += -fdata-sections
+CFLAGS_common += -fno-pie
CFLAGS_common += -Wstring-compare
ifeq ($(CONFIG_COMPILER_GCC),y)
CFLAGS_common += -Wold-style-declaration
@@ -508,16 +533,25 @@ ifeq ($(CCC_ANALYZER_OUTPUT_FORMAT),)
CFLAGS_common += -Wno-packed-not-aligned
CFLAGS_common += -fconserve-stack
CFLAGS_common += -Wnull-dereference
-CFLAGS_common += -Wlogical-op -Wduplicated-cond -Wno-array-compare
+CFLAGS_common += -Wlogical-op
+CFLAGS_common += -Wduplicated-cond
+CFLAGS_common += -Wno-array-compare
endif
endif
ADAFLAGS_common += -gnatp
-ADAFLAGS_common += -Wuninitialized -Wall -Werror
-ADAFLAGS_common += -pipe -g -nostdinc
-ADAFLAGS_common += -Wstrict-aliasing -Wshadow
-ADAFLAGS_common += -fno-common -fomit-frame-pointer
-ADAFLAGS_common += -ffunction-sections -fdata-sections
+ADAFLAGS_common += -Wuninitialized
+ADAFLAGS_common += -Wall
+ADAFLAGS_common += -Werror
+ADAFLAGS_common += -pipe
+ADAFLAGS_common += -g
+ADAFLAGS_common += -nostdinc
+ADAFLAGS_common += -Wstrict-aliasing
+ADAFLAGS_common += -Wshadow
+ADAFLAGS_common += -fno-common
+ADAFLAGS_common += -fomit-frame-pointer
+ADAFLAGS_common += -ffunction-sections
+ADAFLAGS_common += -fdata-sections
ADAFLAGS_common += -fno-pie
# Ada warning options:
#
@@ -557,7 +591,10 @@ ADAFLAGS_common += -gnatwa.eeD.HHTU.U.W.Y
# Disable style checks for now
ADAFLAGS_common += -gnatyN
-LDFLAGS_common := --gc-sections -nostdlib --nmagic -static
+LDFLAGS_common := --gc-sections
+LDFLAGS_common += -nostdlib
+LDFLAGS_common += --nmagic
+LDFLAGS_common += -static
# Workaround for RISC-V linker bug, merge back into above line when fixed.
# https://sourceware.org/bugzilla/show_bug.cgi?id=27180