From d108a7aac2c51f21c55cb8ea8801629a97f5242a Mon Sep 17 00:00:00 2001 From: Janneke Nieuwenhuizen Date: Wed, 6 Nov 2024 12:26:47 +0100 Subject: gnu: cross-libc: Resurrect cross-building for the Hurd. * gnu/packages/base.scm (glibc)[arguments]: When building for the Hurd, in phase "create-machine-symlink", only create symlink if it is missing. * gnu/packages/cross-base.scm (cross-libc*)[arguments]: Likewise. Change-Id: Ib009b7bd301b543b8629382330cca9d963b7a812 --- gnu/packages/base.scm | 11 ++++++----- gnu/packages/cross-base.scm | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 4e8121ae2c..90c25b54e1 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -1088,11 +1088,12 @@ the store.") " libmachuser.so libhurduser.so")))))) (add-after 'install 'create-machine-symlink (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (cpu "i386")) - (symlink cpu - (string-append out - "/include/mach/machine")))))) + (let* ((out (assoc-ref outputs "out")) + (cpu "i386") + (machine (string-append + out "/include/mach/machine"))) + (unless (file-exists? machine) + (symlink cpu machine)))))) '())))) (inputs `(("static-bash" ,static-bash))) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index cecc21083e..5781341a87 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -747,11 +747,12 @@ returned." " libmachuser.so libhurduser.so")))))) (add-after 'install 'create-machine-symlink (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (cpu "i386")) - (symlink cpu - (string-append out - "/include/mach/machine")))))) + (let* ((out (assoc-ref outputs "out")) + (cpu "i386") + (machine (string-append + out "/include/mach/machine"))) + (unless (file-exists? machine) + (symlink cpu machine)))))) '()))))) ;; Shadow the native "kernel-headers" because glibc's recipe expects the -- cgit 1.4.1