Commit 05e41e5d authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜
Browse files

cerbero/meson: Use the correct cpu_family on arm64

Meson requires 64-bit ARM to be defined as 'aarch64', not 'arm64',
and the cpu_family for all ARM variants is 'arm'.
parent f2fccc0f
......@@ -23,7 +23,7 @@ import shutil
import shlex
import sysconfig
from cerbero.config import Platform, Architecture, Distro
from cerbero.enums import Platform, Architecture, Distro
from cerbero.utils import shell, to_unixpath, add_system_libs
from cerbero.utils import messages as m
......@@ -433,7 +433,7 @@ MESON_CROSS_FILE_TPL = \
system = '{system}'
cpu_family = '{cpu}'
cpu_family = '{cpu_family}'
cpu = '{cpu}'
endian = '{endian}'
......@@ -558,6 +558,14 @@ class Meson (Build, ModifyEnvBase) :
self.meson_options[opt_name] = \
def _get_cpu_family(self):
if Architecture.is_arm(self.config.target_arch):
if Architecture.is_arm32(self.config.target_arch):
return 'arm'
return 'aarch64'
return self.config.target_arch
def _write_meson_cross_file(self):
# Take cross toolchain from _old_env because we removed them from the
# env so meson doesn't detect them as the native toolchain.
......@@ -613,6 +621,7 @@ class Meson (Build, ModifyEnvBase) :
contents = MESON_CROSS_FILE_TPL.format(
# Assume all ARM sub-archs are in little endian mode
......@@ -45,6 +45,10 @@ class Architecture:
return arch in [Architecture.ARM, Architecture.ARMv7,
Architecture.ARMv7S, Architecture.ARM64]
def is_arm32(arch):
return arch in [Architecture.ARM, Architecture.ARMv7, Architecture.ARMv7S]
class Distro:
''' Enumeration of supported distributions '''
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment