]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/bpf: Add -fms-extensions to bpf build flags
authorAlexei Starovoitov <ast@kernel.org>
Thu, 4 Dec 2025 04:14:30 +0000 (20:14 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 4 Dec 2025 04:20:11 +0000 (20:20 -0800)
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>
tools/testing/selftests/bpf/Makefile

index b7030a6e2e763b559bf81a44e94ffdd12b1d0272..4aa60e83ff191a9664c3e4c3d315e4310b0c3c0b 100644 (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                                 \
             #