[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:
@@ -16,10 +16,8 @@ ifndef TOOLCHAIN_PREFIX
|
|||||||
TOOLCHAIN_PREFIX := m68k-elf-
|
TOOLCHAIN_PREFIX := m68k-elf-
|
||||||
endif
|
endif
|
||||||
|
|
||||||
WITH_LINKER_GC ?= 0
|
|
||||||
|
|
||||||
# select the cpu based on flags the platform/target passes in
|
# select the cpu based on flags the platform/target passes in
|
||||||
M68K_CPU ?= 68040
|
M68K_CPU ?= 68040 # default to 040
|
||||||
|
|
||||||
ifeq ($(M68K_CPU),68000)
|
ifeq ($(M68K_CPU),68000)
|
||||||
ARCH_COMPILEFLAGS := -mcpu=68000
|
ARCH_COMPILEFLAGS := -mcpu=68000
|
||||||
|
|||||||
@@ -24,8 +24,6 @@ ifndef TOOLCHAIN_PREFIX
|
|||||||
TOOLCHAIN_PREFIX := microblaze-elf-
|
TOOLCHAIN_PREFIX := microblaze-elf-
|
||||||
endif
|
endif
|
||||||
|
|
||||||
WITH_LINKER_GC ?= 0
|
|
||||||
|
|
||||||
LITTLE_ENDIAN ?= 0
|
LITTLE_ENDIAN ?= 0
|
||||||
|
|
||||||
ifneq ($(LITTLE_ENDIAN),0)
|
ifneq ($(LITTLE_ENDIAN),0)
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ ifndef TOOLCHAIN_PREFIX
|
|||||||
TOOLCHAIN_PREFIX := mips-elf-
|
TOOLCHAIN_PREFIX := mips-elf-
|
||||||
endif
|
endif
|
||||||
|
|
||||||
WITH_LINKER_GC ?= 0
|
|
||||||
LITTLE_ENDIAN ?= 0
|
LITTLE_ENDIAN ?= 0
|
||||||
|
|
||||||
ifneq ($(LITTLE_ENDIAN),0)
|
ifneq ($(LITTLE_ENDIAN),0)
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
# use linker garbage collection, if requested
|
# 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_COMPILEFLAGS += -ffunction-sections -fdata-sections
|
||||||
GLOBAL_LDFLAGS += --gc-sections
|
GLOBAL_LDFLAGS += --gc-sections
|
||||||
|
GLOBAL_DEFINES += LINKER_GC=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq (,$(EXTRA_BUILDRULES))
|
ifneq (,$(EXTRA_BUILDRULES))
|
||||||
|
|||||||
Reference in New Issue
Block a user