tetragon: fix BPF compilation with clang 19

Add -Wno-default-const-init-var-unsafe flag to suppress errors about
uninitialized const variables in BPF code. This issue occurs with newer
versions of clang where BPF_CORE_READ macro expansion creates const
variables that trigger the default-const-init-var-unsafe warning.
This commit is contained in:
Ben Siraphob
2025-11-14 18:21:17 -05:00
parent 5eecbe3b20
commit 46b8d9f3b9
+1 -1
View File
@@ -37,7 +37,7 @@ stdenv.mkDerivation (finalAttrs: {
env = {
LOCAL_CLANG = 1;
LOCAL_CLANG_FORMAT = 1;
NIX_CFLAGS_COMPILE = "-fno-stack-protector -Qunused-arguments";
NIX_CFLAGS_COMPILE = "-fno-stack-protector -Qunused-arguments -Wno-default-const-init-var-unsafe";
};
buildPhase = ''