guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/03: squash! glibc-mesboot0.


From: guix-commits
Subject: 02/03: squash! glibc-mesboot0.
Date: Sun, 10 Jan 2021 10:28:01 -0500 (EST)

janneke pushed a commit to branch wip-arm-bootstrap
in repository guix.

commit db1ea6be2493bd5e00efd5a16c19a4a0c2d71799
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Sun Jan 10 15:07:03 2021 +0100

    squash! glibc-mesboot0.
    
    * gnu/packages/patches/glibc-bootstrap-arm-2.2.5.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/commencement.scm (glibc-mesboot0)[native-inputs]: Add it.
    [arguments]: Apply it in apply-patches.
---
 gnu/local.mk                                       |   3 +-
 gnu/packages/commencement.scm                      |   5 +-
 .../patches/glibc-bootstrap-arm-2.2.5.patch        | 107 +++++++++++++++++++++
 3 files changed, 113 insertions(+), 2 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 6bbeceb..8025c62 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -11,7 +11,7 @@
 # Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
 # Copyright © 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
 # Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner 
<efraim@flashner.co.il>
-# Copyright © 2016, 2017, 2018, 2019, 2020 Jan (janneke) Nieuwenhuizen 
<janneke@gnu.org>
+# Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Jan (janneke) Nieuwenhuizen 
<janneke@gnu.org>
 # Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 # Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org>
 # Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
@@ -1070,6 +1070,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/glibc-allow-kernel-2.6.32.patch         \
   %D%/packages/patches/glibc-boot-2.16.0.patch                 \
   %D%/packages/patches/glibc-boot-2.2.5.patch                  \
