guix-commits
[Top][All Lists]
Advanced

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

02/03: gcc: commencement: gcc-boot0: Build fix for x86_64-linux.


From: guix-commits
Subject: 02/03: gcc: commencement: gcc-boot0: Build fix for x86_64-linux.
Date: Tue, 3 Dec 2024 07:01:25 -0500 (EST)

janneke pushed a commit to branch core-packages-team
in repository guix.

commit 0eef461683fe3c0f4a842b875fa010f90d672411
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Tue Dec 3 12:17:14 2024 +0100

    gcc: commencement: gcc-boot0: Build fix for x86_64-linux.
    
    * gnu/packages/commencement.scm (gcc-boot0)[arguments]: When building for
    x86_64-linux, add phase "patch-system.h" to substitute fix SIZE_MAX macro.
    
    Change-Id: I6e552aaa458755ec920873a0535f599c88a1f74f
---
 gnu/packages/commencement.scm | 23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 86adc71f98..5708714342 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2346,7 +2346,7 @@ exec " gcc "/bin/" program
                                            %bootstrap-coreutils&co
                                            coreutils-boot0))
                                      "/bin/rm") "-rf"
-                      
"gcc/testsuite/go.test/test/fixedbugs/issue27836.dir"))))))
+                                     
"gcc/testsuite/go.test/test/fixedbugs/issue27836.dir"))))))
     (arguments
      (cons*
       #:guile %bootstrap-guile
@@ -2429,6 +2429,15 @@ exec " gcc "/bin/" program
                                            char-set:letter)
                                         #$(package-name lib)))
                            (list gmp-6.0 mpfr mpc)))))
+             #$@(if (and (target-linux?) (target-x86-64?))
+                    #~((add-after 'unpack 'patch-system.h
+                         (lambda _
+                           ;; Avoid: missing binary operator before token "("
+                           (substitute* "gcc/system.h"
+                             (("#ifndef SIZE_MAX" all)
+                              (string-append "#define SIZE_MAX (ULONG_MAX)\n"
+                                             all))))))
+                    #~())
              #$@(if (target-hurd64?)
                     #~((add-after 'unpack 'patch-libcc1-static
                          (lambda _
@@ -2476,9 +2485,9 @@ exec " gcc "/bin/" program
 
               ;; The libstdc++ that libcc1 links against.
               ("libstdc++" ,(match (%current-system)
-                                   ("riscv64-linux" (make-libstdc++-boot0 
gcc-7))
-                                   ("x86_64-gnu" (make-libstdc++-boot0 gcc-14))
-                                   (_ libstdc++-boot0)))
+                              ("riscv64-linux" (make-libstdc++-boot0 gcc-7))
+                              ("x86_64-gnu" (make-libstdc++-boot0 gcc-14))
+                              (_ libstdc++-boot0)))
 
               ;; Call it differently so that the builder can check whether
               ;; the "libc" input is #f.
@@ -3690,7 +3699,7 @@ is the GNU Compiler Collection.")
   (make-gcc-toolchain gcc-10))
 
 (define-public gcc-toolchain-11
-  (make-gcc-toolchain gcc-11))
+    (make-gcc-toolchain gcc-11))
 
 (define-public gcc-toolchain-12
   (make-gcc-toolchain gcc-12))
@@ -3703,7 +3712,9 @@ is the GNU Compiler Collection.")
 
 ;; The default GCC
 (define-public gcc-toolchain
-  gcc-toolchain-14)
+  (if (host-hurd64?)
+      gcc-toolchain-14
+      gcc-toolchain-11))
 
 (define-public gcc-toolchain-aka-gcc
   ;; It's natural for users to try "guix install gcc".  This package



reply via email to

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