diff options
author | Marc Jones <marc.jones@se-eng.com> | 2014-11-06 15:50:22 -0700 |
---|---|---|
committer | Marc Jones <marc.jones@se-eng.com> | 2014-11-09 01:36:43 +0100 |
commit | a38ccfdee1404211dbf3c43edf7b5b686a3a05fd (patch) | |
tree | a162c0b5c8a6c6fc7272f8e966039861ca54f1cd /Makefile.inc | |
parent | 430363ace7338b9708feefb5917d667f1733944d (diff) | |
download | coreboot-a38ccfdee1404211dbf3c43edf7b5b686a3a05fd.tar.xz |
build: Add ccopts back into the build
The ccopts mechanism is needed for passing ARM assembler flags to GCC.
There are many gotchas in adding ASFLAGS. As things have moved
around, the revert doesn't remove cleanly, so this reverts and cleans
up the ccopts.
This reverts commit 25b56c3af514faa8a730d56fe14cae4960ac83aa.
Change-Id: I44c025535258e6afb05a814123c10c24775a88e8
Signed-off-by: Marc Jones <marc.jones@se-eng.com>
Reviewed-on: http://review.coreboot.org/7352
Tested-by: build bot (Jenkins)
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'Makefile.inc')
-rw-r--r-- | Makefile.inc | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Makefile.inc b/Makefile.inc index 934755fd68..1aa4ddefda 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -115,12 +115,13 @@ 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)))) -CPPFLAGS_romstage += -D__PRE_RAM__ +romstage-c-ccopts:=-D__PRE_RAM__ +romstage-S-ccopts:=-D__PRE_RAM__ ifeq ($(CONFIG_TRACE),y) -CFLAGS_ramstage += -finstrument-functions +ramstage-c-ccopts:= -finstrument-functions endif ifeq ($(CONFIG_COVERAGE),y) -CFLAGS_ramstage += -fprofile-arcs -ftest-coverage +ramstage-c-ccopts+=-fprofile-arcs -ftest-coverage endif # try to fetch non-optional submodules @@ -131,15 +132,18 @@ ifeq ($(CONFIG_USE_BLOBS),y) forgetthis:=$(shell git submodule update --init --checkout 3rdparty) endif -CPPFLAGS_bootblock += -D__BOOT_BLOCK__ -D__PRE_RAM__ +bootblock-c-ccopts:=-D__BOOT_BLOCK__ -D__PRE_RAM__ +bootblock-S-ccopts:=-D__BOOT_BLOCK__ -D__PRE_RAM__ -CPPFLAGS_smmstub += -D__SMM__ -CPPFLAGS_smm += -D__SMM__ +smmstub-c-ccopts:=-D__SMM__ +smmstub-S-ccopts:=-D__SMM__ +smm-c-ccopts:=-D__SMM__ +smm-S-ccopts:=-D__SMM__ # SMM TSEG base is dynamic ifneq ($(CONFIG_SMM_MODULES),y) ifeq ($(CONFIG_SMM_TSEG),y) -CFLAGS_smm += -fpic +smm-c-ccopts += -fpic endif endif @@ -337,15 +341,15 @@ $(objutil)/%.o: $(objutil)/%.c $(obj)/%.ramstage.o $(abspath $(obj))/%.ramstage.o: $(obj)/%.c $(obj)/config.h $(OPTION_TABLE_H) @printf " CC $(subst $(obj)/,,$(@))\n" - $(CC_ramstage) -MMD $(CFLAGS_ramstage) $(CPPFLAGS_ramstage) -c -o $@ $< + $(CC_ramstage) -MMD $(CFLAGS_ramstage) $(CPPFLAGS_ramstage) $(ramstage-c-ccopts) -c -o $@ $< $(obj)/%.romstage.o $(abspath $(obj))/%.romstage.o: $(obj)/%.c $(obj)/config.h $(OPTION_TABLE_H) @printf " CC $(subst $(obj)/,,$(@))\n" - $(CC_romstage) -MMD -D__PRE_RAM__ $(CFLAGS_romstage) $(CPPFLAGS_romstage) -c -o $@ $< + $(CC_romstage) -MMD $(CFLAGS_romstage) $(CPPFLAGS_romstage) $(romstage-c-ccopts) -c -o $@ $< $(obj)/%.bootblock.o $(abspath $(obj))/%.bootblock.o: $(obj)/%.c $(obj)/config.h $(OPTION_TABLE_H) @printf " CC $(subst $(obj)/,,$(@))\n" - $(CC_bootblock) -MMD $(CFLAGS_bootblock) $(CPPFLAGS_bootblock) -c -o $@ $< + $(CC_bootblock) -MMD $(CFLAGS_bootblock) $(CPPFLAGS_bootblock) $(bootblock-c-ccopts) -c -o $@ $< ####################################################################### # Clean up rules |