diff mbox series

[bug#74290,v3,47/51] gnu: bootstrap: %bootstrap-glibc: Also fix libm.so.

Message ID 2b945a5a46218b04a37eb9d01530e93baf00608d.1731999203.git.janneke@gnu.org
State New
Headers show
Series Add support for x86_64-gnu, aka the 64bit Hurd. | expand

Commit Message

Janneke Nieuwenhuizen Nov. 19, 2024, 6:55 a.m. UTC
On the 64bit Hurd, glibc-2.39's libm.so is also a linker script.  This fixes
having it refer to

    /gnu/store/eee...-glibc-cross-x86_64-pc-gnu-2.39/lib/libm.so.6
    /gnu/store/eee...-glibc-cross-x86_64-pc-gnu-2.39/lib/libmvec.so.1

* gnu/packages/bootstrap.scm (%bootstrap-glibc)[arguments]: When building for
the 64bit Hurd, also substitute libm.so linker script.  Update the regexp to
also cater for libh[urduser] and libm[achuser].

Change-Id: I399d8f3ad9be6b8892955c2cbe59a10093120c77
---
 gnu/packages/bootstrap.scm | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 301ee3ca12..f8490ce56c 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -774,12 +774,12 @@  (define %bootstrap-glibc
                                      "/binaries.tar"))
               (chmod "lib" #o755)
 
-              ;; Patch libc.so so it refers to the right path.
-              (substitute* "lib/libc.so"
-                (("/[^ ]+/lib/(libc|ld)" _ prefix)
-                 (string-append out "/lib/" prefix)))
-
-              #t))))))
+              ;; Patch linker scripts so they refer to the right file-names.
+              (substitute* ,(if (target-hurd64?)
+                                ''("lib/libc.so" "lib/libm.so")
+                                "libc.so")
+                (("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
+                 (string-append out "/lib/" prefix)))))))))
     (inputs
      `(("tar" ,(bootstrap-executable "tar" (%current-system)))
        ("xz"  ,(bootstrap-executable "xz" (%current-system)))