From 6d8539c1d8fd0578aa7a10d5e0bea07bc6d8a2d9 Mon Sep 17 00:00:00 2001 From: Nikola Knezevic Date: Wed, 20 Nov 2019 14:06:27 +0100 Subject: [PATCH] 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 {} 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. --- pkgs/development/interpreters/perl/default.nix | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/pkgs/development/interpreters/perl/default.nix b/pkgs/development/interpreters/perl/default.nix index 751b9667a1f..8f8b63a261e 100644 --- a/pkgs/development/interpreters/perl/default.nix +++ b/pkgs/development/interpreters/perl/default.nix @@ -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";