litecross: eliminate obstacles to toolchain config from make command line

the += approach which worked in config.mak does not work well if the
user wants to pass in configure options from the command line.
restructure configure command line construction such that setting
COMMON_CONFIG, GCC_CONFIG, or TOOLCHAIN_CONFIG from the command line
does not suppress necessary defaults.
This commit is contained in:
Rich Felker 2016-07-08 02:19:14 +00:00
parent b537e759ef
commit 99ee12d604
1 changed files with 13 additions and 10 deletions

View File

@ -5,9 +5,10 @@ BINUTILS_SRCDIR = BINUTILS_SRCDIR_not_set
GCC_SRCDIR = GCC_SRCDIR_not_set
MUSL_SRCDIR = MUSL_SRCDIR_not_set
COMMON_CONFIG = --enable-languages=c,c++
GCC_CONFIG = $(COMMON_CONFIG)
TOOLCHAIN_CONFIG = $(GCC_CONFIG)
GCC_CONFIG_FOR_TARGET =
COMMON_CONFIG =
GCC_CONFIG =
TOOLCHAIN_CONFIG =
XGCC_DIR = ../obj_toolchain/gcc
XGCC = $(XGCC_DIR)/xgcc -B $(XGCC_DIR)
@ -15,27 +16,27 @@ XGCC = $(XGCC_DIR)/xgcc -B $(XGCC_DIR)
-include config.mak
ifneq ($(findstring fdpic,$(TARGET)),)
GCC_CONFIG += --enable-fdpic
GCC_CONFIG_FOR_TARGET += --enable-fdpic
endif
ifneq ($(filter x86_64%x32,$(TARGET)),)
GCC_CONFIG += --with-abi=x32
GCC_CONFIG_FOR_TARGET += --with-abi=x32
endif
ifneq ($(findstring mips64,$(TARGET))$(findstring mipsisa64,$(TARGET)),)
ifneq ($(findstring n32,$(TARGET)),)
GCC_CONFIG += --with-abi=n32
GCC_CONFIG_FOR_TARGET += --with-abi=n32
else
GCC_CONFIG += --with-abi=64
GCC_CONFIG_FOR_TARGET += --with-abi=64
endif
endif
ifneq ($(filter %sf,$(TARGET)),)
GCC_CONFIG += --with-float=soft
GCC_CONFIG_FOR_TARGET += --with-float=soft
endif
ifneq ($(filter %hf,$(TARGET)),)
GCC_CONFIG += --with-float=hard
GCC_CONFIG_FOR_TARGET += --with-float=hard
endif
@ -43,7 +44,9 @@ MAKE += MULTILIB_OSDIRNAMES=
MAKE += INFO_DEPS= infodir=
MAKE += ac_cv_prog_lex_root=lex.yy.c
FULL_TOOLCHAIN_CONFIG = $(TOOLCHAIN_CONFIG) \
FULL_TOOLCHAIN_CONFIG = --enable-languages=c,c++ \
$(GCC_CONFIG_FOR_TARGET) \
$(COMMON_CONFIG) $(GCC_CONFIG) $(TOOLCHAIN_CONFIG) \
--disable-werror \
--target=$(TARGET) --prefix= \
--libdir=/lib --disable-multilib \