emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41579: closed ([PATCH 0/2] Introduce 'cc-for-target'.)


From: GNU bug Tracking System
Subject: bug#41579: closed ([PATCH 0/2] Introduce 'cc-for-target'.)
Date: Fri, 29 May 2020 13:59:02 +0000

Your message dated Fri, 29 May 2020 15:58:22 +0200
with message-id <87o8q64zcx.fsf@gnu.org>
and subject line Re: [bug#41579] [PATCH 0/2] Introduce 'cc-for-target'.
has caused the debbugs.gnu.org bug report #41579,
regarding [PATCH 0/2] Introduce 'cc-for-target'.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
41579: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=41579
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH 0/2] Introduce 'cc-for-target'. 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




--- End Message ---
--- Begin Message --- Subject: Re: [bug#41579] [PATCH 0/2] Introduce 'cc-for-target'. Date: Fri, 29 May 2020 15:58:22 +0200
Mathieu Othacehe <othacehe@gnu.org> writes:

> Hello Marius,
>
>> 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.
>
> This is definitely a nice improvement! Sometimes the issue also extends
> to AR and LD for instance.
>
> This has been discussed here[1]. Maybe we should deal with that directly
> in the build system, and provide suitable default values for CC, AR, LD
> & friends, when cross-compiling.

That makes sense.  Can't think of any cases where setting these would
have an adverse effect, though I'm sure plenty of stuff will break.  ;-)

> Anyway, your patch is already a big improvement and it LGTM.

Thanks for checking, pushed!

Attachment: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]