build: Make QEMU_BIN_PATH optional

QEMU_BIN_PATH is frequently set to pick up qemu binaries from "obvious"
places such as /usr/bin or /usr/local/bin. Neither of these values will
be correct for all users and both directories would typically be found
in the user's PATH. Much better to make QEMU_BIN_PATH optional and picking
up qemu via PATH instead.

Tested with ZEPHYR_GCC_VARIANT={zephyr|xtools}.

Change-Id: I1acfc5b12341c6d330a3e9e90b0ab5bde29e2e4f
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Daniel Thompson 2016-09-11 20:51:22 +01:00 committed by Anas Nashif
commit 389ed15b4c
2 changed files with 2 additions and 5 deletions

View file

@ -721,8 +721,7 @@ ifdef MAKEFILE_TOOLCHAIN_DO_PASS2
include $(srctree)/scripts/Makefile.toolchain.$(ZEPHYR_GCC_VARIANT)
endif
QEMU_BIN_PATH ?= /usr/bin
QEMU = $(QEMU_BIN_PATH)/$(QEMU_$(ARCH))
QEMU = $(addsuffix /,$(QEMU_BIN_PATH))$(QEMU_$(ARCH))
# The all: target is the default when no target is given on the
# command line.

View file

@ -24,6 +24,4 @@ TOOLCHAIN_LIBS = gcc
CROSS_COMPILE_version = $(shell $(CROSS_COMPILE)gcc -dumpversion)
LIB_INCLUDE_DIR += -L ${CROSS_COMPILE_ROOT}/lib/gcc/${CROSS_COMPILE_TARGET}/${CROSS_COMPILE_version}/
QEMU_BIN_PATH ?= /usr/local/bin
export CROSS_COMPILE TOOLCHAIN_LIBS LIB_INCLUDE_DIR TOOLCHAIN_CFLAGS QEMU_BIN_PATH
export CROSS_COMPILE TOOLCHAIN_LIBS LIB_INCLUDE_DIR TOOLCHAIN_CFLAGS