mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
gnu: Fix make-gcc-libc.
Until now the following wouldn't build: --8<---------------cut here---------------start------------->8--- (use-modules (gnu packages commencement) (gnu packages gcc) (gnu packages base)) (make-gcc-libc gcc-9 glibc-2.27) --8<---------------cut here---------------end--------------->8--- * gnu/packages/base.scm (make-gcc-libc)[phases]: Add environment variables to place the target libc on the system header search path. [make-flags]: Remove unncessary FLAGS_FOR_TARGET. [native-inputs]: Construct in a way that doesn't require emptying inputs.
This commit is contained in:
parent
76dbadac59
commit
2b1d708294
1 changed files with 16 additions and 11 deletions
|
@ -981,18 +981,23 @@ (define-public (make-gcc-libc base-gcc libc)
|
||||||
(substitute-keyword-arguments
|
(substitute-keyword-arguments
|
||||||
(ensure-keyword-arguments (package-arguments base-gcc)
|
(ensure-keyword-arguments (package-arguments base-gcc)
|
||||||
'(#:implicit-inputs? #f))
|
'(#:implicit-inputs? #f))
|
||||||
((#:make-flags flags)
|
((#:phases phases)
|
||||||
`(let ((libc (assoc-ref %build-inputs "libc")))
|
`(modify-phases ,phases
|
||||||
;; FLAGS_FOR_TARGET are needed for the target libraries to receive
|
(add-before 'configure 'treat-glibc-as-system-header
|
||||||
;; the -Bxxx for the startfiles.
|
(lambda _
|
||||||
(cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib")
|
(let ((libc (assoc-ref %build-inputs "libc")))
|
||||||
,flags)))))
|
;; GCCs build processes requires that the libc
|
||||||
|
;; we're building against is on the system header
|
||||||
|
;; search path.
|
||||||
|
(for-each (lambda (var)
|
||||||
|
(setenv var (string-append libc "/include")))
|
||||||
|
'("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH"))
|
||||||
|
#t)))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("libc" ,libc)
|
`(,@(package-native-inputs base-gcc)
|
||||||
("libc:static" ,libc "static")
|
,@(append (fold alist-delete (%final-inputs) '("libc" "libc:static")))
|
||||||
,@(append (package-inputs base-gcc)
|
("libc" ,libc)
|
||||||
(fold alist-delete (%final-inputs) '("libc" "libc:static")))))
|
("libc:static" ,libc "static")))))
|
||||||
(inputs '())))
|
|
||||||
|
|
||||||
(define-public (make-glibc-locales glibc)
|
(define-public (make-glibc-locales glibc)
|
||||||
(package
|
(package
|
||||||
|
|
Loading…
Reference in a new issue