From ea832b44b79fb06bac88679029773006fea15827 Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Tue, 9 Jan 2024 09:59:46 +0100 Subject: gnu: sbcl: Fix build on powerpc64. * gnu/packages/patches/sbcl-fix-ppc64-build.patch: New file. * gnu/local.mk: Register it. * gnu/packages/lisp.scm (sbcl)[source]: Use it. Change-Id: If81321bc7e4075ac7ec63f7b8d623011b4b975d5 --- gnu/packages/patches/sbcl-fix-ppc64-build.patch | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 gnu/packages/patches/sbcl-fix-ppc64-build.patch (limited to 'gnu/packages/patches') diff --git a/gnu/packages/patches/sbcl-fix-ppc64-build.patch b/gnu/packages/patches/sbcl-fix-ppc64-build.patch new file mode 100644 index 0000000000..a7d4d9a21e --- /dev/null +++ b/gnu/packages/patches/sbcl-fix-ppc64-build.patch @@ -0,0 +1,27 @@ +commit 255f3ead060129aa097b62f10d054cdc4997a431 +Author: Douglas Katzman +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, -- cgit v1.2.3 From f122f2bead538617d3bd43a05fa6f2def5e03c05 Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Wed, 10 Jan 2024 22:57:43 +0100 Subject: gnu: sbcl: Fix riscv build. * gnu/packages/patches/sbcl-fix-riscv-build.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/lisp.scm (sbcl)[source]: Use it. Change-Id: I63f1b9a7a7b6f3a1961d0a0cb31189b74a60abc3 --- gnu/local.mk | 3 ++- gnu/packages/lisp.scm | 6 ++++-- gnu/packages/patches/sbcl-fix-riscv-build.patch | 19 +++++++++++++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 gnu/packages/patches/sbcl-fix-riscv-build.patch (limited to 'gnu/packages/patches') diff --git a/gnu/local.mk b/gnu/local.mk index 453e3fb5c7..62066a30dc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -20,7 +20,7 @@ # Copyright © 2018, 2019, 2020, 2021, 2022 Oleg Pykhalov # Copyright © 2018 Stefan Stefanović # Copyright © 2018, 2020, 2021, 2022, 2023 Maxim Cournoyer -# Copyright © 2019, 2020, 2021, 2022 Guillaume Le Vaillant +# Copyright © 2019, 2020, 2021, 2022, 2044 Guillaume Le Vaillant # Copyright © 2019, 2020 John Soo # Copyright © 2019 Jonathan Brielmaier # Copyright © 2019 Evan Straw @@ -2004,6 +2004,7 @@ dist_patch_DATA = \ %D%/packages/patches/sbcl-clml-fix-types.patch \ %D%/packages/patches/sbcl-eazy-gnuplot-skip-path-check.patch \ %D%/packages/patches/sbcl-fix-ppc64-build.patch \ + %D%/packages/patches/sbcl-fix-riscv-build.patch \ %D%/packages/patches/sbcl-png-fix-sbcl-compatibility.patch \ %D%/packages/patches/scalapack-gcc-10-compilation.patch \ %D%/packages/patches/scheme48-tests.patch \ diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index aa7315a7ce..4f89779d8d 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -14,7 +14,7 @@ ;;; Copyright © 2018, 2019 Pierre Langlois ;;; Copyright © 2019, 2020 Katherine Cox-Buday ;;; Copyright © 2019 Jesse Gildersleve -;;; Copyright © 2019-2023 Guillaume Le Vaillant +;;; Copyright © 2019-2024 Guillaume Le Vaillant ;;; Copyright © 2020 Marius Bakke ;;; Copyright © 2020 Zhu Zihao ;;; Copyright © 2021, 2023 Sharlatan Hellseher @@ -447,7 +447,9 @@ an interpreter, a compiler, a debugger, and much more.") version "-source.tar.bz2")) (sha256 (base32 "0xhpdnsg8idzxkn20iw8gd2rk470d7vc22vrp5clq9fj117vgn43")) - (patches (search-patches "sbcl-fix-ppc64-build.patch")) + ;; TODO: Remove these patches when updating to sbcl > 2.4.0. + (patches (search-patches "sbcl-fix-ppc64-build.patch" + "sbcl-fix-riscv-build.patch")) (modules '((guix build utils))) (snippet '(begin diff --git a/gnu/packages/patches/sbcl-fix-riscv-build.patch b/gnu/packages/patches/sbcl-fix-riscv-build.patch new file mode 100644 index 0000000000..3e01ee6579 --- /dev/null +++ b/gnu/packages/patches/sbcl-fix-riscv-build.patch @@ -0,0 +1,19 @@ +commit b286d92af7468164c155c70d38213211b296fdfe +Author: Douglas Katzman +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))) -- cgit v1.2.3