diff options
author | annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> | 2023-11-28 09:50:01 +0000 |
---|---|---|
committer | annalee <150648636+a-n-n-a-l-e-e@users.noreply.github.com> | 2023-11-28 14:36:42 +0000 |
commit | 8bb7a783a3be351f5be37d6f1b403b9826545a48 (patch) | |
tree | 0f8f31fa388b901226d1f059ed698b82d6a353a3 /pkgs/development/libraries/libserdes/default.nix | |
parent | 8ae2bf1e607cbdbb5cef93d9ebe8cbc55ff2bdd3 (diff) |
libserdes: link with libc++ libc++abi; fix build
when stdenv.cc.libcxx is non null update the libserdes++ libs from libstd++ to libc++ libc++abi. This fixes the link error on darwin. However, on x64 linux using stdenv = llvmPackages_16.libcxxStdenv on linux the build fails unless -std=c++11 or above is used. testing; built. the only program that depends on libserdes, kcat, links to the libserdes and not libserdes++.
Diffstat (limited to 'pkgs/development/libraries/libserdes/default.nix')
-rw-r--r-- | pkgs/development/libraries/libserdes/default.nix | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libserdes/default.nix b/pkgs/development/libraries/libserdes/default.nix index 8b61669d1c6dd..a3cec3788b581 100644 --- a/pkgs/development/libraries/libserdes/default.nix +++ b/pkgs/development/libraries/libserdes/default.nix @@ -39,6 +39,11 @@ stdenv.mkDerivation rec { postPatch = '' patchShebangs configure lds-gen.pl + '' + lib.optionalString (stdenv.cc.libcxx != null) '' + # fix for https://github.com/NixOS/nixpkgs/issues/166205 + # llvm12+ isn't adding libc++abi + substituteInPlace src-cpp/Makefile \ + --replace "LIBS += -lstdc++" "LIBS += -lc++ -l${stdenv.cc.libcxx.cxxabi.libName}" ''; # Has a configure script but it’s not Autoconf so steal some bits from multiple-outputs.sh: |