gnu: commencement: gcc-final: Fix build for x86-linux with gcc-14.

Summary: Use fixes for the 64bit Hurd also on linux.

* gnu/packages/commencement.scm (gcc-final)[arguments]: When building for
x86-linux, create a gcc wrapper in phase "create-stage-wrapper", use it by
adding STAGE_CC_WRAPPER to #:make-flags, and CC to #:configure-flags to
convince configure gmp that gcc and g++ work.
This commit is contained in:
Janneke Nieuwenhuizen 2024-12-03 13:15:04 +01:00
parent 46f6e8b49f
commit 51c74eb166
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273

View file

@ -3274,7 +3274,8 @@ (define gcc-final
"/lib -L" zlib "/lib -Wl,-rpath="
zlib "/lib")
flag))
#$(if (target-hurd64?)
#$(if (or (target-hurd64?)
(and (target-x86?) (target-linux?)))
`(cons
(string-append
;;Convince gmp's configure that gcc works
@ -3282,7 +3283,8 @@ (define gcc-final
,flags)
flags))))
((#:configure-flags flags)
(if (target-hurd64?)
(if (or (target-hurd64?)
(and (target-x86?) (target-linux?)))
#~(append
#$flags
(list #$(string-append
@ -3336,7 +3338,8 @@ (define gcc-final
#\:))
":")
"\nAM_CXXFLAGS = "))))))
#$@(if (target-hurd64?)
#$@(if (or (target-hurd64?)
(and (target-x86?) (target-linux?)))
#~((add-after 'configure 'create-stage-wrapper
(lambda _
(with-output-to-file "gcc.sh"