tbuild: fix for non-standard uname - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit d9ada3e4f865ba649c09b3ce95bf409dff8c117e
(DIR) parent 9cf92718e9f2e82c7d1f2a896b5c93b01f1ad073
(HTM) Author: Richard Miller <millerresearch@gmail.com>
Date: Wed, 18 May 2011 13:21:40 -0400
build: fix for non-standard uname
The scratchbox-based SDK for maemo cross-compilation (for Nokia N800 and N900) has a non-standard uname command which doesn't support the '-p' option. This patch allows INSTALL to work anyway, by issuing 'uname -m' if 'uname -m -p' fails.
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/4554041
Diffstat:
M dist/buildmk | 2 +-
M src/mkhdr | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/dist/buildmk b/dist/buildmk
t@@ -2,7 +2,7 @@
# run this in the src directory
SYSNAME=`uname` export SYSNAME
-OBJTYPE=`uname -m -p | sed '
+OBJTYPE=`(uname -m -p 2>/dev/null || uname -m) | sed '
s;.*i[3-6]86.*;386;;
s;.*i86pc.*;386;;
s;.*amd64.*;x86_64;;
(DIR) diff --git a/src/mkhdr b/src/mkhdr
t@@ -1,6 +1,6 @@
# if you change this, also edit ../dist/buildmk
SYSNAME=`uname`
-OBJTYPE=`uname -m -p | sed '
+OBJTYPE=`(uname -m -p 2>/dev/null || uname -m) | sed '
s;.*i[3-6]86.*;386;;
s;.*i86pc.*;386;;
s;.*amd64.*;x86_64;;