summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2022-12-13 13:10:26 +0200
committerEfraim Flashner <efraim@flashner.co.il>2022-12-14 10:59:04 +0200
commit6c1b6a6fc17843ccbb6479558b792b5651b20499 (patch)
tree1b887d5247880261f9d8e181c080a746e1274031
parent19122da25de6808b5e9ddfb2785a0bec4b7cb3d4 (diff)
fixup glibc-mesboot0
(%current-system) evaluated too early
-rw-r--r--gnu/packages/commencement.scm54
-rw-r--r--gnu/packages/patches/glibc-bootstrap-arm-2.2.5.patch17
2 files changed, 44 insertions, 27 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 878ab35694..ce25a7ee53 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1195,33 +1195,33 @@ ac_cv_c_float_format='IEEE (little-endian)'
;; GNU C Library 2.2.5 is the most recent glibc that we managed to build
;; using gcc-2.95.3. Newer versions (2.3.x, 2.6, 2.1x) seem to need a newer
;; gcc.
- (let ((triplet (match (%current-system)
- ((or "armhf-linux" "aarch64-linux")
- "arm-unknown-linux-gnu")
- ((or "i686-linux" "x86_64-linux")
- "i686-unknown-linux-gnu"))))
- (package
- (inherit glibc)
- (name "glibc-mesboot0")
- (version "2.2.5")
- (source (origin
- (method url-fetch)
- (uri (string-append "mirror://gnu/glibc/glibc-"
- version
- ".tar.gz"))
- ;; Patch needs XZ
- ;; (patches (search-patches "glibc-boot-2.2.5.patch"))
- (sha256
- (base32
- "1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q"))))
- (supported-systems '("armhf-linux" "aarch64-linux"
- "i686-linux" "x86_64-linux"))
- (inputs '())
- (propagated-inputs '())
- (native-inputs `(("headers" ,mesboot-headers)
- ,@(%boot-mesboot-core-inputs)))
- (outputs '("out"))
- (arguments
+ (package
+ (inherit glibc)
+ (name "glibc-mesboot0")
+ (version "2.2.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/glibc/glibc-"
+ version
+ ".tar.gz"))
+ ;; Patch needs XZ
+ ;; (patches (search-patches "glibc-boot-2.2.5.patch"))
+ (sha256
+ (base32
+ "1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q"))))
+ (supported-systems '("armhf-linux" "aarch64-linux"
+ "i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs `(("headers" ,mesboot-headers)
+ ,@(%boot-mesboot-core-inputs)))
+ (outputs '("out"))
+ (arguments
+ (let ((triplet (match (%current-system)
+ ((or "armhf-linux" "aarch64-linux")
+ "arm-unknown-linux-gnu")
+ ((or "i686-linux" "x86_64-linux")
+ "i686-unknown-linux-gnu"))))
(list #:implicit-inputs? #f
#:guile %bootstrap-guile
#:tests? #f
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 e8b34a6166..2f4de348d3 100644
--- a/gnu/packages/patches/glibc-bootstrap-arm-2.2.5.patch
+++ b/gnu/packages/patches/glibc-bootstrap-arm-2.2.5.patch
@@ -877,6 +877,14 @@ diff --git a/sysdeps/unix/sysv/linux/arm/mmap.S b/sysdeps/unix/sysv/linux/arm/mm
index af93c7b..97b4a55 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap.S
+++ b/sysdeps/unix/sysv/linux/arm/mmap.S
+@@ -21,6 +21,7 @@
+ .text
+
+ ENTRY (__mmap)
++#ifdef __NR_mmap
+
+ /* Because we can only get five args through the syscall interface, and
+ mmap() takes six, we need to build a parameter block and pass its
@@ -41,7 +41,14 @@ ENTRY (__mmap)
/* do the syscall */
@@ -892,6 +900,15 @@ index af93c7b..97b4a55 100644
/* pop args off the stack. */
add sp, sp, #16
+@@ -50,6 +59,7 @@ ENTRY (__mmap)
+ RETINSTR(movcc, pc, lr)
+ b PLTJMP(syscall_error);
+
++#endif
+ PSEUDO_END (__mmap)
+
+ weak_alias (__mmap, mmap)
+
diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S
index 1f19bf0..8cb40f5 100644
--- a/sysdeps/unix/sysv/linux/arm/mmap64.S