From 99ee12d604e564fa5b403c942e2809881d34d114 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 8 Jul 2016 02:19:14 +0000 Subject: [PATCH] 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. --- litecross/Makefile | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/litecross/Makefile b/litecross/Makefile index 06621f0..56c57b9 100644 --- a/litecross/Makefile +++ b/litecross/Makefile @@ -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 \