gnu: gcc: Don't use the 'install-strip' target when cross-compiling.

* gnu/packages/gcc.scm (gcc-4.7): Add 'install-target' variable.  Use
  it in the 'install' phase.
This commit is contained in:
Ludovic Courtès 2014-06-14 22:16:03 +02:00
parent fd0b276624
commit 6b9229ca51
1 changed files with 8 additions and 4 deletions

View File

@ -51,6 +51,13 @@ where the OS part is overloaded to denote a specific ABI---into GCC
(define-public gcc-4.7 (define-public gcc-4.7
(let* ((stripped? #t) ; TODO: make this a parameter (let* ((stripped? #t) ; TODO: make this a parameter
(install-target
;; The 'install-strip' rule uses the native 'strip' instead of
;; 'TARGET-strip' when cross-compiling. Thus, use 'install' in that
;; case.
(if (and stripped? (not (%current-target-system)))
"install-strip"
"install"))
(maybe-target-tools (maybe-target-tools
(lambda () (lambda ()
;; Return the `_FOR_TARGET' variables that are needed when ;; Return the `_FOR_TARGET' variables that are needed when
@ -231,10 +238,7 @@ where the OS part is overloaded to denote a specific ABI---into GCC
(alist-replace 'install (alist-replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(zero? (zero?
(system* "make" (system* "make" ,install-target)))
,(if stripped?
"install-strip"
"install"))))
%standard-phases))))) %standard-phases)))))
(native-search-paths (native-search-paths