From f6807dba6054e59c11fcd02da33273e2a6497c41 Mon Sep 17 00:00:00 2001 From: Tomas Hlavaty Date: Mon, 4 Apr 2016 22:16:21 +0200 Subject: [PATCH] sbcl: better thread support and arm detection --- pkgs/development/compilers/sbcl/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/sbcl/default.nix b/pkgs/development/compilers/sbcl/default.nix index b88c7f5c8e2c..946205011f2b 100644 --- a/pkgs/development/compilers/sbcl/default.nix +++ b/pkgs/development/compilers/sbcl/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, writeText, sbclBootstrap , sbclBootstrapHost ? "${sbclBootstrap}/bin/sbcl --disable-debugger --no-userinit --no-sysinit" +, threadSupport ? (stdenv.isi686 || stdenv.isx86_64) # Meant for sbcl used for creating binaries portable to non-NixOS via save-lisp-and-die. # Note that the created binaries still need `patchelf --set-interpreter ...` # to get rid of ${glibc} dependency. @@ -23,10 +24,11 @@ stdenv.mkDerivation rec { (pushnew x features)) (disable (x) (setf features (remove x features)))) - #-arm - (enable :sb-thread) - #+arm - (enable :arm))) " > customize-target-features.lisp + '' + + stdenv.lib.optionalString threadSupport "(enable :sb-thread)" + + stdenv.lib.optionalString stdenv.isArm "(enable :arm)" + + '' + )) " > customize-target-features.lisp pwd