From 297e9c826f07c660e31e278a641514f020fcaeda Mon Sep 17 00:00:00 2001 From: Manoj Gupta Date: Sat, 7 Sep 2019 02:44:52 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/35316 Reviewed-by: Julius Werner Tested-by: build bot (Jenkins) --- util/futility/Makefile.inc | 1 + 1 file changed, 1 insertion(+) 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 $@) -- cgit v1.2.3