mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 14:06:16 +02:00
Fix some BSD builds missing pthread functions
In addition to adding the missing thread deps in the last commit, we also appear to need to skip `-Wl,--as-needed` flags that Meson wants to use, but doesn't work with our *BSD toolchains. See https://github.com/mesonbuild/meson/issues/3593
This commit is contained in:
parent
d3cee8160c
commit
d39bbcabb9
1 changed files with 10 additions and 1 deletions
|
@ -61,6 +61,12 @@ let
|
||||||
workDir = null;
|
workDir = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Work around weird `--as-needed` linker behavior with BSD, see
|
||||||
|
# https://github.com/mesonbuild/meson/issues/3593
|
||||||
|
bsdNoLinkAsNeeded = finalAttrs: prevAttrs: lib.optionalAttrs stdenv.hostPlatform.isBSD {
|
||||||
|
mesonFlags = [ (lib.mesonBool "b_asneeded" false) ] ++ prevAttrs.mesonFlags or [];
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
scope: {
|
scope: {
|
||||||
inherit stdenv versionSuffix;
|
inherit stdenv versionSuffix;
|
||||||
|
@ -130,5 +136,8 @@ scope: {
|
||||||
|
|
||||||
inherit resolvePath filesetToSource;
|
inherit resolvePath filesetToSource;
|
||||||
|
|
||||||
mkMesonDerivation = f: stdenv.mkDerivation (lib.extends localSourceLayer f);
|
mkMesonDerivation = f: stdenv.mkDerivation
|
||||||
|
(lib.extends
|
||||||
|
(lib.composeExtensions bsdNoLinkAsNeeded localSourceLayer)
|
||||||
|
f);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue