summaryrefslogtreecommitdiff
path: root/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@anciens.enib.fr>2010-11-27 21:50:45 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2010-11-27 22:29:02 +0100
commit72568d543b011be16f4bc68a06382f366ed46fd0 (patch)
tree341eb7e8ea71acdc989efdc28b16f15dd4c8dd37 /toolchain/toolchain-crosstool-ng/crosstool-ng.mk
parent8749f92188d29995c2094ee05a2f812c5fef1b25 (diff)
toolchain/crosstool-NG: add C library config munging
For some C libraries, it can be necessary to push the BR settings down to the libc configuration file. Prepare the infrastructure. (Note: it will apply only to uClibc for now, and although eglibc can also be configured, it is not currently supported) 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/crosstool-ng.mk')
-rw-r--r--toolchain/toolchain-crosstool-ng/crosstool-ng.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
index 48116af87..25e12d2db 100644
--- a/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
+++ b/toolchain/toolchain-crosstool-ng/crosstool-ng.mk
@@ -93,8 +93,10 @@ $(STAMP_DIR)/ct-ng-toolchain-built: $(CTNG_DIR)/.config
# - first one for non-path options
# - second for path options (because they have no prompt, they
# always get set to the default value)
+# - third for C library .config (if it has one, eg. uClibc)
CTNG_FIX_DOT_CONFIG_SED :=
CTNG_FIX_DOT_CONFIG_PATHS_SED :=
+CTNG_FIX_DOT_CONFIG_LIBC_SED :=
#--------------
# A few generic functions
@@ -228,8 +230,12 @@ CTNG_FIX_DOT_CONFIG_PATHS_SED += s:^(CT_LIBC_UCLIBC_CONFIG_FILE)=.*:\1="$(CTNG_D
$(STAMP_DIR)/ct-ng-toolchain-built: $(CTNG_DIR)/libc.config
# And here is how we get this uClibc's .config
-$(CTNG_DIR)/libc.config: $(CTNG_UCLIBC_CONFIG_FILE)
+$(CTNG_DIR)/libc.config: $(CTNG_UCLIBC_CONFIG_FILE) $(CONFIG_DIR)/.config
+ -$(Q)cp -a $@ $@.timestamp
$(Q)cp -f $< $@
+ $(call ctng-fix-dot-config,$@,$(CTNG_FIX_DOT_CONFIG_LIBC_SED))
+ $(call ctng-check-config-changed,$@,$@.timestamp)
+ $(Q)rm -f $@.timestamp
endif # LIBC is uClibc