From 98d9abd494ab97e76acc89b6a1164a60ef5b287e Mon Sep 17 00:00:00 2001 From: Florian Zaruba Date: Sun, 25 Nov 2018 16:45:22 +0100 Subject: [PATCH] :art: Set sane default library path for verilator --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1445cb108..60c36208e 100755 --- a/Makefile +++ b/Makefile @@ -27,6 +27,10 @@ test-location ?= output/test # set to either nothing or -log torture-logs := -log +ifndef RISCV +$(error RISCV not set - please point your RISCV variable to your RISCV installation) +endif + # Sources # Package files -> compile first ariane_pkg := include/riscv_pkg.sv \ @@ -226,7 +230,8 @@ verilate_command := $(verilator) -Wno-style \ -Wno-lint \ $(if $(DEBUG),--trace-structs --trace,) \ - -LDFLAGS "-lfesvr" -CFLAGS "-std=c++11 -I../tb/dpi" -Wall --cc --vpi \ + -LDFLAGS "-L$(RISCV)/lib -Wl,-rpath,$(RISCV)/lib -lfesvr" \ + -CFLAGS "-std=c++11 -I../tb/dpi" -Wall --cc --vpi \ $(list_incdir) --top-module ariane_testharness \ --Mdir $(ver-library) -O3 \ --exe tb/ariane_tb.cpp tb/dpi/SimDTM.cc tb/dpi/SimJTAG.cc tb/dpi/remote_bitbang.cc