Finding the machine CPU arch
Joshua Root
jmr at macports.org
Wed Mar 6 07:03:20 PST 2013
On 2013-3-7 01:59 , Vincent Habchi wrote:
> Le 6 mars 2013 à 15:52, Joshua Root <jmr at macports.org> a écrit :
>
>> Well, build_arch tells you what kind of processor the user wants you to
>> build for. In general you can't assume that the CPU you're building on
>> is the one that you will run on.
>
> I agree; but I want to apply the ‘-march=native’ flag when ${build_arch} and the actual arch match, so as to provide more optimization.
You can probably find out with sysctl if you really need to. (It's a Tcl
proc wrapping sysctlbyname(3), no need to shell out.)
- Josh
More information about the macports-dev
mailing list