aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
Diffstat (limited to 'target')
-rw-r--r--target/imagebuilder/Makefile4
-rw-r--r--target/sdk/Makefile4
-rw-r--r--target/toolchain/Makefile4
3 files changed, 6 insertions, 6 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)
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)
diff --git a/target/toolchain/Makefile b/target/toolchain/Makefile
index 0db18d1ac1..20f753a271 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)