Merge pull request #270605 from a-n-n-a-l-e-e/libserdes-c++-abi

libserdes: link with libc++ libc++abi; fix darwin build
This commit is contained in:
Emily Trau 2023-12-01 14:20:57 +11:00 committed by GitHub
commit 7762e14532
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 its not Autoconf so steal some bits from multiple-outputs.sh: