From 679d037ea7673b747ea466aeb1026a9d56d90fad Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Wed, 24 Jul 2024 21:45:11 -0700 Subject: [PATCH] busybox: fix building with llvm --- pkgs/top-level/all-packages.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 965fa97f3885..71c00d25ba33 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -26534,7 +26534,12 @@ with pkgs; bridge-utils = callPackage ../os-specific/linux/bridge-utils { }; - busybox = callPackage ../os-specific/linux/busybox { }; + busybox = callPackage ../os-specific/linux/busybox { + # Fixes libunwind from being dynamically linked to a static binary. + stdenv = if (stdenv.targetPlatform.useLLVM or false) then + overrideCC stdenv buildPackages.llvmPackages.clangNoLibcxx + else stdenv; + }; busybox-sandbox-shell = callPackage ../os-specific/linux/busybox/sandbox-shell.nix { # musl roadmap has RISC-V support projected for 1.1.20 busybox = if !stdenv.hostPlatform.isRiscV && !stdenv.hostPlatform.isLoongArch64 && stdenv.hostPlatform.libc != "bionic"