Merge pull request #31 from sifive/riscv-envvar
Fix build with RISCV environment variable defined.
This commit is contained in:
commit
b9e1393579
7
Makefile
7
Makefile
@ -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
|
RISCV ?= $(CURDIR)/toolchain
|
||||||
PATH := $(RISCV)/bin:$(PATH)
|
PATH := $(RISCV)/bin:$(PATH)
|
||||||
ISA ?= rv64imafdc
|
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 Program it with: dd if=work/bbl.bin of=/dev/sd-your-card bs=1M
|
||||||
@echo
|
@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)
|
$(toolchain_dest)/bin/$(target)-gcc: $(toolchain_srcdir)
|
||||||
mkdir -p $(toolchain_wrkdir)
|
mkdir -p $(toolchain_wrkdir)
|
||||||
$(MAKE) -C $(linux_srcdir) O=$(dir $<) ARCH=riscv INSTALL_HDR_PATH=$(abspath $(toolchain_srcdir)/linux-headers) headers_install
|
$(MAKE) -C $(linux_srcdir) O=$(dir $<) ARCH=riscv INSTALL_HDR_PATH=$(abspath $(toolchain_srcdir)/linux-headers) headers_install
|
||||||
|
Loading…
Reference in New Issue
Block a user