[PATCH 1 of 9] crosstool-NG.sh: suppress failure message from uname -o

Titus von Boxberg titus@v9g.de
Mon May 17 12:34:00 GMT 2010


# HG changeset patch
# User Titus von Boxberg <titus@v9g.de>
# Date 1274085018 -7200
# Node ID 73ce2dbf95d6145f1878455846481e1b362a1caa
# Parent  48e107b35ba9c2b3f31667dd5042cc69bc472592
crosstool-NG.sh: suppress failure message from uname -o

On non-GNU systems (BSD/MacOS) there is no uname -o.
Suppress the failure message on these systems in the
call to set CT_SYS_OS (uname -s actually sets this variable).

diff -r 48e107b35ba9 -r 73ce2dbf95d6 scripts/crosstool-NG.sh.in
--- a/scripts/crosstool-NG.sh.in	Fri Apr 30 22:25:45 2010 +0200
+++ b/scripts/crosstool-NG.sh.in	Mon May 17 10:30:18 2010 +0200
@@ -195,7 +195,7 @@
CT_SYS_KERNEL=$(uname -s)
CT_SYS_REVISION=$(uname -r)
# uname -o is a GNU Extension. Others lack '-o' --> use System name for OS name.
-CT_SYS_OS=$(uname -o || uname -s)
+CT_SYS_OS=$(uname -o 2>/dev/null || uname -s)
CT_SYS_MACHINE=$(uname -m)
CT_SYS_PROCESSOR=$(uname -p)
CT_SYS_GCC=$(gcc -dumpversion)


--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list