mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 11:34:13 +00:00
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++.
This commit is contained in:
parent
8ae2bf1e60
commit
8bb7a783a3
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user