From aa8aadf18e8bc2cd45233b662fe83512a5e0bd5c Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Mon, 27 Jan 2020 15:07:39 +0900 Subject: [PATCH] Use "uname -s" where "uname -o" is not available Namely this changes HOSTOS for macOS from "Other" to "Darwin". Also, suppress the following harmless messages during a "make": (Missing redirect in tools/Makefile.host) uname: illegal option -- o usage: uname [-amnprsv] --- boards/sim/sim/sim/configs/cxxtest/Make.defs | 2 +- boards/sim/sim/sim/configs/nsh2/Make.defs | 2 +- boards/sim/sim/sim/scripts/Make.defs | 2 +- boards/x86/qemu/qemu-i486/scripts/Make.defs | 2 +- tools/Makefile.host | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) 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)