GNU bug report logs - #74290
[PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd.

Previous Next

Package: guix-patches;

Reported by: Janneke Nieuwenhuizen <janneke <at> gnu.org>

Date: Sun, 10 Nov 2024 10:35:02 UTC

Severity: normal

Tags: patch

Done: Janneke Nieuwenhuizen <janneke <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Janneke Nieuwenhuizen <janneke <at> gnu.org>
To: 74290 <at> debbugs.gnu.org
Cc: Andreas Enge <andreas <at> enge.fr>, Efraim Flashner <efraim <at> flashner.co.il>, Ekaitz Zarraga <ekaitz <at> elenq.tech>, Ludovic Courtès <ludo <at> gnu.org>
Subject: [bug#74290] [PATCH v4 57/58] gnu: commencement: gcc-boot0: Support the 64bit Hurd.
Date: Sun, 24 Nov 2024 08:55:20 +0100
Asking gcc to "--disable-shared" is overridden for libcc1 by the build system,
which lateron fails with

    install: cannot stat '.libs/libcc1.so.0.0.0': No such file or directory

because no shared libcc1.so.0.0.0 could actually be built.

* gnu/packages/commencement.scm (gcc-boot0)[arguments]: When building for the
64bit Hurd, add CC_FOR_BUILD to #:make-flags to convince gmp's configure that
gcc works.  Also, add phase "patch-libcc1-static" to avoid attempting a shared
libcc1.
---
 gnu/packages/commencement.scm | 36 ++++++++++++++++++++++++++++-------
 1 file changed, 29 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 2a32485fc0..3dbd27b660 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2391,13 +2391,21 @@ (define gcc-boot0
          `(let* ((libc        (assoc-ref %build-inputs "libc"))
                  (libc-native (or (assoc-ref %build-inputs "libc-native")
                                   libc)))
-            `(,(string-append "LDFLAGS="
-                              "-Wl,-rpath=" libc-native "/lib "
-                              "-Wl,-dynamic-linker "
-                              "-Wl," libc-native ,(glibc-dynamic-linker
-                                                   (match (%current-system)
-                                                     ("x86_64-linux" "i686-linux")
-                                                     (_ (%current-system))))))))
+            `(,,@(append
+                  `((string-append "LDFLAGS="
+                                   "-Wl,-rpath=" libc-native "/lib "
+                                   "-Wl,-dynamic-linker "
+                                   "-Wl," libc-native
+                                   ,(glibc-dynamic-linker
+                                     (match (%current-system)
+                                       ("x86_64-linux" "i686-linux")
+                                       (_ (%current-system))))))
+                  (if (target-hurd64?)
+                      ;;Convince gmp's configure that gcc works
+                      (list (string-append
+                             "CC_FOR_BUILD=gcc"
+                             " -Wno-implicit-function-declaration"))
+                      '())))))
         ((#:phases phases)
          #~(modify-phases #$phases
              (add-after 'unpack 'unpack-gmp&co
@@ -2421,6 +2429,20 @@ (define gcc-boot0
                                            char-set:letter)
                                         #$(package-name lib)))
                            (list gmp-6.0 mpfr mpc)))))
+             #$@(if (target-hurd64?)
+                    #~((add-after 'unpack 'patch-libcc1-static
+                         (lambda _
+                           ;;Attempting to build libcc1 shared gives:
+                           ;;  install: cannot stat '.libs/libcc1.so.0.0.0':
+                           ;;  No such file or directory
+                           ;;convince gcc harder to not build a shared libcc1
+                           (substitute* "Makefile.def"
+                             (("module= libcc1; [^;]*;") "module= libcc1;"))
+                           (substitute* "Makefile.in"
+                             (("(--target=[$][{]target_alias[}]) --enable-shared \\\\"
+                               all target)
+                              (string-append target " \\"))))))
+                    #~())
              #$(match (%current-system)
                  ((or "i686-linux" "x86_64-linux")
                   #~(add-before 'configure 'fix-libcc1
-- 
2.46.0





This bug report was last modified 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.