libtapi: update for cross-compilation

In b060076e21 ("cc-wrapper: broaden explicit libc++abi linking for
LLVM stdenv"), all packages started to be linked with -lc++abi. When
cross compiling, the libcxxabi path seemingly needs to be passed to the
the libtapi derivation; it won't pick it up on its own (perhaps because
of the bootstrapping?).
This commit is contained in:
Noah Fontes 2022-09-07 22:17:29 -07:00
parent 24d0035612
commit b4dc06bc9e
No known key found for this signature in database
GPG key ID: 85B8C0A0B15FF53F

View file

@ -40,12 +40,15 @@ stdenv.mkDerivation {
let let
nativeCC = pkgsBuildBuild.stdenv.cc; nativeCC = pkgsBuildBuild.stdenv.cc;
nativeBintools = nativeCC.bintools.bintools; nativeBintools = nativeCC.bintools.bintools;
nativeLibcxxabi = lib.getLib pkgsBuildBuild.libcxxabi;
nativeToolchainFlags = [ nativeToolchainFlags = [
"-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc" "-DCMAKE_C_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}cc"
"-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++" "-DCMAKE_CXX_COMPILER=${nativeCC}/bin/${nativeCC.targetPrefix}c++"
"-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar" "-DCMAKE_AR=${nativeBintools}/bin/${nativeBintools.targetPrefix}ar"
"-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip" "-DCMAKE_STRIP=${nativeBintools}/bin/${nativeBintools.targetPrefix}strip"
"-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib" "-DCMAKE_RANLIB=${nativeBintools}/bin/${nativeBintools.targetPrefix}ranlib"
"-DCMAKE_EXE_LINKER_FLAGS=-L${nativeLibcxxabi}/lib"
"-DCMAKE_SHARED_LINKER_FLAGS=-L${nativeLibcxxabi}/lib"
]; ];
in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list=${lib.concatStringsSep ";" nativeToolchainFlags}" in "-DCROSS_TOOLCHAIN_FLAGS_NATIVE:list=${lib.concatStringsSep ";" nativeToolchainFlags}"
) )