libpayload/bin/lpgcc: Make lpgcc provide TPM configuration for vboot

TPM1_MODE and TPM2_MODE defines have to be added to vboot and payload
cflags to make them build correctly without requiring payloads to provide
defines.

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I567a9f04d7089699840dc7e0a063cf3030fb934b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62516
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Jakub Czapiga 2022-03-02 12:18:11 +01:00 committed by Julius Werner
parent afaee235fa
commit 49fff57a09
1 changed files with 8 additions and 0 deletions

View File

@ -182,6 +182,14 @@ trygccoption -fno-stack-protector
_CFLAGS="$_CFLAGS -include $BASE/../include/kconfig.h -include $BASE/../include/compiler.h"
_CFLAGS="$_CFLAGS -I`$DEFAULT_CC $_ARCHEXTRA -print-search-dirs | head -n 1 | cut -d' ' -f2`include"
if [ "$CONFIG_LP_VBOOT_LIB" = y ]; then
if [ "$CONFIG_LP_VBOOT_TPM2_MODE" = y ]; then
_CFLAGS="$_CFLAGS -DTPM2_MODE"
else
_CFLAGS="$_CFLAGS -DTPM1_MODE"
fi
fi
_LDFLAGS="-L$_LIBDIR $_LDSCRIPT -static -Wl,--gc-sections"
if [ $DOLINK -eq 0 ]; then