Skip to content
Snippets Groups Projects
Commit 575afde0 authored by Simon McVittie's avatar Simon McVittie
Browse files

build-aux: Add convenience files to cross-compile for arm64


This is a useful way to check that non-x86 builds aren't regressing,
without actually needing a non-x86 device.

Not all tests will pass in this configuration because qemu-user
is not a perfect emulation of a real aarch64 machine (for example
PR_GET_CHILD_SUBREAPER is unimplemented), but it's better than nothing.
In particular, the adverb-preload and wrap-setup tests pass, and those
are the ones I'm altering for steamrt/tasks#595.

Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
parent 0f9b4eef
No related branches found
No related tags found
1 merge request!781Test coverage and refactoring in preparation for steamrt/tasks#595
......@@ -53,6 +53,8 @@ _build/
coverage/ Build for host system with coverage
doc/ Build for host system with gtk-doc and pandoc
host-no-asan/ No AddressSanitizer, for use with valgrind
arm64/ Build for host system for arm64, as an
example of a non-x86 platform
i386/ Build for host system for i386
"""
......@@ -298,6 +300,17 @@ class Environment:
] + args,
)
self.setup_one(
'arm64',
dev_build + [
'-Dintrospection=disabled',
'-Dmultiarch_tuple=aarch64-linux-gnu',
'--cross-file=build-aux/meson/arm64.txt',
] + args,
# Host system doesn't necessarily have an arm64 toolchain
check=False,
)
self.setup_one(
'i386',
asan_dev_build + [
......
# Copyright 2022-2025 Collabora Ltd.
# SPDX-License-Identifier: MIT
#
# Loosely based on the output of:
# /usr/share/meson/debcrossgen --arch arm64
[constants]
DEB_HOST_GNU_TYPE = 'aarch64-linux-gnu'
DEB_HOST_MULTIARCH = 'aarch64-linux-gnu'
[binaries]
c = DEB_HOST_GNU_TYPE + '-gcc'
cpp = DEB_HOST_GNU_TYPE + '-g++'
ar = DEB_HOST_GNU_TYPE + '-ar'
strip = DEB_HOST_GNU_TYPE + '-strip'
objcopy = DEB_HOST_GNU_TYPE + '-objcopy'
ld = DEB_HOST_GNU_TYPE + '-ld'
pkgconfig = DEB_HOST_GNU_TYPE + '-pkg-config'
pkg-config = DEB_HOST_GNU_TYPE + '-pkg-config'
cmake = 'cmake'
cups-config = 'cups-config'
sdl2-config = 'sdl2-config'
[built-in options]
libdir = 'lib' / DEB_HOST_MULTIARCH
[properties]
# This assumes that if we will run tests, we have qemu-static installed
needs_exe_wrapper = false
[cmake]
CMAKE_C_COMPILER = DEB_HOST_GNU_TYPE + '-gcc'
CMAKE_CXX_COMPILER = DEB_HOST_GNU_TYPE + '-g++'
CMAKE_SYSTEM_NAME = 'Linux'
CMAKE_SYSTEM_PROCESSOR = 'aarch64'
[host_machine]
system = 'linux'
cpu_family = 'aarch64'
cpu = 'arm64'
endian = 'little'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment