package/uClibc: ensure .config is writable
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 28 Jan 2014 20:11:24 +0000 (21:11 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 28 Jan 2014 21:56:40 +0000 (22:56 +0100)
If $(UCLIBC_CONFIG_FILE) is read-only (eg. because Buildroot's
source dir is), the sed fixups to .config fail.

Signed-off-by: Nathan Lynch <ntl@pobox.com>
[yann.morin.1998@free.fr: use $(INSTALL) instead of cp]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/uclibc/uclibc.mk

index 1978bbdfdbd1c61f8e8549f93df0756f41fb6237..7df9721c3512b5f6ea179e87ce1cc1c3f1e8ad73 100644 (file)
@@ -414,7 +414,7 @@ UCLIBC_MAKE_FLAGS = \
        HOSTCC="$(HOSTCC)"
 
 define UCLIBC_SETUP_DOT_CONFIG
-       cp -f $(UCLIBC_CONFIG_FILE) $(@D)/.config
+       $(INSTALL) -m 0644 $(UCLIBC_CONFIG_FILE) $(@D)/.config
        $(call UCLIBC_OPT_SET,CROSS_COMPILER_PREFIX,"$(TARGET_CROSS)",$(@D))
        $(call UCLIBC_OPT_SET,TARGET_$(UCLIBC_TARGET_ARCH),y,$(@D))
        $(call UCLIBC_OPT_SET,TARGET_ARCH,"$(UCLIBC_TARGET_ARCH)",$(@D))