Detecting Apple Silicon (vs. legacy Intel)

Chris Jones jonesc at
Fri Dec 31 17:36:29 UTC 2021


> On 31 Dec 2021, at 5:13 pm, Vincent Habchi <vince at> wrote:
> Folks,
> finally put my hands on my brand new MacBook Pro 14”! (Well, not really mine, rather my company’s, but let’s pretend…)
> I was wondering if there is a simple scheme to detect on which type of architecture MacPorts is running. My problem here is that clang on M1 does not honour the -march flag and exits with an error.

if {${os.arch} eq "arm"} {

> Thanks and early happy new year to all!
> Vincent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the macports-dev mailing list