diff --git a/boards/sim/sim/sim/configs/cxxtest/Make.defs b/boards/sim/sim/sim/configs/cxxtest/Make.defs index 7146e1ad71..ef5fcad607 100644 --- a/boards/sim/sim/sim/configs/cxxtest/Make.defs +++ b/boards/sim/sim/sim/configs/cxxtest/Make.defs @@ -36,7 +36,7 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk -HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} +HOSTOS = ${shell uname -o 2>/dev/null || uname -s 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g diff --git a/boards/sim/sim/sim/configs/nsh2/Make.defs b/boards/sim/sim/sim/configs/nsh2/Make.defs index e329be3f6d..1fefa4daeb 100644 --- a/boards/sim/sim/sim/configs/nsh2/Make.defs +++ b/boards/sim/sim/sim/configs/nsh2/Make.defs @@ -36,7 +36,7 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk -HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} +HOSTOS = ${shell uname -o 2>/dev/null || uname -s 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g diff --git a/boards/sim/sim/sim/scripts/Make.defs b/boards/sim/sim/sim/scripts/Make.defs index 94d53bb872..45583504a2 100644 --- a/boards/sim/sim/sim/scripts/Make.defs +++ b/boards/sim/sim/sim/scripts/Make.defs @@ -37,7 +37,7 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk -HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} +HOSTOS = ${shell uname -o 2>/dev/null || uname -s 2>/dev/null || echo "Other"} ifeq ($(CONFIG_WINDOWS_MSYS),y) DIRLINK = $(TOPDIR)/tools/copydir.sh diff --git a/boards/x86/qemu/qemu-i486/scripts/Make.defs b/boards/x86/qemu/qemu-i486/scripts/Make.defs index e153be8967..df4c8799b7 100644 --- a/boards/x86/qemu/qemu-i486/scripts/Make.defs +++ b/boards/x86/qemu/qemu-i486/scripts/Make.defs @@ -36,7 +36,7 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk -HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} +HOSTOS = ${shell uname -o 2>/dev/null || uname -s 2>/dev/null || echo "Other"} ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = -g diff --git a/tools/Makefile.host b/tools/Makefile.host index 07ebe9ea3b..71e87e59c6 100644 --- a/tools/Makefile.host +++ b/tools/Makefile.host @@ -43,7 +43,7 @@ include ${TOPDIR}/tools/Config.mk # Define HOSTCC on the make command line if it differs from these defaults # Define HOSTCFLAGS with -g on the make command line to build debug versions -HOSTOS = ${shell uname -o || echo "Other"} +HOSTOS = ${shell uname -o 2>/dev/null || uname -s 2>/dev/null || echo "Other"} ifeq ($(HOSTOS),MinGW)