mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-12 06:57:57 +04:00
Passing target flags through EXTRA_CFLAGS leaks them into kernel module builds on Linux 6.6 and 6.12, causing ARM hard-float ABI mismatches in generated module objects. Linux 6.18 also forwards these flags to host tools, where the host compiler rejects them. Reuse SAN_CFLAGS, normally used for sanitizer options, to pass target flags to both userspace selftests and their target libbpf builds on Linux 6.6, 6.12 and 6.18. Host tools and kernel modules do not consume this variable. USERCFLAGS would only cover the selftests, leaving their libbpf builds without the target flags. This covers the targets built by this package; CROSS_BPFTOOL does not consume SAN_CFLAGS. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org> Link: https://github.com/openwrt/openwrt/pull/25345 Signed-off-by: Robert Marko <robimarko@gmail.com>