Just a quickie (to prevent my blog from becoming a dinosaur and eventually fossil fuel…)
If you’re running bash on an Intel Mac you might see some interesting behavior if you inspect the shell’s variables:
[jwight@ratatosk] jwight$ set | grep TYPE HOSTTYPE=powerpc MACHTYPE=powerpc-apple-darwin8.0 OSTYPE=darwin8.0
PowerPC? Darwin 8.0? On my Quad G5 I get identical results. Checking the bash binary with the ’strings’ command seems to show these values are hardcoded:
[jwight@ratatosk] jwight$ strings `which bash` | grep powerpc powerpc-apple-darwin8.0 powerpc
Looks like the OS version and the processor type is hardcoded into bash.
Oh and for the record this is what ‘uname’ reports:
[jwight@ratatosk] jwight$ uname -a Darwin ratatosk 8.6.1 Darwin Kernel Version 8.6.1: Tue Mar 7 16:55:45 PST 2006; root:xnu-792.9.22.obj~1/RELEASE_I386 i386 i386
Add New Comment
Viewing 5 Comments
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
$ uname -a
Darwin delices 8.8.1 Darwin Kernel Version 8.8.1: Mon Sep 25 19:42:00 PDT 2006; root:xnu-792.13.8.obj~1/RELEASE_I386 i386 i386
$ set | grep -i type
HOSTTYPE=powerpc
MACHTYPE=powerpc-apple-darwin8.0
OSTYPE=darwin8.0
I'm more annoyed by the i386 kernel, personally.
Do you already have an account? Log in and claim this comment.
Do you already have an account? Log in and claim this comment.
$uname -a
Darwin Computer.local 8.9.1 Darwin Kernel Version 8.9.1: Thu Feb 22 20:55:00 PST 2007; root:xnu-792.18.15~1/RELEASE_I386 i386 i386
$set | grep -i type
HOSTTYPE=powerpc
MACHTYPE=powerpc-apple-darwin8.0
OSTYPE=darwin8.0
Do you already have an account? Log in and claim this comment.
uname -a
Darwin computer.local 8.9.2 Darwin Kernel Version 8.9.2: Thu Feb 22 18:08:23 PST 2007; root:xnu-792.19.2~1/RELEASE_I386 i386 i386
machine
i486
set | grep TYPE
HOSTTYPE=powerpc
MACHTYPE=powerpc-apple-darwin8.0
OSTYPE=darwin8.0
So nowhere is there any mention of x86-64. that really throws a spanner in the works for porting 64b apps.
Add New Comment