From 0c6d2eee3c9edd7d2d357c09e4dac7369e6afd2f Mon Sep 17 00:00:00 2001 From: John Ericson Date: Fri, 10 May 2024 13:41:47 -0400 Subject: [PATCH] llvmPackages.libcxx: Fix compiling for OpenBSD --- pkgs/development/compilers/llvm/18/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/llvm/18/default.nix b/pkgs/development/compilers/llvm/18/default.nix index 798702292d7a..afda053b53c6 100644 --- a/pkgs/development/compilers/llvm/18/default.nix +++ b/pkgs/development/compilers/llvm/18/default.nix @@ -396,7 +396,12 @@ in let # so: we use the clang from this LLVM package set instead of the regular # stdenv's compiler. libcxx = callPackage ../common/libcxx { - patches = lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [ + patches = [ + (fetchpatch { + url = "https://github.com/llvm/llvm-project/commit/1118c2e05e67a36ed8ca250524525cdb66a55256.patch"; + sha256 = "sha256-2lDO9UsglvYAxDG3/iTXqGVHn1Hq3O7wtkCUb9I/Buc="; + }) + ] ++ lib.optionals (stdenv.isDarwin && lib.versionOlder stdenv.hostPlatform.darwinMinVersion "10.13") [ # https://github.com/llvm/llvm-project/issues/64226 ./libcxx/0001-darwin-10.12-mbstate_t-fix.patch ];