<?xml version="1.0" encoding="UTF-8"?>        <rss version="2.0"
             xmlns:atom="http://www.w3.org/2005/Atom"
             xmlns:dc="http://purl.org/dc/elements/1.1/"
             xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
             xmlns:admin="http://webns.net/mvcb/"
             xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
             xmlns:content="http://purl.org/rss/1.0/modules/content/">
        <channel>
            <title>
									macOS - Determine CPU and Architecture in Terminal - Delphi, Lazarus, Free Pascal				            </title>
            <link>https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/macos-determine-cpu-and-architecture-in-terminal/</link>
            <description>Tweaking4All.com Discussion Board</description>
            <language>en-US</language>
            <lastBuildDate>Thu, 11 Jun 2026 22:33:48 +0000</lastBuildDate>
            <generator>wpForo</generator>
            <ttl>60</ttl>
							                    <item>
                        <title>macOS - Determine CPU and Architecture in Terminal</title>
                        <link>https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/macos-determine-cpu-and-architecture-in-terminal/#post-4702</link>
                        <pubDate>Thu, 16 Feb 2023 13:33:34 +0000</pubDate>
                        <description><![CDATA[What architecture is your Mac running?

Use “uname -m” (reports x86_64 on my Intel Mac Pro) or Arm (reports arm64 on an Apple M1).
// Intel Mac Pro
$ uname -m
x86_64

// Apple M1 Max...]]></description>
                        <content:encoded><![CDATA[<ul>
<li><strong>What <span style="color: #ff0000">architecture</span> is your Mac running?</strong></li>
</ul>
<p>Use “<span style="color: #0000ff"><strong>uname -m</strong></span>” (reports <strong>x86_64</strong> on my Intel Mac Pro) or Arm (reports <strong>arm64</strong> on an Apple M1).</p>
<pre contenteditable="false">// Intel Mac Pro
$ uname -m
x86_64

// Apple M1 Max
$ uname -m
arm64</pre>
<p><br />Alternative, even though the output is a little sloppy:</p>
<p>Use “<span style="color: #0000ff"><strong>arch</strong></span>” command is useful to determine Intel (reports <strong>i386</strong> on my Mac Pro) or Arm (reports <strong>arm64</strong> on M1).<br />(Note: This is the same output as “uname -p”.)</p>
<p>As you can see "i386" for a 64 bit Xeon CPU is a little sloppy, right?</p>
<pre contenteditable="false">// Intel Mac Pro
$ arch
i386

// Apple M1 Max
$ arch
arm64</pre>
<p> </p>
<p> </p>
<ul>
<li><strong>What <span style="color: #ff0000">processor</span> is your mac running?</strong></li>
</ul>
<p>Use "sysctl -n machdep.cpu.brand_string".</p>
<p>Examples (Intel Mac Pro and M1 Macbook Pro):</p>
<pre contenteditable="false">// Intel Mac Pro:

$ sysctl -n machdep.cpu.brand_string
Intel(R) Xeon(R) CPU E5-2697 v2 @ 2.70GHz

// Apple Macbook Pro M1 Max

$ sysctl -n machdep.cpu.brand_string
Apple M1 Max
</pre>
<p> </p>
<br />
<ul>
<li><strong>What architecture is your application <span style="color: #ff0000">compiled</span> for?</strong></li>
</ul>
<p>Or for the application binary itself you can use the (macOS) command line “<span style="color: #0000ff"><strong>file</strong></span>”.<br /><br />Example (I used “*” for all files in the directory, but you can also provide a filename of course):<br /><br /></p>
<pre contenteditable="false">$ file *
somebinary1: Mach-O 64-bit executable x86_64
somebinary2: Mach-O 64-bit executable arm64</pre>
<p><br />or when 2 architectures are combined in a fat binary (Intel and Arm in this example):<br /><br /></p>
<pre contenteditable="false">$ file Somebinary3
Somebinary3: Mach-O universal binary with 2 architectures:  
Somebinary3 (for architecture x86_64): Mach-O 64-bit executable x86_64
Somebinary3 (for architecture arm64): Mach-O 64-bit executable arm64</pre>
<p> </p>
<p> </p>]]></content:encoded>
						                            <category domain="https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/">Delphi, Lazarus, Free Pascal</category>                        <dc:creator>Hans</dc:creator>
                        <guid isPermaLink="true">https://www.tweaking4all.com/forum/delphi-lazarus-free-pascal/macos-determine-cpu-and-architecture-in-terminal/#post-4702</guid>
                    </item>
							        </channel>
        </rss>
		