summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/base.scm11
-rw-r--r--gnu/packages/cross-base.scm11
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