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]
This commit is contained in:
YAMAMOTO Takashi 2020-01-27 15:07:39 +09:00 committed by Alin Jerpelea
parent 431317ef26
commit aa8aadf18e
5 changed files with 5 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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)