From c936853a646fbb2b55e20a8374b9f93b8838f5a3 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 26 Nov 2023 22:58:27 +0100 Subject: gnu: commencement: Make ‘glibc-final’ immune to ‘%current-target-system’. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 625a847d2a554168bec6e294888d9d1f8ab03d08. * 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 --- gnu/packages/commencement.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 03fecd6d9b..9124f0e2e0 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -2922,7 +2922,7 @@ (define/system-dependent glibc-final-with-bootstrap-bash ;; store path has no dependencies. Actually, the really-final libc is ;; built just below; the only difference is that this one uses the ;; bootstrap Bash. - (let ((libc (libc-for-target))) + (let ((libc (libc-for-target (%current-system)))) (package (inherit libc) (name "glibc-intermediate") @@ -3096,7 +3096,7 @@ (define gettext-boot0 (define/system-dependent glibc-final ;; The final glibc, which embeds the statically-linked Bash built above. ;; 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 (name "glibc") (source (bootstrap-origin (package-source libc))) -- cgit v1.2.3