summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoj Gupta <manojgupta@google.com>2019-09-06 14:39:39 -0700
committerCommit Bot <commit-bot@chromium.org>2019-09-07 05:13:59 +0000
commit4856877a76a90ab1851c0e24593ec67e6375a60a (patch)
treeea1b4af67e937b4b29e7b8083718a47aa6b62c03
parent110df5cafaa55eb0e78f379be7731f8d7b3914b7 (diff)
downloadvboot-4856877a76a90ab1851c0e24593ec67e6375a60a.tar.gz
Use bfd as the linker to build vboot_reference.
Coreboot uses vboot_reference to build futility as a host binary. However, it passes a target path for linking which causes LLD to error out. e.g. x86_64-pc-linux-clang -L/build/veyron_minnie/usr/lib where -L/build/veyron_minnie/usr/lib should not be passed as futility is being linked as a host binary. Use bfd as the linker temporarily as it only produces a warning and does not error out. BUG=chromium:999217 TEST=coreboot builds BRANCH=None Change-Id: I8716ff3a0b4cc8afc54a3cc95ca5c1bfdcba6c9f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1789676 Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
-rw-r--r--Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index fa63773b..0ccd04af 100644
--- a/Makefile
+++ b/Makefile
@@ -165,7 +165,8 @@ CFLAGS += -DCHROMEOS_ENVIRONMENT ${COMMON_FLAGS}
endif
# Needs -Wl because LD is actually set to CC by default.
-LDFLAGS ?= -Wl,--gc-sections
+# Build with bfd linker, https://crbub.com/999217.
+LDFLAGS ?= -Wl,--gc-sections -fuse-ld=bfd
ifneq (${DEBUG},)
CFLAGS += -DVBOOT_DEBUG