[coreboot-gerrit] Patch set updated for coreboot: be89e3b build system: provide generic compiler flag variables
Patrick Georgi (pgeorgi@google.com)
gerrit at coreboot.org
Sun Mar 29 22:49:27 CEST 2015
Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9114
-gerrit
commit be89e3b022f57c40d893ddb414a952a67b6d820d
Author: Patrick Georgi <pgeorgi at chromium.org>
Date: Fri Mar 27 15:27:21 2015 +0100
build system: provide generic compiler flag variables
Introduce generic-$(type)-ccopts and $(class)-generic-ccopts
to declare compiler flags that apply to all files of a certain
type or of a certain class. Then use them.
This is inspired by the commit listed below, but rewritten to match
upstream, and split in smaller pieces to keep intent clear.
Change-Id: I655688e82a0cc5bad89b6f55dc217b9f66b64604
Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
Based-On-Change-Id: I50af7dacf616e0f8ff4c43f4acc679089ad7022b
Based-On-Signed-off-by: Julius Werner <jwerner at chromium.org>
Based-On-Reviewed-on: https://chromium-review.googlesource.com/219170
---
Makefile | 1 +
Makefile.inc | 12 ++++--------
src/arch/arm64/armv8/secmon/Makefile.inc | 5 +++--
src/vendorcode/google/chromeos/Makefile.inc | 3 +--
4 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/Makefile b/Makefile
index 8b5d61b..0cc9b6a 100644
--- a/Makefile
+++ b/Makefile
@@ -235,6 +235,7 @@ endef
filetypes-of-class=$(subst .,,$(sort $(suffix $($(1)-srcs))))
$(foreach class,$(classes), \
$(foreach type,$(call filetypes-of-class,$(class)), \
+ $(eval $(class)-$(type)-ccopts += $(generic-$(type)-ccopts) $($(class)-generic-ccopts)) \
$(eval $(call create_cc_template,$(class),$(type),$($(class)-$(type)-ccopts),$($(class)-$(type)-deps)))))
foreach-src=$(foreach file,$($(1)-srcs),$(eval $(call $(1)-objs_$(subst .,,$(suffix $(file)))_template,$(subst src/,,$(basename $(file))))))
diff --git a/Makefile.inc b/Makefile.inc
index 838a680..59ddf7e 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -116,8 +116,7 @@ ramstage-postprocess=$(foreach d,$(sort $(dir $(1))), \
$(eval $(d)ramstage.o: $(call files-in-dir,$(d),$(1)); $$(LD_ramstage) -o $$@ -r $$^ ) \
$(eval ramstage-objs:=$(d)ramstage.o $(filter-out $(call files-in-dir,$(d),$(1)),$(ramstage-objs))))
-romstage-c-ccopts:=-D__PRE_RAM__
-romstage-S-ccopts:=-D__PRE_RAM__
+romstage-generic-ccopts += -D__PRE_RAM__
ifeq ($(CONFIG_TRACE),y)
ramstage-c-ccopts:= -finstrument-functions
endif
@@ -133,13 +132,10 @@ ifeq ($(CONFIG_USE_BLOBS),y)
forgetthis:=$(if $(GIT),$(shell git submodule update --init --checkout 3rdparty))
endif
-bootblock-c-ccopts:=-D__BOOT_BLOCK__ -D__PRE_RAM__
-bootblock-S-ccopts:=-D__BOOT_BLOCK__ -D__PRE_RAM__
+bootblock-generic-ccopts += -D__BOOT_BLOCK__ -D__PRE_RAM__
-smmstub-c-ccopts:=-D__SMM__
-smmstub-S-ccopts:=-D__SMM__
-smm-c-ccopts:=-D__SMM__
-smm-S-ccopts:=-D__SMM__
+smmstub-generic-ccopts += -D__SMM__
+smm-generic-ccopts += -D__SMM__
# SMM TSEG base is dynamic
ifneq ($(CONFIG_SMM_MODULES),y)
diff --git a/src/arch/arm64/armv8/secmon/Makefile.inc b/src/arch/arm64/armv8/secmon/Makefile.inc
index a8d42b0..c61e876 100644
--- a/src/arch/arm64/armv8/secmon/Makefile.inc
+++ b/src/arch/arm64/armv8/secmon/Makefile.inc
@@ -28,8 +28,9 @@ SECMON_ELF=$(SECMON_DIR)/secmon.elf
SECMON_RMOD=$(SECMON_DIR)/secmon.elf.rmod
SECMON_RAMSTAGE=$(SECMON_DIR)/secmon.ramstage.o
-secmon-c-ccopts += -I$(src)/arch/arm64/include/armv8/ -include $(src)/include/kconfig.h -D__SECMON__
-secmon-S-ccopts += -I$(src)/arch/arm64/include/armv8/ -include $(src)/include/kconfig.h -D__SECMON__
+secmon-generic-ccopts += -D__SECMON__
+secmon-c-ccopts += -I$(src)/arch/arm64/include/armv8/ -include $(src)/include/kconfig.h
+secmon-S-ccopts += -I$(src)/arch/arm64/include/armv8/ -include $(src)/include/kconfig.h
secmon-y += secmon_init.c
secmon-y += psci.c
diff --git a/src/vendorcode/google/chromeos/Makefile.inc b/src/vendorcode/google/chromeos/Makefile.inc
index d8c57fb..8cf84fe 100644
--- a/src/vendorcode/google/chromeos/Makefile.inc
+++ b/src/vendorcode/google/chromeos/Makefile.inc
@@ -96,8 +96,7 @@ VB_SOURCE := vboot_reference
INCLUDES += -I$(VB_SOURCE)/firmware/2lib/include
INCLUDES += -I$(VB_SOURCE)/firmware/include
-verstage-c-ccopts += -D__PRE_RAM__ -D__VER_STAGE__
-verstage-S-ccopts += -D__PRE_RAM__ -D__VER_STAGE__
+verstage-generic-ccopts += -D__PRE_RAM__ -D__VER_STAGE__
ifeq ($(CONFIG_RETURN_FROM_VERSTAGE),y)
bootblock-y += verstub.c chromeos.c
More information about the coreboot-gerrit
mailing list