gnu: commencement: Make ‘glibc-final’ immune to ‘%current-target-system’.
Previously, the value memoized for ‘glibc-final’ was influenced by that
of ‘%current-target-system’ since it is used as a default argument to
‘libc-for-target’. Thus, due to the order in which modules were loaded
versus the time at which ‘%current-target-system’ was set, it was
possible to end up with ‘glibc-final’ set to the “wrong” libc, for
instance when doing:
guix build -f guix.scm --target=i586-pc-gnu
from another project such as the Shepherd.
This is similar to the problem fixed in
625a847d2a
.
* gnu/packages/commencement.scm (glibc-final-with-bootstrap-bash)
(glibc-final): Explicitly pass (%current-system) as the first argument
to ‘libc-for-target’ so that the value of ‘%current-target-system’ at
that time has no influence.
Change-Id: I2f05898b8f9d1f99d4c75108441c7ad38728225f
parent
176440c056
commit
c936853a64
|
@ -2922,7 +2922,7 @@ memoized as a function of '%current-system'."
|
||||||
;; store path has no dependencies. Actually, the really-final libc is
|
;; store path has no dependencies. Actually, the really-final libc is
|
||||||
;; built just below; the only difference is that this one uses the
|
;; built just below; the only difference is that this one uses the
|
||||||
;; bootstrap Bash.
|
;; bootstrap Bash.
|
||||||
(let ((libc (libc-for-target)))
|
(let ((libc (libc-for-target (%current-system))))
|
||||||
(package
|
(package
|
||||||
(inherit libc)
|
(inherit libc)
|
||||||
(name "glibc-intermediate")
|
(name "glibc-intermediate")
|
||||||
|
@ -3096,7 +3096,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
|
||||||
(define/system-dependent glibc-final
|
(define/system-dependent glibc-final
|
||||||
;; The final glibc, which embeds the statically-linked Bash built above.
|
;; The final glibc, which embeds the statically-linked Bash built above.
|
||||||
;; Use 'package/inherit' so we get the 'replacement' of 'glibc', if any.
|
;; Use 'package/inherit' so we get the 'replacement' of 'glibc', if any.
|
||||||
(let ((libc (libc-for-target)))
|
(let ((libc (libc-for-target (%current-system))))
|
||||||
(package/inherit libc
|
(package/inherit libc
|
||||||
(name "glibc")
|
(name "glibc")
|
||||||
(source (bootstrap-origin (package-source libc)))
|
(source (bootstrap-origin (package-source libc)))
|
||||||
|
|
Reference in New Issue