selftests/bpf: Add -fms-extensions to bpf build flags

The kernel is now built with -fms-extensions, therefore
generated vmlinux.h contains types like:
struct slab {
   ..
   struct freelist_counters;
};

Use -fms-extensions and -Wno-microsoft-anon-tag flags
to build bpf programs that #include "vmlinux.h"

Signed-off-by: Alexei Starovoitov <ast@kernel.org>
master^2
Alexei Starovoitov 2025-12-03 20:14:30 -08:00
parent 8f7aa3d3c7
commit 835a507535
1 changed files with 2 additions and 0 deletions

View File

@ -437,6 +437,8 @@ BPF_CFLAGS = -g -Wall -Werror -D__TARGET_ARCH_$(SRCARCH) $(MENDIAN) \
-I$(abspath $(OUTPUT)/../usr/include) \
-std=gnu11 \
-fno-strict-aliasing \
-Wno-microsoft-anon-tag \
-fms-extensions \
-Wno-compare-distinct-pointer-types \
-Wno-initializer-overrides \
#