From 7c39cc2b5b430f8679439bd472b1d4df638d0500 Mon Sep 17 00:00:00 2001 From: Hansung Kim Date: Tue, 3 Jan 2023 23:54:08 -0800 Subject: [PATCH] Makefile: respect RISCV_TOOLCHAIN_PATH if already set in env --- runtime/Makefile | 4 ++-- tests/runtime/fibonacci/Makefile | 4 ++-- tests/runtime/hello/Makefile | 4 ++-- tests/runtime/simple/Makefile | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/runtime/Makefile b/runtime/Makefile index 4c0241aa..742cda92 100644 --- a/runtime/Makefile +++ b/runtime/Makefile @@ -1,9 +1,9 @@ XLEN ?= 32 ifeq ($(XLEN),32) -RISCV_TOOLCHAIN_PATH = /opt/riscv-gnu-toolchain +RISCV_TOOLCHAIN_PATH ?= /opt/riscv-gnu-toolchain else -RISCV_TOOLCHAIN_PATH = /opt/riscv64-gnu-toolchain +RISCV_TOOLCHAIN_PATH ?= /opt/riscv64-gnu-toolchain endif RISCV_PREFIX ?= riscv$(XLEN)-unknown-elf- diff --git a/tests/runtime/fibonacci/Makefile b/tests/runtime/fibonacci/Makefile index 39c0c751..bc00194e 100644 --- a/tests/runtime/fibonacci/Makefile +++ b/tests/runtime/fibonacci/Makefile @@ -1,9 +1,9 @@ XLEN ?= 32 ifeq ($(XLEN),32) -RISCV_TOOLCHAIN_PATH = /opt/riscv-gnu-toolchain +RISCV_TOOLCHAIN_PATH ?= /opt/riscv-gnu-toolchain else -RISCV_TOOLCHAIN_PATH = /opt/riscv64-gnu-toolchain +RISCV_TOOLCHAIN_PATH ?= /opt/riscv64-gnu-toolchain endif RISCV_PREFIX ?= riscv$(XLEN)-unknown-elf- diff --git a/tests/runtime/hello/Makefile b/tests/runtime/hello/Makefile index 3310bf86..a0257cf3 100644 --- a/tests/runtime/hello/Makefile +++ b/tests/runtime/hello/Makefile @@ -1,9 +1,9 @@ XLEN ?= 32 ifeq ($(XLEN),32) -RISCV_TOOLCHAIN_PATH = /opt/riscv-gnu-toolchain +RISCV_TOOLCHAIN_PATH ?= /opt/riscv-gnu-toolchain else -RISCV_TOOLCHAIN_PATH = /opt/riscv64-gnu-toolchain +RISCV_TOOLCHAIN_PATH ?= /opt/riscv64-gnu-toolchain endif RISCV_PREFIX ?= riscv$(XLEN)-unknown-elf- diff --git a/tests/runtime/simple/Makefile b/tests/runtime/simple/Makefile index 5f89f366..046b0778 100644 --- a/tests/runtime/simple/Makefile +++ b/tests/runtime/simple/Makefile @@ -1,9 +1,9 @@ XLEN ?= 32 ifeq ($(XLEN),32) -RISCV_TOOLCHAIN_PATH = /opt/riscv-gnu-toolchain +RISCV_TOOLCHAIN_PATH ?= /opt/riscv-gnu-toolchain else -RISCV_TOOLCHAIN_PATH = /opt/riscv64-gnu-toolchain +RISCV_TOOLCHAIN_PATH ?= /opt/riscv64-gnu-toolchain endif RISCV_PREFIX ?= riscv$(XLEN)-unknown-elf-