summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-01-25 09:34:26 -0800
committerChromeBot <chrome-bot@google.com>2013-01-25 10:48:02 -0800
commit45cc0f2c0a48b377520842597769a5813cf55902 (patch)
tree2b863a7cc3620fa3ffe8fe3bf1bc00760ef3a8bc /Makefile
parent0bda13f5154afc8068e7d2d4563ff20b152f1c87 (diff)
downloadvboot-45cc0f2c0a48b377520842597769a5813cf55902.tar.gz
Fix incorrect CFLAGS when compiling for host
Both HOSTLIB and FWLIB depend on FWLIB_OBJS, and it's the OBJS which need to override their CFLAGS. The way it was, depending on the order of evaluation of HOSTLIB and FWLIB, the OBJS would get compiled with different flags. So 'make' worked, because it depended on fwlib before hostlib. But 'make runtests' failed, because it depended on hostlib but not fwlib. BUG=none BRANCH=none TEST=make runtests Change-Id: Id4e4cb4f7a58c7ab8d9fd00d91c4ab8f4518d4bc Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/42014 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 5 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index f561e445..b37a21f2 100644
--- a/Makefile
+++ b/Makefile
@@ -545,7 +545,7 @@ ALL_DEPS += ${ALL_OBJS:%.o=%.o.d}
# TPM_BLOCKING_CONTINUESELFTEST is defined if TPM_ContinueSelfTest blocks until
# the self test has completed.
-${FWLIB}: CFLAGS += -DTPM_BLOCKING_CONTINUESELFTEST
+${FWLIB_OBJS}: CFLAGS += -DTPM_BLOCKING_CONTINUESELFTEST
# TPM_MANUAL_SELFTEST is defined if the self test must be started manually
# (with a call to TPM_ContinueSelfTest) instead of starting automatically at
@@ -558,24 +558,24 @@ ${FWLIB}: CFLAGS += -DTPM_BLOCKING_CONTINUESELFTEST
ifeq (${FIRMWARE_ARCH},i386)
# Unrolling loops in cryptolib makes it faster
-${FWLIB}: CFLAGS += -DUNROLL_LOOPS
+${FWLIB_OBJS}: CFLAGS += -DUNROLL_LOOPS
# Workaround for coreboot on x86, which will power off asynchronously
# without giving us a chance to react. This is not an example of the Right
# Way to do things. See chrome-os-partner:7689, and the commit message
# that made this change.
-${FWLIB}: CFLAGS += -DSAVE_LOCALE_IMMEDIATELY
+${FWLIB_OBJS}: CFLAGS += -DSAVE_LOCALE_IMMEDIATELY
# On x86 we don't actually read the GBB data into RAM until it is needed.
# Therefore it makes sense to cache it rather than reading it each time.
# Enable this feature.
-${FWLIB}: CFLAGS += -DCOPY_BMP_DATA
+${FWLIB_OBJS}: CFLAGS += -DCOPY_BMP_DATA
endif
ifeq (${FIRMWARE_ARCH},)
# Disable rollback TPM when compiling locally, since otherwise
# load_kernel_test attempts to talk to the TPM.
-${FWLIB}: CFLAGS += -DDISABLE_ROLLBACK_TPM
+${FWLIB_OBJS}: CFLAGS += -DDISABLE_ROLLBACK_TPM
endif
.PHONY: fwlib