From faa3d4680c3adaa7e8397733392a6d089c459373 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Thu, 24 Jan 2019 16:13:16 -0800 Subject: vboot: Makefile: Also apply CPPFLAGS include path fixups to ccopts In some cases (e.g. Arm architecture variants), include paths are stuck into -generic-ccopts rather than CPPFLAGS_ (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 Reviewed-on: https://review.coreboot.org/c/31084 Tested-by: build bot (Jenkins) Reviewed-by: Nico Huber --- src/security/vboot/Makefile.inc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/security') 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 -- cgit v1.2.3