diff options
author | Guillaume Le Vaillant <glv@posteo.net> | 2024-06-18 09:44:02 +0200 |
---|---|---|
committer | Guillaume Le Vaillant <glv@posteo.net> | 2024-06-18 09:44:02 +0200 |
commit | 2d5a7bfed5ccae6ce8adbef3ae1017d6ce8512be (patch) | |
tree | f9ad133c399fe9ad582c70e4483a32ce16efefd9 /gnu/packages/patches | |
parent | 569c213249186dd4173e952c008eec1af5d287cb (diff) | |
parent | 5abf9c0c6b9c3ac41c5203c7aa69d08f47924e04 (diff) |
Merge branch 'lisp-team'
Change-Id: Ia9a07fff02b01b3470f7abe28bc05a0fd8737416
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/sbcl-fast-generic-functions-fix-sbcl-2.4.patch | 99 | ||||
-rw-r--r-- | gnu/packages/patches/sbcl-fix-ppc64-build.patch | 27 | ||||
-rw-r--r-- | gnu/packages/patches/sbcl-fix-riscv-build.patch | 19 |
3 files changed, 99 insertions, 46 deletions
diff --git a/gnu/packages/patches/sbcl-fast-generic-functions-fix-sbcl-2.4.patch b/gnu/packages/patches/sbcl-fast-generic-functions-fix-sbcl-2.4.patch new file mode 100644 index 0000000000..d8b30f24a3 --- /dev/null +++ b/gnu/packages/patches/sbcl-fast-generic-functions-fix-sbcl-2.4.patch @@ -0,0 +1,99 @@ +From f8bfa4d8ce6b831058935c793e9d9180a46e4171 Mon Sep 17 00:00:00 2001 +From: ajberkley <ajberkley@gmail.com> +Date: Mon, 27 May 2024 14:21:22 -0700 +Subject: [PATCH 1/2] Fix to work with SBCL 2.4.0 and later + +--- + code/expand-effective-method-body.lisp | 54 +++++++++++++------------- + 1 file changed, 28 insertions(+), 26 deletions(-) + +diff --git a/code/expand-effective-method-body.lisp b/code/expand-effective-method-body.lisp +index c00c1b0..68c0b08 100644 +--- a/code/expand-effective-method-body.lisp ++++ b/code/expand-effective-method-body.lisp +@@ -2,35 +2,37 @@ + + (defun expand-effective-method-body + (effective-method generic-function lambda-list) +- (trivial-macroexpand-all:macroexpand-all +- `(let ((.gf. #',(generic-function-name generic-function))) +- (declare (ignorable .gf.)) +- #+sbcl(declare (sb-ext:disable-package-locks common-lisp:call-method)) +- #+sbcl(declare (sb-ext:disable-package-locks common-lisp:make-method)) +- #+sbcl(declare (sb-ext:disable-package-locks sb-pcl::check-applicable-keywords)) +- #+sbcl(declare (sb-ext:disable-package-locks sb-pcl::%no-primary-method)) +- (macrolet +- (;; SBCL introduces explicit keyword argument checking into +- ;; the effective method. Since we do our own checking, we +- ;; can safely disable it. However, we touch the relevant +- ;; variables to prevent unused variable warnings. +- #+sbcl +- (sb-pcl::check-applicable-keywords (&rest args) +- (declare (ignore args)) +- `(progn sb-pcl::.valid-keys. sb-pcl::.keyargs-start. (values))) +- ;; SBCL introduces a magic form to report when there are no +- ;; primary methods. The problem is that this form contains a +- ;; reference to the literal generic function, which is not an +- ;; externalizable object. Our solution is to replace it with +- ;; something portable. +- #+sbcl +- (sb-pcl::%no-primary-method (&rest args) +- (declare (ignore args)) +- `(apply #'no-primary-method .gf. ,@',(lambda-list-apply-arguments lambda-list)))) ++ (let ((%no-primary-method (find-symbol "%NO-PRIMARY-METHOD" :sb-pcl))) ++ (trivial-macroexpand-all:macroexpand-all ++ `(let ((.gf. #',(generic-function-name generic-function))) ++ (declare (ignorable .gf.)) ++ #+sbcl(declare (sb-ext:disable-package-locks common-lisp:call-method)) ++ #+sbcl(declare (sb-ext:disable-package-locks common-lisp:make-method)) ++ #+sbcl(declare (sb-ext:disable-package-locks sb-pcl::check-applicable-keywords)) ++ #+sbcl(declare (sb-ext:disable-package-locks ,%no-primary-method)) ++ (macrolet ++ (;; SBCL introduces explicit keyword argument checking into ++ ;; the effective method. Since we do our own checking, we ++ ;; can safely disable it. However, we touch the relevant ++ ;; variables to prevent unused variable warnings. ++ #+sbcl ++ (sb-pcl::check-applicable-keywords (&rest args) ++ (declare (ignore args)) ++ `(progn sb-pcl::.valid-keys. sb-pcl::.keyargs-start. (values))) ++ ;; SBCL introduces a magic form to report when there are no ++ ;; primary methods. The problem is that this form contains a ++ ;; reference to the literal generic function, which is not an ++ ;; externalizable object. Our solution is to replace it with ++ ;; something portable. ++ #+sbcl ++ ,(when %no-primary-method ++ `(,%no-primary-method (&rest args) ++ (declare (ignore args)) ++ `(apply #'no-primary-method .gf. ,@',(lambda-list-apply-arguments lambda-list))))) + ,(wrap-in-call-method-macrolet + effective-method + generic-function +- lambda-list))))) ++ lambda-list)))))) + + (defun wrap-in-call-method-macrolet (form generic-function lambda-list) + `(macrolet ((call-method (method &optional next-methods) + +From 01baf2bc9157762029de11ab64429999fa7a58da Mon Sep 17 00:00:00 2001 +From: ajberkley <ajberkley@gmail.com> +Date: Mon, 27 May 2024 14:37:58 -0700 +Subject: [PATCH 2/2] Fix for SBCL + +--- + code/sbcl.lisp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/code/sbcl.lisp b/code/sbcl.lisp +index 9e206a8..b97c00a 100644 +--- a/code/sbcl.lisp ++++ b/code/sbcl.lisp +@@ -13,6 +13,6 @@ + (prototypes static-call-signature-prototypes)) + static-call-signature + (eval +- `(sb-c:deftransform ,name ((&rest args) (,@types &rest *)) ++ `(sb-c:deftransform ,name ((&rest args) (,@types &rest t)) + (or (optimize-function-call #',name ',static-call-signature) + (sb-c::give-up-ir1-transform)))))))) diff --git a/gnu/packages/patches/sbcl-fix-ppc64-build.patch b/gnu/packages/patches/sbcl-fix-ppc64-build.patch deleted file mode 100644 index a7d4d9a21e..0000000000 --- a/gnu/packages/patches/sbcl-fix-ppc64-build.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit 255f3ead060129aa097b62f10d054cdc4997a431 -Author: Douglas Katzman <dougk@google.com> -Date: Mon Jan 1 23:59:50 2024 -0500 - - Fix ppc64 failure-to-build (from a few weeks ago) - - Git rev 7354472bb5 caused NIL to get a bogus widetag. - -diff --git a/make-target-2-load.lisp b/make-target-2-load.lisp -index 6571ec27d..daef942ea 100644 ---- a/make-target-2-load.lisp -+++ b/make-target-2-load.lisp -@@ -339,7 +339,13 @@ Please check that all strings which were not recognizable to the compiler - - - (do-all-symbols (symbol) -- (sb-kernel:logior-header-bits symbol sb-vm::+symbol-initial-core+) -+ ;; Don't futz with the header of static symbols. -+ ;; Technically LOGIOR-HEADER-BITS can only be used on an OTHER-POINTER-LOWTAG -+ ;; objects, so modifying NIL should not ever work, but it's especially wrong -+ ;; on ppc64 where OTHER- and LIST- pointer lowtags are 10 bytes apart instead -+ ;; of 8, so this was making a random alteration to the header. -+ (unless (eq (heap-allocated-p symbol) :static) -+ (sb-kernel:logior-header-bits symbol sb-vm::+symbol-initial-core+)) - - ;; A symbol whose INFO slot underwent any kind of manipulation - ;; such that it now has neither properties nor globaldb info, diff --git a/gnu/packages/patches/sbcl-fix-riscv-build.patch b/gnu/packages/patches/sbcl-fix-riscv-build.patch deleted file mode 100644 index 3e01ee6579..0000000000 --- a/gnu/packages/patches/sbcl-fix-riscv-build.patch +++ /dev/null @@ -1,19 +0,0 @@ -commit b286d92af7468164c155c70d38213211b296fdfe -Author: Douglas Katzman <dougk@google.com> -Date: Wed Jan 10 11:46:55 2024 -0500 - - Fix riscv build - -diff --git a/src/compiler/riscv/float.lisp b/src/compiler/riscv/float.lisp -index ce46d24ac..a16380293 100644 ---- a/src/compiler/riscv/float.lisp -+++ b/src/compiler/riscv/float.lisp -@@ -578,7 +578,7 @@ - (:results (res :scs (double-reg))) - (:arg-types signed-num) - (:result-types double-float) -- (:translate make-double-float) -+ (:translate %make-double-float) - (:policy :fast-safe) - (:generator 2 - (inst fmvx-> :double res bits))) |