9 May 2013 02:08
Re: Patch that allows for building OpenBIOS on Mac OS X!
>>> archname()
>>> {
>>> - HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \
>>> - -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \
>>> - -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \
>>> - -e "s/Power Macintosh/ppc/"`
>>> + OS_NAME=`uname`
>>> + if test "$OS_NAME" = "Darwin"; then # Can't depend on uname
>>> -m on Mac OS X
>>> + IS_64BIT=`sysctl hw.cpu64bit_capable`
>>> + if test "$IS_64BIT" = "hw.cpu64bit_capable: 1"; then
>>> + HOSTARCH="amd64"
>>> + else
>>> + HOSTARCH="x86"
>>> + fi
>>> + else
>>> + HOSTARCH=`uname -m | sed -e s/i.86/x86/ -e s/i86pc/x86/ \
>>> + -e s/sun4u/sparc64/ -e s/sparc$/sparc32/ \
>>> + -e s/arm.*/arm/ -e s/sa110/arm/ -e s/x86_64/amd64/ \
>>> + -e "s/Power Macintosh/ppc/"`
>>> + fi
>>> }
>>
>> This is wrong. "uname" does not tell you the machine architecture;
>> "uname -m" does, at least on my PowerPC Macs. Also:
>
> Who said I was trying to obtain the machine architecture?
That is what this function does.
(Continue reading)
RSS Feed