summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMarc Jones <marc.jones@se-eng.com>2014-11-06 15:50:22 -0700
committerMarc Jones <marc.jones@se-eng.com>2014-11-09 01:36:43 +0100
commita38ccfdee1404211dbf3c43edf7b5b686a3a05fd (patch)
treea162c0b5c8a6c6fc7272f8e966039861ca54f1cd /Makefile
parent430363ace7338b9708feefb5917d667f1733944d (diff)
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')
-rw-r--r--Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index fa42101692..eaac22bb90 100644
--- a/Makefile
+++ b/Makefile
@@ -219,12 +219,13 @@ alldirs:=$(sort $(abspath $(dir $(allobjs))))
define create_cc_template
# $1 obj class
# $2 source suffix (c, S)
-# $3 additional dependencies
+# $3 additional compiler flags
+# $4 additional dependencies
ifn$(EMPTY)def $(1)-objs_$(2)_template
de$(EMPTY)fine $(1)-objs_$(2)_template
-$(obj)/$$(1).$(1).o: src/$$(1).$(2) $(obj)/config.h $(3)
+$(obj)/$$(1).$(1).o: src/$$(1).$(2) $(obj)/config.h $(4)
@printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n"
- $(CC_$(1)) -MMD $$$$(CPPFLAGS_$(1)) $$$$(CFLAGS_$(1)) -c -o $$$$@ $$$$<
+ $(CC_$(1)) $(3) -MMD $$$$(CPPFLAGS_$(1)) $$$$(CFLAGS_$(1)) -c -o $$$$@ $$$$<
en$(EMPTY)def
end$(EMPTY)if
endef
@@ -232,7 +233,7 @@ endef
filetypes-of-class=$(subst .,,$(sort $(suffix $($(1)-srcs))))
$(foreach class,$(classes), \
$(foreach type,$(call filetypes-of-class,$(class)), \
- $(eval $(call create_cc_template,$(class),$(type),$($(class)-$(type)-deps)))))
+ $(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))))))
$(eval $(foreach class,$(classes),$(call foreach-src,$(class))))