Merge branch 'master' into core-updates
[jackhill/guix/guix.git] / build-aux / hydra / gnu-system.scm
index 5aaac52..19371be 100644 (file)
 ;;; tool.
 ;;;
 
-;; Attempt to use our very own Guix modules.
+(use-modules (system base compile))
+
 (eval-when (compile load eval)
 
-  ;; Ignore any available .go, and force recompilation.  This is because our
-  ;; checkout in the store has mtime set to the epoch, and thus .go files look
-  ;; newer, even though they may not correspond.
+  ;; Pre-load the compiler so we don't end up auto-compiling it.
+  (compile #t)
+
+  ;; Use our very own Guix modules.
   (set! %fresh-auto-compile #t)
 
   (and=> (assoc-ref (current-source-location) 'filename)
@@ -315,8 +317,15 @@ valid."
 
     (define (pointless? target)
       ;; Return #t if it makes no sense to cross-build to TARGET from SYSTEM.
-      (and (string-contains target "mingw")
-           (not (string=? "x86_64-linux" system))))
+      (match system
+        ((or "x86_64-linux" "i686-linux")
+         (if (string-contains target "mingw")
+             (not (string=? "x86_64-linux" system))
+             #f))
+        (_
+         ;; Don't try to cross-compile from non-Intel platforms: this isn't
+         ;; very useful and these are often brittle configurations.
+         #t)))
 
     (define (either proc1 proc2 proc3)
       (lambda (x)