summaryrefslogtreecommitdiffstats
path: root/target/toolchain
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-08-22 15:07:32 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-08-22 15:07:32 +0000
commit951215d74799ef2f4c28f70433008ae0b69822c1 (patch)
treeeacc43f6704efd9e58e431c20550917daed06867 /target/toolchain
parente56ca07f84b82dd706d3db24100f06d9d963939f (diff)
[target] derive system from hostcc to allow building inside a chroot
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33228 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/toolchain')
-rw-r--r--target/toolchain/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/toolchain/Makefile b/target/toolchain/Makefile
index 0db18d1ac..20f753a27 100644
--- a/target/toolchain/Makefile
+++ b/target/toolchain/Makefile
@@ -13,8 +13,8 @@ include $(INCLUDE_DIR)/host.mk
override MAKEFLAGS=
-PKG_OS:=$(shell uname -s)
-PKG_CPU:=$(shell uname -m)
+PKG_OS:=$(word 2,$(subst -, ,$(shell $(HOSTCC) -dumpmachine)))
+PKG_CPU:=$(word 1,$(subst -, ,$(shell $(HOSTCC) -dumpmachine)))
TOOLCHAIN_NAME:=OpenWrt-Toolchain-$(BOARD)-for-$(ARCH)$(ARCH_SUFFIX)-gcc-$(GCCV)$(DIR_SUFFIX)
TOOLCHAIN_BUILD_DIR:=$(BUILD_DIR)/$(TOOLCHAIN_NAME)