From 2651401e6b17a0ab5db1f28ec5c8220434950c42 Mon Sep 17 00:00:00 2001 From: Michael Panzlaff Date: Mon, 29 May 2023 01:00:38 +0200 Subject: [PATCH] Fix PATH for modern target for non dkp systems When prepending something to PATH, we should use PATH=/foo/bar:$PATH and not PATH=/foo/bar:PATH. Because your shell won't certainly find something under the literal name PATH. If one is not using devkitarm, TOOLCHAIN will resolve to an empty string. If TOOLCHAIN is an empty string the only search path for the modern gcc will be /bin which may work on some installations but is probably not what was originally intended with this line. So let's just search the standard search path if nothing can be found under $(TOOLCHAIN). Either way, PATH is already set up previously, so we can make sure MODERNCC is invoked properly by calling MODERNCC with PATH=$(PATH). --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 50a7e0d25..7476a9dc3 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ LD := $(PREFIX)ld # note: the makefile must be set up so MODERNCC is never called # if MODERN=0 MODERNCC := $(PREFIX)gcc -PATH_MODERNCC := PATH=$(TOOLCHAIN)/bin:PATH $(MODERNCC) +PATH_MODERNCC := PATH="$(PATH)" $(MODERNCC) ifeq ($(OS),Windows_NT) EXE := .exe