gnu: make-bootstrap: Make sure %gcc-stripped binaries are usable.
authorLudovic Courtès <ludo@gnu.org>
Sat, 14 Jun 2014 13:58:23 +0000 (15:58 +0200)
committerLudovic Courtès <ludo@gnu.org>
Sat, 14 Jun 2014 13:58:23 +0000 (15:58 +0200)
* gnu/packages/make-bootstrap.scm (%gcc-stripped):
  When (%current-target-system) is false, run gcc, g++, and cpp with
  --version.

gnu/packages/make-bootstrap.scm

index a9b8457..2808beb 100644 (file)
@@ -485,7 +485,14 @@ for `sh' in $PATH, and without nscd, and with static NSS modules."
            ;; (‘genchecksum’, ‘gcc-nm’, etc.) rely on C++ headers.
            (copy-recursively (string-append gcc "/include/c++")
                              (string-append includedir "/c++"))
-           #t))))
+
+           ;; For native builds, check whether the binaries actually work.
+           ,(if (%current-target-system)
+                '#t
+                '(every (lambda (prog)
+                          (zero? (system* (string-append gcc "/bin/" prog)
+                                          "--version")))
+                        '("gcc" "g++" "cpp")))))))
     (inputs `(("gcc" ,%gcc-static)))))
 
 (define %guile-static