aboutsummaryrefslogtreecommitdiffstats
path: root/target/imagebuilder/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'target/imagebuilder/Makefile')
-rw-r--r--target/imagebuilder/Makefile4
1 files changed, 2 insertions, 2 deletions
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)