Merge pull request #277383 from hraban/sbcl-2.4.0

sbcl: 2.3.11 -> 2.4.0
This commit is contained in:
7c6f434c 2024-01-07 11:11:52 +00:00 committed by GitHub
commit d862db7c86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 55 additions and 12 deletions

View file

@ -7,6 +7,7 @@
# to get rid of ${glibc} dependency.
, purgeNixReferences ? false
, coreCompression ? lib.versionAtLeast version "2.2.6"
, markRegionGC ? lib.versionAtLeast version "2.4.0"
, texinfo
, version
}:
@ -18,12 +19,12 @@ let
sha256 = "189gjqzdz10xh3ybiy4ch1r98bsmkcb4hpnrmggd4y2g5kqnyx4y";
};
"2.3.10" = {
sha256 = "sha256-NYAzMV0H5MWmyDjufyLPxNSelISOtx7BOJ1JS8Mt0qs=";
};
"2.3.11" = {
sha256 = "sha256-hL7rjXLIeJeEf8AoWtyz+k9IG9s5ECxPuat5aEGErSk=";
};
"2.4.0" = {
sha256 = "sha256-g9i3TwjSJUxZuXkLwfZp4JCZRXuIRyDs7L9F9LRtF3Y=";
};
};
# Collection of pre-built SBCL binaries for platforms that need them for
# bootstrapping. Ideally these are to be avoided. If CLISP (or any other
@ -80,8 +81,10 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ texinfo ];
buildInputs = lib.optionals coreCompression [ zstd ];
# There are no patches necessary for the currently enabled versions, but this
# code is left in place for the next potential patch.
patches = lib.optionals (version == "2.4.0") [
./fix-2.4.0-aarch64-darwin.patch
];
postPatch = ''
echo '"${version}.nixos"' > version.lisp-expr
@ -128,7 +131,8 @@ stdenv.mkDerivation rec {
optional threadSupport "sb-thread" ++
optional linkableRuntime "sb-linkable-runtime" ++
optional coreCompression "sb-core-compression" ++
optional stdenv.isAarch32 "arm";
optional stdenv.isAarch32 "arm" ++
optional markRegionGC "mark-region-gc";
disableFeatures = with lib;
optional (!threadSupport) "sb-thread" ++

View file

@ -0,0 +1,39 @@
From aed233638604b46c9a0c51e08d096d47303375ca Mon Sep 17 00:00:00 2001
From: Douglas Katzman <dougk@google.com>
Date: Tue, 2 Jan 2024 09:20:48 -0500
Subject: [PATCH] Fix multiple def error
reported by Hraban Luyat
---
src/runtime/gc-common.c | 1 +
src/runtime/gc.h | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/runtime/gc-common.c b/src/runtime/gc-common.c
index 51963b8ff..07536f628 100644
--- a/src/runtime/gc-common.c
+++ b/src/runtime/gc-common.c
@@ -2999,6 +2999,7 @@ void recompute_gen_bytes_allocated() {
#endif
#ifdef LISP_FEATURE_DARWIN_JIT
+_Atomic(char) *page_execp;
#include "sys_mmap.inc"
#include <errno.h>
/* darwin-jit has another reason to remap besides just zeroing, namely,
diff --git a/src/runtime/gc.h b/src/runtime/gc.h
index 804e6fce2..5fdc215c2 100644
--- a/src/runtime/gc.h
+++ b/src/runtime/gc.h
@@ -151,7 +151,7 @@ extern void prepare_pages(bool commit, page_index_t start, page_index_t end,
* squeeze a bit into the 'type' field of the page table, but it's clearer to
* have this externally so that page type 0 remains as "free" */
#ifdef LISP_FEATURE_DARWIN_JIT
-_Atomic(char) *page_execp;
+extern _Atomic(char) *page_execp;
static inline void set_page_executable(page_index_t i, bool val) { page_execp[i] = val; }
#endif
--
2.42.0

View file

@ -26046,17 +26046,17 @@ with pkgs;
};
# Steel Bank Common Lisp
sbcl_2_3_10 = wrapLisp {
pkg = callPackage ../development/compilers/sbcl/2.x.nix { version = "2.3.10"; };
faslExt = "fasl";
flags = [ "--dynamic-space-size" "3000" ];
};
sbcl_2_3_11 = wrapLisp {
pkg = callPackage ../development/compilers/sbcl/2.x.nix { version = "2.3.11"; };
faslExt = "fasl";
flags = [ "--dynamic-space-size" "3000" ];
};
sbcl = sbcl_2_3_11;
sbcl_2_4_0 = wrapLisp {
pkg = callPackage ../development/compilers/sbcl/2.x.nix { version = "2.4.0"; };
faslExt = "fasl";
flags = [ "--dynamic-space-size" "3000" ];
};
sbcl = sbcl_2_4_0;
sbclPackages = recurseIntoAttrs sbcl.pkgs;