summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-07-02 17:50:57 +0200
committerLuca Boccassi <luca.boccassi@gmail.com>2024-07-03 01:16:35 +0200
commit48d6dad100d0b42c02aa21d897e913461f6b3cc3 (patch)
treed82cba71a5f1902309b045d429bdb8270cc5a892 /meson.build
parentcoredump: correctly take tmpfs size into account for compression (diff)
downloadsystemd-48d6dad100d0b42c02aa21d897e913461f6b3cc3.tar.xz
systemd-48d6dad100d0b42c02aa21d897e913461f6b3cc3.zip
meson: Define __TARGET_ARCH macros required by bpf
These are required by the bpf_tracing.h header in libbpf, see https://github.com/libbpf/libbpf/blob/master/src/bpf_tracing.h. bpf_tracing.h does have a few fallbacks in case __TARGET_ARCH_XXX is not defined but recommends using the __TARGET_ARCH macros instead so let's do that.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build14
1 files changed, 7 insertions, 7 deletions
diff --git a/meson.build b/meson.build
index 8db73ec996..15bb11ecd4 100644
--- a/meson.build
+++ b/meson.build
@@ -1762,15 +1762,15 @@ if conf.get('BPF_FRAMEWORK') == 1
# C.f. https://mesonbuild.com/Reference-tables.html#cpu-families
# and src/basic/missing_syscall_def.h.
cpu_arch_defines = {
- 'ppc' : ['-D__powerpc__'],
- 'ppc64' : ['-D__powerpc64__', '-D_CALL_ELF=2'],
- 'riscv32' : ['-D__riscv', '-D__riscv_xlen=32'],
- 'riscv64' : ['-D__riscv', '-D__riscv_xlen=64'],
- 'x86' : ['-D__i386__'],
- 's390x' : ['-D__s390__', '-D__s390x__'],
+ 'ppc' : ['-D__powerpc__', '-D__TARGET_ARCH_powerpc'],
+ 'ppc64' : ['-D__powerpc64__', '-D__TARGET_ARCH_powerpc', '-D_CALL_ELF=2'],
+ 'riscv32' : ['-D__riscv', '-D__riscv_xlen=32', '-D__TARGET_ARCH_riscv'],
+ 'riscv64' : ['-D__riscv', '-D__riscv_xlen=64', '-D__TARGET_ARCH_riscv'],
+ 'x86' : ['-D__i386__', '-D__TARGET_ARCH_x86'],
+ 's390x' : ['-D__s390__', '-D__s390x__', '-D__TARGET_ARCH_s390'],
# For arm, assume hardware fp is available.
- 'arm' : ['-D__arm__', '-D__ARM_PCS_VFP'],
+ 'arm' : ['-D__arm__', '-D__ARM_PCS_VFP', '-D__TARGET_ARCH_arm'],
}
bpf_arch_flags = cpu_arch_defines.get(host_machine.cpu_family(),