From 727249a95d76a1ad089482b06a45f13938eac7e2 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 22 Aug 2012 15:07:32 +0000 Subject: [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 --- target/imagebuilder/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'target/imagebuilder') diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile index 5d7b7ab5ed..a9480ef848 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) -- cgit v1.2.3