Subject: [PATCH 0/2] Introduce 'cc-for-target'.

From: Marius Bakke <[email-masked]>
Date: Thu, 28 May 2020 19:11:37 +0200

Many packages specify a compiler "manually", which leads to this stanza
in order to work when cross-compiling:

  (string-append "CC="
                 (let ((target ,(%current-target-system)))
                   (if target
                       (string-append target "-gcc")
                       "gcc")))

To reduce duplication, the following patch introduces a 'cc-for-target'
procedure, so one can instead do:

  (string-append "CC=" ,(cc-for-target))

...and it will DTRT.

Thoughts?

Marius Bakke (2):
  utils: Add 'cc-for-target'.
  gnu: Use 'cc-for-target' instead of custom implementations.

 gnu/packages/compression.scm |   7 +-
 gnu/packages/linux.scm       |  22 ++----
 gnu/packages/mail.scm        |   5 +-
 gnu/packages/music.scm       |   6 +-
 gnu/packages/radio.scm       |   7 +-
 gnu/packages/suckless.scm    | 134 +++++++++++------------------------
 guix/utils.scm               |   9 ++-
 7 files changed, 60 insertions(+), 130 deletions(-)

-- 
2.26.2