[46483] trunk/dports/_resources/port1.0/group/muniversal-1.0.tcl

Joshua Root jmr at macports.org
Fri Feb 6 09:57:24 PST 2009


Toby Peterson wrote:
> On Thu, Feb 5, 2009 at 10:51 PM, Ryan Schmidt <ryandesign at macports.org> wrote:
>> On Feb 6, 2009, at 00:01, Marcus Calhoun-Lopez wrote:
>>
>>> Joshua Root <jmr at ...> writes:
>>>
>>>> There's the hw.cpu64bit_capable sysctl variable, on Leopard.
>>> Just what I was looking for.
>>> Thank you.
>>>
>>> I only have Leopard machines to test on, however.
>>> Does anyone know if the code:
>>> if { [exec "/usr/sbin/sysctl" "-n" "hw.cpu64bit_capable"] != "1" } {
>>> .
>>> .
>>> .
>>> }
>>> works on all platforms where universal binaries might be built?
>> Hmm. Well, on Tiger it says:
>>
>> /usr/sbin/sysctl -n hw.cpu64bit_capable
>> second level name cpu64bit_capable in hw.cpu64bit_capable is invalid
>>
>> So if you were to write code around that response, you would presumably
>> assume that 64-bit binaries cannot be built on Tiger, which isn't
>> necessarily so.
>>
>> Maybe there's a way we can ask about the processor family.
> 
> I think the easiest solution is to simply match the architectures of libSystem.

No good, it has ppc64 even on a G4.

- Josh


More information about the macports-dev mailing list