summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2020-11-21 10:53:08 +0000
committerCommit Bot <commit-bot@chromium.org>2020-11-23 16:13:23 +0000
commitedd222428715125b9ef2a9a8a064fc32a0d0bd24 (patch)
tree402cb9a2088e7f7715f6c31464e30366c03386b8
parent58534c3376f1caa8198d920f05cdac40cf2180d7 (diff)
downloadvboot-edd222428715125b9ef2a9a8a064fc32a0d0bd24.tar.gz
Split UI parts out of fwlib for host builds
They're not needed on the host (except for tests) and they trigger a bug in GCC 4.9 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49132). This way futility remains buildable with such an old host compiler, even if firmware builds and serious work (with tests) needs a newer compiler. Error message averted (sample): firmware/2lib/2ui_screens.c:17:32: error: initializer element is not constant #define MENU_ITEMS(a) ((struct vb2_menu){ \ ^ firmware/2lib/2ui_screens.c:1231:10: note: in expansion of macro 'MENU_ITEMS' .menu = MENU_ITEMS(diagnostics_memory_items), ^ Change-Id: Ic5bd16e4d252df4297d57c5d41436f4322a1445c Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2553422 Tested-by: Patrick Georgi <pgeorgi@chromium.org> Commit-Queue: Patrick Georgi <pgeorgi@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org>
-rw-r--r--Makefile20
1 files changed, 12 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index f508a386..3a30c166 100644
--- a/Makefile
+++ b/Makefile
@@ -387,24 +387,28 @@ FWLIB_SRCS = \
firmware/2lib/2sha_utility.c \
firmware/2lib/2stub_hwcrypto.c \
firmware/2lib/2tpm_bootmode.c \
- firmware/2lib/2ui.c \
- firmware/2lib/2ui_screens.c \
firmware/lib/cgptlib/cgptlib.c \
firmware/lib/cgptlib/cgptlib_internal.c \
firmware/lib/cgptlib/crc32.c \
firmware/lib/gpt_misc.c \
firmware/lib/vboot_api_kernel.c \
- firmware/lib/vboot_audio.c \
firmware/lib/vboot_kernel.c \
- firmware/lib/vboot_ui_legacy.c \
- firmware/lib/vboot_ui_legacy_clamshell.c \
- firmware/lib/vboot_ui_legacy_menu.c \
- firmware/lib/vboot_ui_legacy_wilco.c \
firmware/lib20/api_kernel.c \
firmware/lib20/kernel.c \
firmware/lib20/misc.c \
firmware/lib20/packed_key.c
+# Only add these to firmware and test builds,
+# as regular host builds don't need them
+$(if ${FIRMWARE_ARCH},FWLIB_SRCS,TESTLIB_SRCS) += \
+ firmware/2lib/2ui.c \
+ firmware/2lib/2ui_screens.c \
+ firmware/lib/vboot_audio.c \
+ firmware/lib/vboot_ui_legacy.c \
+ firmware/lib/vboot_ui_legacy_clamshell.c \
+ firmware/lib/vboot_ui_legacy_menu.c \
+ firmware/lib/vboot_ui_legacy_wilco.c
+
# TPM lightweight command library
ifeq (${TPM2_MODE},)
TLCL_SRCS = \
@@ -677,7 +681,7 @@ ALL_OBJS += ${FUTIL_OBJS}
# Library of handy test functions.
TESTLIB = ${BUILD}/tests/test.a
-TESTLIB_SRCS = \
+TESTLIB_SRCS += \
tests/test_common.c \
tests/timer_utils.c \
tests/crc32_test.c