From 5c3444c8e0a75fa867d2b31314115ee86385f4c9 Mon Sep 17 00:00:00 2001 From: jow Date: Fri, 27 Jun 2014 10:40:21 +0000 Subject: [PATCH] toolchain: only take last found libgcc* file The current $(wildcard ...) match might return multiple files which will break subsequent cp commands with an error like: cp: target `/home/user/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/root-ar71xx/tmp-libc/lib/libgcc_s_pic.a' is not a directory Prevent this issue by only taking the last path returned by globbing. Signed-off-by: Jo-Philipp Wich git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41357 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/libs/toolchain/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package/libs/toolchain/Makefile b/package/libs/toolchain/Makefile index 117447f581..e4a78ed5f2 100644 --- a/package/libs/toolchain/Makefile +++ b/package/libs/toolchain/Makefile @@ -289,9 +289,9 @@ define Build/Prepare mkdir -p $(PKG_BUILD_DIR) endef -LIBGCC_A=$(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc_pic.a) -LIBGCC_MAP=$(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc.map) -LIBGCC_SO=$(wildcard $(TOOLCHAIN_DIR)/lib/libgcc_s.so.*) +LIBGCC_A=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc_pic.a)) +LIBGCC_MAP=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/gcc/*/*/libgcc.map)) +LIBGCC_SO=$(lastword $(wildcard $(TOOLCHAIN_DIR)/lib/libgcc_s.so.*)) ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) ifneq ($(if $(CONFIG_USE_UCLIBC),$(CONFIG_GCC_VERSION_LINARO)),) BUILD_LIBGCC:=$(if $(CONFIG_avr32)$(CONFIG_m68k)$(CONFIG_powerpc),,$(PKG_BUILD_DIR)/libgcc_s.so.*) -- 2.11.0