summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoj Gupta <manojgupta@google.com>2019-09-07 02:44:52 -0700
committerPatrick Georgi <pgeorgi@google.com>2019-09-11 20:41:47 +0000
commit297e9c826f07c660e31e278a641514f020fcaeda (patch)
tree1ec3686fa112016ee87a36d632cdfa2323b9e925
parent1d260e65739e60cb0e3a72c38aded614ea4b193e (diff)
downloadcoreboot-297e9c826f07c660e31e278a641514f020fcaeda.tar.xz
futility: Use HOSTPKGCONFIG for host PKG_CONFIG
futility is built for the host. However, when cross-compiling, the target's pkg-config is called to get the library paths which can add paths from the cross-compilation tree instead of host. e.g. /build/elm/usr/bin/pkg-config gets called instead of /usr/bin/pkg-config . /build/elm/usr/bin/pkg-config adds the paths specific to the cross-compilation target e.g. /build/elm/usr/lib instead of /usr/lib. This causes linker to complain that files in library paths do not match the architecture. BFD produces a warning while LLD errors out. Fix this by passing PKG_CONFIG from host when building futility. BUG=chromium:999217 TEST=coreboot builds BRANCH=None Cq-Depend: chromium:1778519 Change-Id: Id3afbf25001cf3daa72f36a290c93136cf9f162d Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/35316 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
-rw-r--r--util/futility/Makefile.inc1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/futility/Makefile.inc b/util/futility/Makefile.inc
index 782953e649..06e724c15f 100644
--- a/util/futility/Makefile.inc
+++ b/util/futility/Makefile.inc
@@ -5,6 +5,7 @@ $(objutil)/futility/build/futility/futility:
unset CFLAGS LDFLAGS; $(MAKE) -C $(VBOOT_SOURCE) \
BUILD=$(abspath $@/../..) \
CC="$(HOSTCC)" \
+ $(if $(HOSTPKGCONFIG), PKG_CONFIG="$(HOSTPKGCONFIG)") \
V=$(V) \
$(abspath $@)