diff options
author | Yann E. MORIN <yann.morin.1998@anciens.enib.fr> | 2010-11-27 21:50:42 +0100 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2010-11-27 22:29:02 +0100 |
commit | 499f4cf22d0078209a8ab22fc2b7c503865f7da4 (patch) | |
tree | cf5083f01a19a84c1de7546f4f711e9012719207 /toolchain/toolchain-crosstool-ng | |
parent | ee355233bb065e1b035c2942e01efb8c72325c8f (diff) | |
download | buildroot-novena-499f4cf22d0078209a8ab22fc2b7c503865f7da4.tar.gz buildroot-novena-499f4cf22d0078209a8ab22fc2b7c503865f7da4.zip |
toolchain/crosstool-NG: reorder sed expressions
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'toolchain/toolchain-crosstool-ng')
-rw-r--r-- | toolchain/toolchain-crosstool-ng/crosstool-ng.mk | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk index 9a9f2720e..4040dcdbd 100644 --- a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk +++ b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk @@ -85,6 +85,15 @@ $(STAMP_DIR)/ct-ng-toolchain-built: $(CTNG_DIR)/.config #----------------------------------------------------------------------------- # Configuring the toolchain +#-------------- +# We push BR options down to CT-NG, munging the default configuration +# with sed expressions. +# - first one for non-path options +# - second for path options (because they have no prompt, they +# always get set to the default value) +CTNG_FIX_DOT_CONFIG_SED := +CTNG_FIX_DOT_CONFIG_PATHS_SED := + # Note: a lot of the following tricks would become unneeded if one day # buildroot and crosstool-NG had matching options, especially for the # target description: arch name, bitness, endianness... @@ -151,8 +160,6 @@ endif # with BR2 config options. # Known missing: arch variant & options, floating point (HW/SW), uClibc/eglibc config... # - -CTNG_FIX_DOT_CONFIG_SED := CTNG_FIX_DOT_CONFIG_SED += s:^(CT_INSTALL_DIR_RO)=y:\# \1 is not set:; CTNG_FIX_DOT_CONFIG_SED += s:^(|\# )(CT_ARCH_[BL]E).*:\# \2 is not set:; CTNG_FIX_DOT_CONFIG_SED += s:^\# (CT_ARCH_$(CTNG_ENDIAN)) is not set:\1=y:; @@ -173,10 +180,12 @@ endif #-------------- # And the specials for paths -CTNG_FIX_DOT_CONFIG_PATHS_SED := CTNG_FIX_DOT_CONFIG_PATHS_SED += s:^(CT_PREFIX_DIR)=.*:\1="$(TOOLCHAIN_DIR)":; CTNG_FIX_DOT_CONFIG_PATHS_SED += s:^(CT_LOCAL_TARBALLS_DIR)=.*:\1="$(DL_DIR)":; CTNG_FIX_DOT_CONFIG_PATHS_SED += s:^(CT_SYSROOT_DIR_PREFIX)=.*:\1="":; + +#-------------- +# uClibc specific options ifeq ($(BR2_TOOLCHAIN_CTNG_uClibc),y) CTNG_FIX_DOT_CONFIG_PATHS_SED += s:^(CT_LIBC_UCLIBC_CONFIG_FILE)=.*:\1="$(CTNG_UCLIBC_CONFIG_FILE)":; endif @@ -230,9 +239,14 @@ endef # Depends on top-level .config because it has options we have to shoe-horn # into crosstool-NG's .config # Only copy the original .config file if we don't have one already +# We need to call oldconfig twice in a row to ensure the options +# are correctly set ( eg. if an option is new, then the initial sed +# can't do anything about it ) Ideally, this should go in oldconfig +# itself, but it's much easier to handle here. $(CTNG_DIR)/.config: $(CTNG_CONFIG_FILE) $(CTNG_DIR)/ct-ng $(CONFIG_DIR)/.config $(Q)[ -f $@ ] && cp -a $@ $@.timestamp || cp -f $< $@ $(call ctng-oldconfig,$@) + $(call ctng-oldconfig,$@) $(call ctng-check-config-changed,$@,$@.timestamp) $(Q)rm -f $@.timestamp |