Finding the machine CPU arch

vincent habchi vince at macports.org
Wed Mar 6 09:08:14 PST 2013


On 6 mars 2013, at 17:51, Clemens Lang <cal at macports.org> wrote:

>  switch -exact -- $::tcl_platform(machine) {
>      x86_64 -
>      i686 -
>      i586 {
>          return i386
>      }
>      {Power Macintosh} {
>          return powerpc
>      }
>  }
> 
> Apparently it might also contain i586, i686 depending on your system.
> You should handle this case, too.

Interesting. I’ve tried on a G4 MacMini, G5 MacPro, CoreDuo MacMini, Core2Duo MacBook and Corei2Duo MacMini and didn’t get i686 or i586. This result might pop up for non-Apple systems.

 I’ll probably stick to sysctl, since it seems a TCL courtesy function in MacPorts, if I understand the previous mail of Josh correctly.

V.



More information about the macports-dev mailing list