build-system/gnu: Strip only ELF files.

Suggested by Mark H Weaver <mhw@netris.org>
at <http://lists.gnu.org/archive/html/guix-devel/2014-10/msg00395.html>.

* guix/build/gnu-build-system.scm (strip)[strip-dir]: Strip only
  when (elf-file? PATH) is true.
This commit is contained in:
Ludovic Courtès 2014-11-22 12:49:14 +01:00
parent 99533da50d
commit 50b87bd54b

View file

@ -343,7 +343,8 @@ (define (strip-dir dir)
debug-output objcopy-command))
(file-system-fold (const #t)
(lambda (path stat result) ; leaf
(and (or (not debug-output)
(and (elf-file? path)
(or (not debug-output)
(make-debug-file path))
(zero? (apply system* strip-command
(append strip-flags (list path))))