summaryrefslogtreecommitdiff
path: root/src/security/vboot
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2019-01-24 16:13:16 -0800
committerPatrick Georgi <pgeorgi@google.com>2019-01-28 13:38:16 +0000
commitfaa3d4680c3adaa7e8397733392a6d089c459373 (patch)
tree7277bbc7029a925285e71d8fac1c7bc5758b6e9e /src/security/vboot
parent3f888ef845983e7347a971e5d95a71a7de4de523 (diff)
vboot: Makefile: Also apply CPPFLAGS include path fixups to ccopts
In some cases (e.g. Arm architecture variants), include paths are stuck into <stage>-generic-ccopts rather than CPPFLAGS_<stage> (in fact, the whole redundancy between these two is kinda stupid and we should probably eliminate the latter, but I don't want to get into that right now). This patch makes sure those paths are also correctly translated when invoking $(MAKE) for vboot. Change-Id: I37f09b88e555567590664e0e6fac23c34fd887df Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/31084 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/security/vboot')
-rw-r--r--src/security/vboot/Makefile.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/security/vboot/Makefile.inc b/src/security/vboot/Makefile.inc
index ae80a02965..6c63f7b393 100644
--- a/src/security/vboot/Makefile.inc
+++ b/src/security/vboot/Makefile.inc
@@ -81,16 +81,17 @@ postcar-y += common.c
romstage-$(CONFIG_FSP2_0_USES_TPM_MRC_HASH) += mrc_cache_hash_tpm.c
+vboot-fixup-includes = $(patsubst -I%,-I$(top)/%,\
+ $(patsubst $(src)/%.h,$(top)/$(src)/%.h,\
+ $(filter-out -I$(obj),$(1))))
# call with $1 = stage name to create rules for building the library
# for the stage and adding it to the stage's set of object files.
define vboot-for-stage
VB2_LIB_$(1) = $(obj)/external/vboot_reference-$(1)/vboot_fw20.a
-VBOOT_CFLAGS_$(1) += $$(patsubst -I%,-I$(top)/%,\
- $$(patsubst $(src)/%.h,$(top)/$(src)/%.h,\
- $$(filter-out -I$(obj), $$(CPPFLAGS_$(1)))))
+VBOOT_CFLAGS_$(1) += $$(call vboot-fixup-includes,$$(CPPFLAGS_$(1)))
VBOOT_CFLAGS_$(1) += $$(CFLAGS_$(1))
-VBOOT_CFLAGS_$(1) += $$($(1)-c-ccopts)
+VBOOT_CFLAGS_$(1) += $$(call vboot-fixup-includes,$$($(1)-c-ccopts))
VBOOT_CFLAGS_$(1) += -I$(abspath $(obj)) -Wno-missing-prototypes
VBOOT_CFLAGS_$(1) += -DVBOOT_DEBUG