diff options
author | Jeremy Bettis <jbettis@google.com> | 2021-09-20 16:10:51 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-27 19:16:05 +0000 |
commit | 12683de751a5b00a9dea2146313cc25dae86182f (patch) | |
tree | d7cd3661b133bb814864f34c4f6a0cbedc5bbaf0 | |
parent | fe015a6df72349c3cf654ea3eb80b46e52b10e1e (diff) | |
download | chrome-ec-12683de751a5b00a9dea2146313cc25dae86182f.tar.gz |
ec: Don't run PKG_CONFIG if we already know answer
There is no libftdi1.pc in the gitlab docker image, so if
LIBFTDI_NAME is already set (from the command line for example) don't
run the command to detect it.
BRANCH=None
BUG=None
TEST=in docker: make -j CRYPTOC_DIR="${MODULES_DIR}/cryptoc" \
FTDIVERSION=1 HOSTGCOV='gcov' \
CROSS_COMPILE_arm=/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi- \
coverage
Change-Id: Ic5ff6702a73660009928f3e2df08db47b781187c
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3171941
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r-- | Makefile.toolchain | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Makefile.toolchain b/Makefile.toolchain index 29e0beca08..fbd6af1276 100644 --- a/Makefile.toolchain +++ b/Makefile.toolchain @@ -117,12 +117,14 @@ CFLAGS+= -fconserve-stack endif CXXFLAGS+=-DPROTOBUF_INLINE_NOT_IN_HEADERS=0 +ifeq ($(LIBFTDI_NAME),) FTDIVERSION:=$(shell $(PKG_CONFIG) --modversion libftdi1 2>/dev/null) ifneq ($(FTDIVERSION),) LIBFTDI_NAME=ftdi1 else LIBFTDI_NAME=ftdi endif +endif LIBFTDIUSB_CFLAGS:=$(shell $(PKG_CONFIG) --cflags lib${LIBFTDI_NAME} libusb-1.0) LIBFTDIUSB_LDLIBS:=$(shell $(PKG_CONFIG) --libs lib${LIBFTDI_NAME} libusb-1.0) |