Hi all, 

 

I just subscribed to this mail list and new in OpenWrt. 

 

I looked but did not found anything about that problem:

 

When I try to build toolchain with multi-target, I got errors about
parameters which are included by config.cache are different due to
modifying with new parameters (output is below). There is a command (rm
-f config.cache;) in makefiles to remove config.cache but it is not
enough, if there is another config.cache file in subfolders (for example
gcc directory has several config.cache file). So I change this command
like that : "find . -name config.cache | xargs rm -rf ;".  And It works
fine.

 

make[4]: Entering directory
`/home/erdem/Ubicom/openWRT/kamikaze_8.09/build_dir/toolchain-ubicom32_g
cc4.4.0/gcc-4.4.0-initial'

Configuring in build-i486-linux-gnu/libiberty

configure: loading cache ../config.cache

configure: error: `target_alias' has changed since the previous run:

configure:   former value:  `ubicom32-linux-uclibc'

configure:   current value: `ubicom32-elf'

configure: error: in
`/home/erdem/Ubicom/openWRT/kamikaze_8.09/build_dir/toolchain-ubicom32_g
cc4.4.0/gcc-4.4.0-initial/build-i486-linux-gnu/libiberty':

configure: error: changes in the environment can compromise the build

configure: error: run `make distclean' and/or `rm ../config.cache' and
start over

make[4]: *** [configure-build-libiberty] Error 1

 

(There are same command in other directories (glibc, eglibc and some
apps). If this patch is granted I will send patch for them too).

 

Signed-off-by: Erdem Ergen <eer...@ubicom.com>

 

diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile

index f1328a3..dfafba0 100644

--- a/toolchain/gcc/Makefile

+++ b/toolchain/gcc/Makefile

@@ -140,7 +140,7 @@ endef

 

 define Stage0/Configure

        mkdir -p $(HOST_BUILD_DIR0)

-       (cd $(HOST_BUILD_DIR0); rm -f config.cache; \

+       (cd $(HOST_BUILD_DIR0); find . -name config.cache | xargs rm -rf
;  \

                $(GCC_CONFIGURE_STAGE0) \

        );

 endef

@@ -156,7 +156,7 @@ endef

 

 define Stage1/Configure

        mkdir -p $(HOST_BUILD_DIR1)

-       (cd $(HOST_BUILD_DIR1); rm -f config.cache; \

+       (cd $(HOST_BUILD_DIR1); find . -name config.cache | xargs rm -rf
;  \

                $(GCC_CONFIGURE_STAGE1) \

        );

 endef

@@ -190,7 +190,7 @@ define Stage2/Configure

        rm -rf $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib

        ln -sf ../lib $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib

        $(if $(CONFIG_mips64)$(CONFIG_mips64el)$(CONFIG_x86_64),ln -sf
../lib64 $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME)/l

-       (cd $(HOST_BUILD_DIR2); rm -f config.cache; \

+       (cd $(HOST_BUILD_DIR2); find . -name config.cache | xargs rm -rf
;  \

                $(GCC_CONFIGURE_STAGE2) \

        );

 endef

 

Erdem.

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to