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
This commit is contained in:
Efraim Flashner 2024-10-21 15:01:26 +03:00
parent e6521aa82e
commit 9adc7165e9
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -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)))))