From c548efb85c9b0b14a47b42947ec1bde0e616181d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89rico=20Rolim?= Date: Tue, 29 Sep 2020 17:27:58 -0300 Subject: [PATCH] sbcl: build with ecl on musl. The patches were taken from Alpine Linux. --- srcpkgs/sbcl/patches/fix-arm-build-ecl.patch | 36 +++++++++++++++++++ .../only-use-memcpy-version-on-glibc.patch | 27 ++++++++++++++ srcpkgs/sbcl/template | 4 +-- 3 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/sbcl/patches/fix-arm-build-ecl.patch create mode 100644 srcpkgs/sbcl/patches/only-use-memcpy-version-on-glibc.patch diff --git a/srcpkgs/sbcl/patches/fix-arm-build-ecl.patch b/srcpkgs/sbcl/patches/fix-arm-build-ecl.patch new file mode 100644 index 00000000000..6e873c277a9 --- /dev/null +++ b/srcpkgs/sbcl/patches/fix-arm-build-ecl.patch @@ -0,0 +1,36 @@ +#2020/01/30 Patch has not yet been accepted upstream +From f4de7a2a21acf1a205b725b4bb5596e1475bad26 Mon Sep 17 00:00:00 2001 +From: Eric Timmons +Date: Sun, 8 Dec 2019 14:00:01 -0500 +Subject: [PATCH] Fix ARM build using ECL host + +ECL appears to not like ~T nested in ~<, even when it's the first argument. So +replace the ~9T that gets triggered during build with spaces. +--- + src/compiler/checkgen.lisp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/compiler/checkgen.lisp b/src/compiler/checkgen.lisp +index a49a0a1fc..026782327 100644 +--- src/compiler/checkgen.lisp ++++ src/compiler/checkgen.lisp +@@ -518,14 +518,14 @@ (defun cast-check-uses (cast) + (cond ((and (ref-p use) (constant-p (ref-leaf use))) + (warn condition + :format-control "~:[This~;~:*~A~] is not a ~ +- ~<~%~9T~:;~/sb-impl:print-type/:~>~% ~S" ++ ~<~% ~:;~/sb-impl:print-type/:~>~% ~S" + :format-arguments + (list what atype (constant-value (ref-leaf use))))) + (t + (warn condition + :format-control + "~:[Result~;~:*~A~] is a ~/sb-impl:print-type/, ~ +- ~<~%~9T~:;not a ~/sb-impl:print-type/.~>" ++ ~<~% ~:;not a ~/sb-impl:print-type/.~>" + :format-arguments (list what dtype atype))))))) + (values)) + +-- +2.24.0 + diff --git a/srcpkgs/sbcl/patches/only-use-memcpy-version-on-glibc.patch b/srcpkgs/sbcl/patches/only-use-memcpy-version-on-glibc.patch new file mode 100644 index 00000000000..8aa29cadc2c --- /dev/null +++ b/srcpkgs/sbcl/patches/only-use-memcpy-version-on-glibc.patch @@ -0,0 +1,27 @@ +#2020/01/30 Patch has not yet been accepted upstream +From 5d7395cbd4eb952d4a988c4ee7ee3f5111a9f5a7 Mon Sep 17 00:00:00 2001 +From: Eric Timmons +Date: Sat, 1 Feb 2020 17:34:10 -0500 +Subject: [PATCH 4/5] Only include old memcpy version on glibc + +--- + src/runtime/memcpy.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/runtime/memcpy.h b/src/runtime/memcpy.h +index a99c5fb7e..e3d104e3a 100644 +--- src/runtime/memcpy.h ++++ src/runtime/memcpy.h +@@ -1,3 +1,4 @@ ++#ifdef __GLIBC__ + #ifdef __linux__ + #ifdef __amd64__ + #ifdef __ASSEMBLER__ +@@ -14,3 +15,4 @@ __asm__(".symver memcpy,memcpy@GLIBC_2.0"); + #endif + #endif + #endif ++#endif +-- +2.25.0 + diff --git a/srcpkgs/sbcl/template b/srcpkgs/sbcl/template index 9d9d7cc99f5..26bee42e005 100644 --- a/srcpkgs/sbcl/template +++ b/srcpkgs/sbcl/template @@ -38,8 +38,8 @@ x86_64-musl) broken="https://build.voidlinux.org/builders/x86_64-musl_builder/builds/31173/steps/shell_3/logs/stdio" ;; *-musl) - makedepends+=" ccl" - _bootstrap_lisp="ccl --batch --quiet --no-init" + makedepends+=" ecl" + _bootstrap_lisp="ecl" ;; esac