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).
This commit is contained in:
Michael Panzlaff 2023-05-29 01:00:38 +02:00
parent 5100eef017
commit 2651401e6b
1 changed files with 1 additions and 1 deletions

View File

@ -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