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>
This commit is contained in:
Julius Werner 2019-01-24 16:13:16 -08:00 committed by Patrick Georgi
parent 3f888ef845
commit faa3d4680c
1 changed files with 5 additions and 4 deletions

View File

@ -81,16 +81,17 @@ postcar-y += common.c
romstage-$(CONFIG_FSP2_0_USES_TPM_MRC_HASH) += mrc_cache_hash_tpm.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 # 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. # for the stage and adding it to the stage's set of object files.
define vboot-for-stage define vboot-for-stage
VB2_LIB_$(1) = $(obj)/external/vboot_reference-$(1)/vboot_fw20.a VB2_LIB_$(1) = $(obj)/external/vboot_reference-$(1)/vboot_fw20.a
VBOOT_CFLAGS_$(1) += $$(patsubst -I%,-I$(top)/%,\ VBOOT_CFLAGS_$(1) += $$(call vboot-fixup-includes,$$(CPPFLAGS_$(1)))
$$(patsubst $(src)/%.h,$(top)/$(src)/%.h,\
$$(filter-out -I$(obj), $$(CPPFLAGS_$(1)))))
VBOOT_CFLAGS_$(1) += $$(CFLAGS_$(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) += -I$(abspath $(obj)) -Wno-missing-prototypes
VBOOT_CFLAGS_$(1) += -DVBOOT_DEBUG VBOOT_CFLAGS_$(1) += -DVBOOT_DEBUG