Commit 46b8d9f3 authored by Ben Siraphob's avatar Ben Siraphob
Browse files

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.
parent 5eecbe3b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 = ''