Give build error with RISCV environment variable defined wrong.

This commit is contained in:
Jim Wilson 2018-02-04 13:11:38 -08:00
parent 6ddb0ba5f7
commit b7a361aa1f

View File

@ -1,3 +1,5 @@
# RISCV should either be unset, or set to point to a directory that contains
# a toolchain install tree that was built via other means.
RISCV ?= $(CURDIR)/toolchain
PATH := $(RISCV)/bin:$(PATH)
ISA ?= rv64imafdc
@ -59,6 +61,11 @@ all: $(hex)
@echo Program it with: dd if=work/bbl.bin of=/dev/sd-your-card bs=1M
@echo
ifneq ($(RISCV),$(toolchain_dest))
$(RISCV)/bin/$(target)-gcc:
$(error The RISCV environment variable was set, but is not pointing at a toolchain install tree)
endif
$(toolchain_dest)/bin/$(target)-gcc: $(toolchain_srcdir)
mkdir -p $(toolchain_wrkdir)
$(MAKE) -C $(linux_srcdir) O=$(dir $<) ARCH=riscv INSTALL_HDR_PATH=$(abspath $(toolchain_srcdir)/linux-headers) headers_install