Instead of trying to modify PATH, add an explicit directory name to CROSS.
@@ -1,5 +1,3 @@
-export PATH := $(CURDIR)/tools/gnu:$(PATH)
-
SUBDIRS = tools fw fpga
all clean spotless :
@@ -1,7 +1,6 @@
MAKEFLAGS += -R -r
-export PATH := $(CURDIR)/tools/gnu/bin:$(PATH)
-CROSS = riscv32-unknown-elf-
+CROSS = ../tools/gnu/bin/riscv32-unknown-elf-
CC = $(CROSS)gcc
LD = $(CROSS)ld
OBJCOPY = $(CROSS)objcopy
prefix := $(CURDIR)
-export PATH := $(prefix)/gnu/bin:$(PATH)
tooldir = riscv-gnu-toolchain
binutils = $(tooldir)/riscv-binutils