summary refs log tree commit diff
diff options
context:
space:
mode:
authorRahul Butani <rrbutani@users.noreply.github.com>2023-02-14 00:53:03 -0600
committerArtturin <Artturin@artturin.com>2023-09-08 05:41:29 +0300
commit0251e2645a0e06a033a436b1064891de2881cb5c (patch)
treee833a5b698eca2b34df81a890b8c7a41a8e88be1
parent306de1a8226224a7129617732e3aeb7972b65961 (diff)
downloadnixpkgs-0251e2645a0e06a033a436b1064891de2881cb5c.tar
nixpkgs-0251e2645a0e06a033a436b1064891de2881cb5c.tar.gz
nixpkgs-0251e2645a0e06a033a436b1064891de2881cb5c.tar.bz2
nixpkgs-0251e2645a0e06a033a436b1064891de2881cb5c.tar.lz
nixpkgs-0251e2645a0e06a033a436b1064891de2881cb5c.tar.xz
nixpkgs-0251e2645a0e06a033a436b1064891de2881cb5c.tar.zst
nixpkgs-0251e2645a0e06a033a436b1064891de2881cb5c.zip
llvmPackages_15.libcxx: fix the generated linker script
See:
 - https://github.com/NixOS/nixpkgs/issues/214524#issuecomment-1429146432
 - https://github.com/llvm/llvm-project/commit/57c7bb3ec89565c68f858d316504668f9d214d59
 - https://reviews.llvm.org/D133566

We can drop this patch in `llvmPackages_16`.

Fixes #214524.
-rw-r--r--pkgs/development/compilers/llvm/15/libcxx/default.nix11
-rw-r--r--pkgs/test/default.nix1
2 files changed, 10 insertions, 2 deletions
diff --git a/pkgs/development/compilers/llvm/15/libcxx/default.nix b/pkgs/development/compilers/llvm/15/libcxx/default.nix
index cc4e9bc8305..ed5f48e8c38 100644
--- a/pkgs/development/compilers/llvm/15/libcxx/default.nix
+++ b/pkgs/development/compilers/llvm/15/libcxx/default.nix
@@ -1,5 +1,5 @@
 { lib, stdenv, llvm_meta
-, monorepoSrc, runCommand
+, monorepoSrc, runCommand, fetchpatch
 , cmake, ninja, python3, fixDarwinDylibNames, version
 , cxxabi ? if stdenv.hostPlatform.isFreeBSD then libcxxrt else libcxxabi
 , libcxxabi, libcxxrt, libunwind
@@ -47,6 +47,15 @@ stdenv.mkDerivation rec {
 
   patches = [
     ./gnu-install-dirs.patch
+    # See:
+    #   - https://reviews.llvm.org/D133566
+    #   - https://github.com/NixOS/nixpkgs/issues/214524#issuecomment-1429146432
+    # !!! Drop in LLVM 16+
+    (fetchpatch {
+      url = "https://github.com/llvm/llvm-project/commit/57c7bb3ec89565c68f858d316504668f9d214d59.patch";
+      hash = "sha256-AaM9A6tQ4YAw7uDqCIV4VaiUyLZv+unwcOqbakwW9/k=";
+      relative = "libcxx";
+    })
   ] ++ lib.optionals stdenv.hostPlatform.isMusl [
     ../../libcxx-0001-musl-hacks.patch
   ];
diff --git a/pkgs/test/default.nix b/pkgs/test/default.nix
index 8629bc472d6..b914ec26ae0 100644
--- a/pkgs/test/default.nix
+++ b/pkgs/test/default.nix
@@ -59,7 +59,6 @@ with pkgs;
 
             # libcxxStdenv broken
             # fix in https://github.com/NixOS/nixpkgs/pull/216273
-            (filter (n: n != "llvmPackages_15"))
           ] ++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
             # libcxx does not build for some reason on aarch64-linux
             (filter (n: n != "llvmPackages_7"))