[make][engine] make the setting of toolchain variables conditional

CC, LD, etc was already settable by the environment, but not by
local.mk, since they were assigned in engine.mk as :=. Change the set to
be conditional to fix this.
This commit is contained in:
Travis Geiselbrecht
2023-06-01 17:53:22 -07:00
parent 923541d4c2
commit c3a5c31aac

View File

@@ -183,14 +183,14 @@ endif
# default to no ccache
CCACHE ?=
CC := $(CCACHE) $(TOOLCHAIN_PREFIX)gcc
LD := $(TOOLCHAIN_PREFIX)ld
OBJDUMP := $(TOOLCHAIN_PREFIX)objdump
OBJCOPY := $(TOOLCHAIN_PREFIX)objcopy
CPPFILT := $(TOOLCHAIN_PREFIX)c++filt
SIZE := $(TOOLCHAIN_PREFIX)size
NM := $(TOOLCHAIN_PREFIX)nm
STRIP := $(TOOLCHAIN_PREFIX)strip
CC ?= $(CCACHE) $(TOOLCHAIN_PREFIX)gcc
LD ?= $(TOOLCHAIN_PREFIX)ld
OBJDUMP ?= $(TOOLCHAIN_PREFIX)objdump
OBJCOPY ?= $(TOOLCHAIN_PREFIX)objcopy
CPPFILT ?= $(TOOLCHAIN_PREFIX)c++filt
SIZE ?= $(TOOLCHAIN_PREFIX)size
NM ?= $(TOOLCHAIN_PREFIX)nm
STRIP ?= $(TOOLCHAIN_PREFIX)strip
# Now that CC is defined we can check if warning flags are supported and add
# them to GLOBAL_COMPILEFLAGS if they are.