+  %D%/packages/patches/glibc-bootstrap-arm-2.2.5.patch         \
   %D%/packages/patches/glibc-bootstrap-system-2.2.5.patch      \
   %D%/packages/patches/glibc-bootstrap-system-2.16.0.patch     \
   %D%/packages/patches/glibc-bootstrap-system.patch            \
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index d93f0fd..7355dee 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1514,6 +1514,7 @@ ac_cv_c_float_format='IEEE (little-endian)'
       (propagated-inputs '())
       (native-inputs `(("boot-patch" ,(search-patch "glibc-boot-2.2.5.patch"))
                        ("system-patch" ,(search-patch 
"glibc-bootstrap-system-2.2.5.patch"))
+                       ("arm-patch" ,(search-patch 
"glibc-bootstrap-arm-2.2.5.patch"))
                        ("headers" ,mesboot-headers)
                        ,@(%boot-mesboot-core-inputs)))
       (outputs '("out"))
@@ -1546,11 +1547,13 @@ ac_cv_c_float_format='IEEE (little-endian)'
             (string-append "--prefix=" out)))
          #:phases
          (modify-phases %standard-phases
-           (add-after 'unpack 'apply-boot-patch
+           (add-after 'unpack 'apply-boot-patches
              (lambda* (#:key inputs #:allow-other-keys)
                (and (let ((patch (assoc-ref inputs "boot-patch")))
                       (invoke "patch" "--force" "-p1" "-i" patch))
                     (let ((patch (assoc-ref inputs "system-patch")))
+                      (invoke "patch" "--force" "-p1" "-i" patch))
+                    (let ((patch (assoc-ref inputs "arm-patch")))
                       (invoke "patch" "--force" "-p1" "-i" patch)))))
            (add-before 'configure 'setenv
              (lambda* (#:key outputs #:allow-other-keys)
diff --git a/gnu/packages/patches/glibc-bootstrap-arm-2.2.5.patch 
b/gnu/packages/patches/glibc-bootstrap-arm-2.2.5.patch
new file mode 100644
index 0000000..73b07e0
--- /dev/null
+++ b/gnu/packages/patches/glibc-bootstrap-arm-2.2.5.patch
@@ -0,0 +1,107 @@
+Not presented upstream.
+
+From 64b051208f2f1687f3dac9d32622facec7c380ca Mon Sep 17 00:00:00 2001
+From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
+Date: Sun, 10 Jan 2021 15:01:05 +0100
+Subject: [PATCH] Guard __NR_sigaction, __NR_sigpending, __NR_sigprocmask,
+ __NR_sigreturn, __NR_sigsuspend.
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+This fixes building on armhf-linux.
+
+* sysdeps/unix/sysv/linux/arm/sigaction.c (__libc_sigaction): Avoid
+using undefined __NR_sigaction.
+* sysdeps/unix/sysv/linux/arm/sigrestorer.S: Avoid using undefined
+__NR_sigreturn.
+* sysdeps/unix/sysv/linux/sigpending.c (sigpending): Avoid using
+undefined __NR_sigpending.
+* sysdeps/unix/sysv/linux/sigprocmask.c (__sigprocmask): Avoid using
+undefined __NR_sigprocmask.
+* sysdeps/unix/sysv/linux/sigsuspend.c (__sigsuspend): Avoid using
+undefined __NR_sigsuspend.
+---
+ sysdeps/unix/sysv/linux/arm/sigaction.c   | 2 ++
+ sysdeps/unix/sysv/linux/arm/sigrestorer.S | 2 ++
+ sysdeps/unix/sysv/linux/sigpending.c      | 2 ++
+ sysdeps/unix/sysv/linux/sigprocmask.c     | 2 ++
+ sysdeps/unix/sysv/linux/sigsuspend.c      | 2 ++
+ 5 files changed, 10 insertions(+)
+
+diff --git a/sysdeps/unix/sysv/linux/arm/sigaction.c 
b/sysdeps/unix/sysv/linux/arm/sigaction.c
+index f39665f..acc19ce 100644
+--- a/sysdeps/unix/sysv/linux/arm/sigaction.c
++++ b/sysdeps/unix/sysv/linux/arm/sigaction.c
+@@ -134,9 +134,11 @@ __libc_sigaction (sig, act, oact)
+       }
+ #endif
+     }
++# ifdef __NR_sigaction
+   result = INLINE_SYSCALL (sigaction, 3, sig,
+                          act ? __ptrvalue (&k_sigact) : NULL,
+                          oact ? __ptrvalue (&k_osigact) : NULL);
++# endif
+   if (oact && result >= 0)
+     {
+       oact->sa_handler = k_osigact.k_sa_handler;
+diff --git a/sysdeps/unix/sysv/linux/arm/sigrestorer.S 
b/sysdeps/unix/sysv/linux/arm/sigrestorer.S
+index 98e33cb..a4769ca 100644
+--- a/sysdeps/unix/sysv/linux/arm/sigrestorer.S
++++ b/sysdeps/unix/sysv/linux/arm/sigrestorer.S
+@@ -22,8 +22,10 @@
+    one of these.  This avoids the need for the kernel to synthesise a return
+    instruction on the stack, which would involve expensive cache flushes. */
+ 
++#ifdef __NR_sigreturn
+ ENTRY(__default_sa_restorer)
+       swi     SYS_ify(sigreturn)
++#endif
+ 
+ #ifdef __NR_rt_sigreturn
+ 
+diff --git a/sysdeps/unix/sysv/linux/sigpending.c 
b/sysdeps/unix/sysv/linux/sigpending.c
+index a5404e5..5ff5918 100644
+--- a/sysdeps/unix/sysv/linux/sigpending.c
++++ b/sysdeps/unix/sysv/linux/sigpending.c
+@@ -61,6 +61,8 @@ sigpending (set)
+     }
+ # endif
+ 
++# ifdef __NR_sigpending
+   return INLINE_SYSCALL (sigpending, 1, CHECK_SIGSET (set));
++# endif
+ #endif
+ }
+diff --git a/sysdeps/unix/sysv/linux/sigprocmask.c 
b/sysdeps/unix/sysv/linux/sigprocmask.c
+index 7a73d9c..fbcc5a1 100644
+--- a/sysdeps/unix/sysv/linux/sigprocmask.c
++++ b/sysdeps/unix/sysv/linux/sigprocmask.c
+@@ -67,8 +67,10 @@ __sigprocmask (how, set, oset)
+     }
+ # endif
+ 
++# ifdef __NR_sigprocmask
+   return INLINE_SYSCALL (sigprocmask, 3, how, CHECK_SIGSET_NULL_OK (set),
+                        CHECK_SIGSET_NULL_OK (oset));
++# endif
+ #endif
+ }
+ weak_alias (__sigprocmask, sigprocmask)
+diff --git a/sysdeps/unix/sysv/linux/sigsuspend.c 
b/sysdeps/unix/sysv/linux/sigsuspend.c
+index bd66a51..952cf52 100644
+--- a/sysdeps/unix/sysv/linux/sigsuspend.c
++++ b/sysdeps/unix/sysv/linux/sigsuspend.c
+@@ -61,7 +61,9 @@ __sigsuspend (set)
+     }
+ # endif
+ 
++# ifdef __NR_sigsuspend
+   return INLINE_SYSCALL (sigsuspend, 3, 0, 0, set->__val[0]);
++# endif
+ #endif
+ }
+ weak_alias (__sigsuspend, sigsuspend)
+-- 
+Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
+Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]