janneke pushed a commit to branch wip-aarch64-bootstrap in repository guix.
commit 83bc786ddc13eaca61a16506f49ebe4a237f105f Author: Jan (janneke) Nieuwenhuizen <jann...@gnu.org> AuthorDate: Wed Feb 23 08:19:22 2022 +0100 squash! gnu: commencement: glibc-mesboot0: More minimal syscall patch (non-EABI). --- gnu/packages/commencement.scm | 2 +- .../patches/glibc-bootstrap-arm-2.2.5.patch | 53 ++++++++++++++++++---- 2 files changed, 45 insertions(+), 10 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 46e77bcf2c..42a36e347e 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -1268,7 +1268,7 @@ ac_cv_c_float_format='IEEE (little-endian)' " -D MES_BOOTSTRAP=1" " -D BOOTSTRAP_GLIBC=1" (if (equal? #$triplet "arm-unknown-linux-gnu") - " -D __ARM_EABI__=1" + "" ;; Try more minimal " -D __ARM_EABI__=1" ""))) (cflags (string-append " -L " (getcwd)))) (setenv "CONFIG_SHELL" shell) diff --git a/gnu/packages/patches/glibc-bootstrap-arm-2.2.5.patch b/gnu/packages/patches/glibc-bootstrap-arm-2.2.5.patch index 15f011f723..e8b34a6166 100644 --- a/gnu/packages/patches/glibc-bootstrap-arm-2.2.5.patch +++ b/gnu/packages/patches/glibc-bootstrap-arm-2.2.5.patch @@ -3,7 +3,7 @@ Not presented upstream. From 84d31256c0b37f7f73ff2145a7f6c9a6a9faaf35 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" <jann...@gnu.org> Date: Mon, 10 Jan 2022 15:01:05 +0100 -Subject: [PATCH 1/9] bootstrappable: arm: Guard __NR_sigaction, +Subject: [PATCH 01/10] bootstrappable: arm: Guard __NR_sigaction, __NR_sigpending, __NR_sigprocmask, __NR_sigreturn, __NR_sigsuspend. Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 @@ -108,7 +108,7 @@ Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From 911c8692ba908f545429610a90d13ce3de0576b3 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" <jann...@gnu.org> Date: Wed, 12 Jan 2022 12:43:50 +0100 -Subject: [PATCH 2/9] bootstrappable: arm: Fixup for __restrict_arr. +Subject: [PATCH 02/10] bootstrappable: arm: Fixup for __restrict_arr. Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 @@ -172,7 +172,7 @@ Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From 335bf269cae7ccbae8209b875cc451cbd6ef2b73 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" <jann...@gnu.org> Date: Wed, 12 Jan 2022 12:44:46 +0100 -Subject: [PATCH 3/9] bootstrappable: arm: Portability or cpp arithmetic +Subject: [PATCH 03/10] bootstrappable: arm: Portability or cpp arithmetic ?error. Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 @@ -202,7 +202,7 @@ Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From 2cf31225fef8a11fe201f9dae1f1f17779508d4f Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" <jann...@gnu.org> Date: Wed, 12 Jan 2022 12:45:40 +0100 -Subject: [PATCH 4/9] bootstrappable: arm: Guard __NR_ipc, __NR_sigreturn, +Subject: [PATCH 04/10] bootstrappable: arm: Guard __NR_ipc, __NR_sigreturn, __NR_rt_sigreturn. Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 @@ -662,7 +662,7 @@ Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From 7415adb7fa53e8c6df0be266b1422cb7a98b26af Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" <jann...@gnu.org> Date: Mon, 21 Feb 2022 10:22:03 +0100 -Subject: [PATCH 5/9] bootstrappable: arm: Add missing headers. +Subject: [PATCH 05/10] bootstrappable: arm: Add missing headers. Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 @@ -700,7 +700,7 @@ Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From 48ae1c92a4a19494d38c32fe7d83c5e09ca4b355 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" <jann...@gnu.org> Date: Wed, 12 Jan 2022 13:01:59 +0100 -Subject: [PATCH 6/9] bootstrappable: arm: Avoid fpu_setw. +Subject: [PATCH 06/10] bootstrappable: arm: Avoid fpu_setw. Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 @@ -734,7 +734,7 @@ Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From 3597394200bafed1291ff65039db6cf9cec03b59 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" <jann...@gnu.org> Date: Mon, 21 Feb 2022 00:14:16 +0100 -Subject: [PATCH 7/9] bootstrappable: arm: Guard __NR_getrlimit. +Subject: [PATCH 07/10] bootstrappable: arm: Guard __NR_getrlimit. Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 @@ -768,7 +768,7 @@ Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From e0764cfa9e3ff4b120723b87a66d2e9c7a500aef Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" <jann...@gnu.org> Date: Sun, 20 Feb 2022 15:32:53 +0100 -Subject: [PATCH 8/9] bootstrappable: arm: Support EABI system calls. +Subject: [PATCH 08/10] bootstrappable: arm: Support EABI system calls. Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 @@ -1090,7 +1090,7 @@ Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com From 030ccc9978c73eccddbaf8049b02a5cecf913383 Mon Sep 17 00:00:00 2001 From: "Jan (janneke) Nieuwenhuizen" <jann...@gnu.org> Date: Tue, 22 Feb 2022 07:06:39 +0100 -Subject: [PATCH 9/9] bootstrappable: arm: Add #warning when using OABI. +Subject: [PATCH 09/10] bootstrappable: arm: Add #warning when using OABI. Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 @@ -1250,3 +1250,38 @@ index ba2259d..9b0c9ec 100644 Jan Nieuwenhuizen <jann...@gnu.org> | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com +From 3d0f788cb58075e9790956ef0d6778b56dac291f Mon Sep 17 00:00:00 2001 +From: "Jan (janneke) Nieuwenhuizen" <jann...@gnu.org> +Date: Wed, 23 Feb 2022 08:16:46 +0100 +Subject: [PATCH 10/10] bootstrappable: arm: More minimal SYS_ify patch. +Content-Transfer-Encoding: 8bit +Content-Type: text/plain; charset=UTF-8 + +* sysdeps/unix/sysv/linux/arm/sysdep.h (SWI_BASE): Set to zero. +(SYS_ify): And with 0xfffff. + +Co-authored-by: Danny Milosavljevic <dan...@scratchpost.org> +--- + sysdeps/unix/sysv/linux/arm/sysdep.h | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h +index 37b8cb6..3878331 100644 +--- a/sysdeps/unix/sysv/linux/arm/sysdep.h ++++ b/sysdeps/unix/sysv/linux/arm/sysdep.h +@@ -29,9 +29,8 @@ + of the kernel. But these symbols do not follow the SYS_* syntax + so we have to redefine the `SYS_ify' macro here. */ + #undef SYS_ify +-#define SWI_BASE (0x900000) +-#define SYS_ify(syscall_name) (__NR_##syscall_name) +- ++#define SWI_BASE (0x000000) ++#define SYS_ify(syscall_name) (__NR_##syscall_name & 0xfffff) + + #ifdef __ASSEMBLER__ + +-- +Jan Nieuwenhuizen <jann...@gnu.org> | GNU LilyPond http://lilypond.org +Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com +