Fix bpf-framework build failure with gcc-bpf

The -mkernel option was dropped in
da445a5858

We also need to ensure that the include paths are properly set for the
linux kernel headers.

Fixes: #31869
This commit is contained in:
Michael Biebl 2024-03-22 13:26:45 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent da867fa3c3
commit 1df021927f

View file

@ -1693,7 +1693,6 @@ if conf.get('BPF_FRAMEWORK') == 1
'-std=gnu11', '-std=gnu11',
'-fno-stack-protector', '-fno-stack-protector',
'-O2', '-O2',
'-mkernel=5.2',
'-mcpu=v3', '-mcpu=v3',
'-mco-re', '-mco-re',
'-gbtf', '-gbtf',
@ -1742,7 +1741,7 @@ if conf.get('BPF_FRAMEWORK') == 1
bpf_o_unstripped_cmd += ['-I.'] bpf_o_unstripped_cmd += ['-I.']
if not meson.is_cross_build() and bpf_compiler == 'clang' if not meson.is_cross_build()
target_triplet_cmd = run_command('gcc', '-dumpmachine', check: false) target_triplet_cmd = run_command('gcc', '-dumpmachine', check: false)
if target_triplet_cmd.returncode() == 0 if target_triplet_cmd.returncode() == 0
target_triplet = target_triplet_cmd.stdout().strip() target_triplet = target_triplet_cmd.stdout().strip()