guix_mirror_bot pushed a commit to branch wip-riscv-bootstrap
in repository guix.

commit 9adc7165e97a8d9fa0c0d833b5fcaf29c32a63e5
Author: Efraim Flashner <efr...@flashner.co.il>
AuthorDate: Mon Oct 21 15:01:26 2024 +0300

    gnu: file-boot0: Fix building on riscv64-linux.
    
    * gnu/packages/commencement.scm (file)[configure-flags]: When building
    for riscv64-linux disable the use of xz.
    (file-boot0)[arguments]: When building for riscv64-linux adjust the
    make-flags to pass a different CFLAG to build for C11.
    
    Change-Id: I3c8a3f6882fd5c7dce7ba43785a1f1548fa984cb
---
 gnu/packages/commencement.scm | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index dc74b59ab2..9ece3a8025 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2838,8 +2838,11 @@ exec " gcc "/bin/" program
     (inherit (@ (gnu packages file) file))
     (arguments
      `(#:configure-flags
-       ;; XXX: List only added to prevent rebuilds!
-       `("--disable-bzlib" ,,@'())))))
+       `("--disable-bzlib"
+         ,,@(match (%current-system)
+              ("riscv64-linux"
+               '("--disable-xzlib"))
+              (_ '())))))))
 
 (define file-boot0
   (package
@@ -2854,7 +2857,10 @@ exec " gcc "/bin/" program
        #:implicit-inputs? #f
        #:guile ,%bootstrap-guile
        #:configure-flags '("--disable-bzlib")
-       #:make-flags '("CFLAGS+=-std=c11")
+       ;; riscv64's gcc-4.6.4 doesn't have full C11 support.
+       #:make-flags ,(if (target-riscv64?)
+                          ''("CFLAGS+=-std=c1x")
+                          ''("CFLAGS+=-std=c11"))
        #:strip-binaries? #f
        #:validate-runpath? #f
        ,@(package-arguments file)))))

Reply via email to