I am writing a recipe for a package which needs to be aware of the underlying machine's microarchitecture. In other words, I would like a string such as aarch64
or arm64
for a 64-bit Arm system, and x86_64
for a 64-bit Intel system.
So far, I have identified:
MACHINE
- This seems to be whatever themeta-*
layer author decides to name their machine and may contain the architecture, it may not. For example,beaglebone
is no use.MACHINE_ARCH
- This seems to be close to what I'm looking for. However, taking this BSP layer as an example, and doing a quick search, it doesn't seem as though this variable is set anywhere. Only read from in a few packages.TUNE_PKGARCH
- May be the best bet so far. But, what format is this variable in? What architecture naming conventions are used? Also, the aforementioned BSP layer, again, doesn't seem to set this anywhere.
I would have thought that knowing the machine architecture in a well-defined format is important, but it doesn't seem to be so simple. Any advice?