perl: Enable threading on darwin
Perl on darwin (and any other sane platform) has a pretty good threading support, enable it. As it turns out, we were building non-multithreaded perl on all systems, since glibc was not part of the stdenv anymore: nix-repl> pkgs = import <nixpkgs> {} nix-repl> pkgs.stdenv ? glibc false meaning that the comments were incorrect. Thus, clear up the confusion and remove the misleading comments, while enabling multithreading by default. The builds will fail on unsupported platforms, and in this case the only place is the bootstrap, where we already force non-multithreaded perl. As a consequence of the above, this change will cause the full rebuild of stdenv on all platforms, including linux.
This commit is contained in:
parent
cd97c055a0
commit
6d8539c1d8
@ -1,21 +1,9 @@
|
||||
{ config, lib, stdenv, fetchurl, pkgs, buildPackages, callPackage
|
||||
, enableThreading ? stdenv ? glibc, coreutils, makeWrapper
|
||||
, enableThreading ? true, coreutils, makeWrapper
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
# We can only compile perl with threading on platforms where we have a
|
||||
# real glibc in the stdenv.
|
||||
#
|
||||
# Instead of silently building an unthreaded perl if this is not the
|
||||
# case, we force callers to disableThreading explicitly, therefore
|
||||
# documenting the platforms where the perl is not threaded.
|
||||
#
|
||||
# In the case of stdenv linux boot stage1 it's not possible to use
|
||||
# threading because of the simpleness of the bootstrap glibc, so we
|
||||
# use enableThreading = false there.
|
||||
assert enableThreading -> (stdenv ? glibc);
|
||||
|
||||
let
|
||||
|
||||
libc = if stdenv.cc.libc or null != null then stdenv.cc.libc else "/usr";
|
||||
|
Loading…
Reference in New Issue
Block a user