[make] default WITH_LINKER_GC to false at the place it is used

Also switch the test logic to the TOBOOL macro.
This commit is contained in:
Travis Geiselbrecht
2022-04-18 01:09:52 -07:00
parent 9d1802fa2c
commit 479d989185
4 changed files with 4 additions and 7 deletions

View File

@@ -16,10 +16,8 @@ ifndef TOOLCHAIN_PREFIX
TOOLCHAIN_PREFIX := m68k-elf-
endif
WITH_LINKER_GC ?= 0
# select the cpu based on flags the platform/target passes in
M68K_CPU ?= 68040
M68K_CPU ?= 68040 # default to 040
ifeq ($(M68K_CPU),68000)
ARCH_COMPILEFLAGS := -mcpu=68000

View File

@@ -24,8 +24,6 @@ ifndef TOOLCHAIN_PREFIX
TOOLCHAIN_PREFIX := microblaze-elf-
endif
WITH_LINKER_GC ?= 0
LITTLE_ENDIAN ?= 0
ifneq ($(LITTLE_ENDIAN),0)

View File

@@ -26,7 +26,6 @@ ifndef TOOLCHAIN_PREFIX
TOOLCHAIN_PREFIX := mips-elf-
endif
WITH_LINKER_GC ?= 0
LITTLE_ENDIAN ?= 0
ifneq ($(LITTLE_ENDIAN),0)

View File

@@ -1,7 +1,9 @@
# use linker garbage collection, if requested
ifeq ($(WITH_LINKER_GC),1)
WITH_LINKER_GC ?= false
ifeq (true,$(call TOBOOL,$(WITH_LINKER_GC)))
GLOBAL_COMPILEFLAGS += -ffunction-sections -fdata-sections
GLOBAL_LDFLAGS += --gc-sections
GLOBAL_DEFINES += LINKER_GC=1
endif
ifneq (,$(EXTRA_BUILDRULES))