aboutsummaryrefslogtreecommitdiffstats
path: root/target/sdk
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2012-08-22 15:07:32 +0000
committerJohn Crispin <blogic@openwrt.org>2012-08-22 15:07:32 +0000
commit727249a95d76a1ad089482b06a45f13938eac7e2 (patch)
treeeacc43f6704efd9e58e431c20550917daed06867 /target/sdk
parent4a272ceaeaddca3211ea3c309c092413c5a35ad2 (diff)
downloadupstream-727249a95d76a1ad089482b06a45f13938eac7e2.tar.gz
upstream-727249a95d76a1ad089482b06a45f13938eac7e2.tar.bz2
upstream-727249a95d76a1ad089482b06a45f13938eac7e2.zip
[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/sdk')
-rw-r--r--target/sdk/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/sdk/Makefile b/target/sdk/Makefile
index 99177984e2..51bf47b420 100644
--- a/target/sdk/Makefile
+++ b/target/sdk/Makefile
@@ -11,8 +11,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)))
SDK_NAME:=OpenWrt-SDK-$(BOARD)-for-$(PKG_OS)-$(PKG_CPU)-gcc-$(GCCV)_$(LIBC)-$(LIBCV)
SDK_BUILD_DIR:=$(BUILD_DIR)/$(SDK_NAME)