knot-dns, xdp-tools: fix cross compilation (#442827)

authored by Vladimír Čunát and committed by GitHub 862d555e f4b140d5

+5 -1
+2
pkgs/by-name/kn/knot-dns/package.nix
··· 64 64 # FIXME: sphinx is needed for now to get man-pages 65 65 nativeBuildInputs = [ 66 66 pkg-config 67 + protobufc # dnstap support 67 68 autoreconfHook 68 69 sphinx 69 70 ]; ··· 94 95 ++ lib.optional stdenv.hostPlatform.isDarwin zlib; # perhaps due to gnutls 95 96 96 97 enableParallelBuilding = true; 98 + strictDeps = true; 97 99 98 100 CFLAGS = [ 99 101 "-O2"
+3 -1
pkgs/by-name/xd/xdp-tools/package.nix
··· 1 1 { 2 2 lib, 3 3 stdenv, 4 + buildPackages, 4 5 fetchFromGitHub, 5 6 libbpf, 6 7 elfutils, ··· 42 43 ]; 43 44 nativeBuildInputs = [ 44 45 bpftools 45 - llvmPackages.clang 46 46 llvmPackages.llvm 47 47 pkg-config 48 48 m4 ··· 55 55 hardeningDisable = [ "zerocallusedregs" ]; 56 56 # When building BPF, the default CC wrapper is interfering a bit too much. 57 57 BPF_CFLAGS = "-fno-stack-protector -Wno-error=unused-command-line-argument"; 58 + # When cross compiling, configure prefers the unwrapped clang unless told otherwise. 59 + CLANG = lib.getExe buildPackages.llvmPackages.clang; 58 60 59 61 PRODUCTION = 1; 60 62 DYNAMIC_LIBXDP = 1;