summaryrefslogtreecommitdiff
path: root/target/imagebuilder
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2012-08-22 15:07:32 +0000
committerJohn Crispin <john@openwrt.org>2012-08-22 15:07:32 +0000
commit3686b8d279c4ef5840a2001695de234ecdb313d9 (patch)
tree72f7e75cbf838791db6ae8eaad565377df6b4148 /target/imagebuilder
parent2811d6c1839c7860c698c26e90f40d50c14d96a5 (diff)
downloadmtk-20170518-3686b8d279c4ef5840a2001695de234ecdb313d9.zip
mtk-20170518-3686b8d279c4ef5840a2001695de234ecdb313d9.tar.gz
mtk-20170518-3686b8d279c4ef5840a2001695de234ecdb313d9.tar.bz2
derive system from hostcc to allow building inside a chroot
SVN-Revision: 33228
Diffstat (limited to 'target/imagebuilder')
-rw-r--r--target/imagebuilder/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index 5d7b7ab..a9480ef 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -12,8 +12,8 @@ include $(INCLUDE_DIR)/version.mk
override MAKEFLAGS=
-PKG_OS:=$(shell uname -s)
-PKG_CPU:=$(shell uname -m | sed "s/ //g")
+PKG_OS:=$(word 2,$(subst -, ,$(shell $(HOSTCC) -dumpmachine)))
+PKG_CPU:=$(word 1,$(subst -, ,$(shell $(HOSTCC) -dumpmachine)))
IB_NAME:=OpenWrt-ImageBuilder-$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET))-for-$(PKG_OS)-$(PKG_CPU)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(IB_NAME)