Detecting Apple Silicon (vs. legacy Intel)

Chris Jones jonesc at hep.phy.cam.ac.uk
Fri Dec 31 17:36:29 UTC 2021


I

> On 31 Dec 2021, at 5:13 pm, Vincent Habchi <vince at macports.org> 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: <http://lists.macports.org/pipermail/macports-dev/attachments/20211231/c3456104/attachment.htm>


More information about the macports-dev mailing list