<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.yoctoproject.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Meson%2FUnknownCPU</id>
	<title>Meson/UnknownCPU - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.yoctoproject.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Meson%2FUnknownCPU"/>
	<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Meson/UnknownCPU&amp;action=history"/>
	<updated>2026-04-23T23:48:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://wiki.yoctoproject.org/wiki/index.php?title=Meson/UnknownCPU&amp;diff=40082&amp;oldid=prev</id>
		<title>RossBurton: Created page with &quot;= Unknown CPU Family  =  == The Problem ==  OpenEmbedded uses the &lt;tt&gt;machine&lt;/tt&gt; fragment of the GCC target triplet to identify the target architecture, but Meson uses the v...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.yoctoproject.org/wiki/index.php?title=Meson/UnknownCPU&amp;diff=40082&amp;oldid=prev"/>
		<updated>2018-07-06T13:34:03Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;= Unknown CPU Family  =  == The Problem ==  OpenEmbedded uses the &amp;lt;tt&amp;gt;machine&amp;lt;/tt&amp;gt; fragment of the GCC target triplet to identify the target architecture, but Meson uses the v...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Unknown CPU Family  =&lt;br /&gt;
&lt;br /&gt;
== The Problem ==&lt;br /&gt;
&lt;br /&gt;
OpenEmbedded uses the &amp;lt;tt&amp;gt;machine&amp;lt;/tt&amp;gt; fragment of the GCC target triplet to identify the target architecture, but Meson uses the values returned by Python&amp;#039;s &amp;lt;tt&amp;gt;platform.machine()&amp;lt;/tt&amp;gt; which is based on the &amp;lt;tt&amp;gt;uname&amp;lt;/tt&amp;gt; values.  These don&amp;#039;t match, so when cross-compiling we need to map the name when writing the Meson cross file.  Also OpenEmbedded patches Meson to make an unknown architecture a fatal error instead of just a warning as during the build the warning won&amp;#039;t be visible and bad CPU family setting can produce incorrect builds.&lt;br /&gt;
&lt;br /&gt;
The known CPU families in Meson are listed at http://mesonbuild.com/Reference-tables.html#cpu-families.&lt;br /&gt;
&lt;br /&gt;
When this mapping table isn&amp;#039;t complete (for example, passing mipsel instead of mips) or the list in Meson needs updating (for example, new architecture) you&amp;#039;ll get an error from Meson:&lt;br /&gt;
&lt;br /&gt;
 Unknown CPU family mipsel, see https://wiki.yoctoproject.org/wiki/Meson/UnknownCPU for directions&lt;br /&gt;
&lt;br /&gt;
== What To Do ==&lt;br /&gt;
&lt;br /&gt;
In this situation you need to know two values: the OpenEmbedded architecture name (&amp;lt;tt&amp;gt;${TARGET_ARCH}&amp;lt;/tt&amp;gt;) and the Python platform name.  The platform name can be obtained in either a virtual machine or on real hardware:&lt;br /&gt;
&lt;br /&gt;
 $ python3 -c &amp;#039;import platform; print(platform.machine())&amp;#039;&lt;br /&gt;
 x86_64&lt;br /&gt;
&lt;br /&gt;
As a worked example, consider the little-endian MIPS case.  The &amp;lt;tt&amp;gt;TARGET_ARCH&amp;lt;/tt&amp;gt; for a MIPS machine in little-endian mode is &amp;lt;tt&amp;gt;mipsel&amp;lt;/tt&amp;gt; but Meson doesn&amp;#039;t consider endian changes different CPU families so they&amp;#039;re both &amp;lt;tt&amp;gt;mips&amp;lt;/tt&amp;gt;.  This is already in the [http://mesonbuild.com/Reference-tables.html#cpu-families CPU Family table] so all that needs to happen is another case added to &amp;lt;tt&amp;gt;meson_cpu_family()&amp;lt;/tt&amp;gt; in &amp;lt;tt&amp;gt;meson.bbclass&amp;lt;/tt&amp;gt;.  Please [https://bugzilla.yoctoproject.org file a bug] with this information, or ideally write a patch.&lt;br /&gt;
&lt;br /&gt;
However if the problem is that you&amp;#039;re working on an architecture that isn&amp;#039;t in Meson&amp;#039;s CPU Family list, then first please [https://github.com/mesonbuild/meson/issues submit a bug to Meson] to get the canonical platform name added, and then an OpenEmbedded bug if a mapping is required.&lt;/div&gt;</summary>
		<author><name>RossBurton</name></author>
	</entry>
</feed>