unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#41579] [PATCH 0/2] Introduce 'cc-for-target'.
@ 2020-05-28 17:11 Marius Bakke
  2020-05-28 17:13 ` [bug#41579] [PATCH 1/2] utils: Add 'cc-for-target' Marius Bakke
  2020-05-28 18:43 ` [bug#41579] [PATCH 0/2] Introduce 'cc-for-target' Mathieu Othacehe
  0 siblings, 2 replies; 6+ messages in thread
From: Marius Bakke @ 2020-05-28 17:11 UTC (permalink / raw)
  To: 41579

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





^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#41579] [PATCH 1/2] utils: Add 'cc-for-target'.
  2020-05-28 17:11 [bug#41579] [PATCH 0/2] Introduce 'cc-for-target' Marius Bakke
@ 2020-05-28 17:13 ` Marius Bakke
  2020-05-28 17:13   ` [bug#41579] [PATCH 2/2] gnu: Use 'cc-for-target' instead of custom implementations Marius Bakke
  2020-05-28 18:04   ` [bug#41579] [PATCH 1/2] utils: Add 'cc-for-target' Tobias Geerinckx-Rice via Guix-patches via
  2020-05-28 18:43 ` [bug#41579] [PATCH 0/2] Introduce 'cc-for-target' Mathieu Othacehe
  1 sibling, 2 replies; 6+ messages in thread
From: Marius Bakke @ 2020-05-28 17:13 UTC (permalink / raw)
  To: 41579

* guix/utils.scm (cc-for-target): New procedure.
---
 guix/utils.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/guix/utils.scm b/guix/utils.scm
index d7b197fa44..69e3f0a934 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2016 Mathieu Lirzin <mthl@gnu.org>
 ;;; Copyright © 2015 David Thompson <davet@gnu.org>
 ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018, 2020 Marius Bakke <marius@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -78,6 +78,8 @@
             target-aarch64?
             target-arm?
             target-64bit?
+            cc-for-target
+
             version-compare
             version>?
             version>=?
@@ -506,6 +508,11 @@ a character other than '@'."
                                                (%current-system))))
   (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "ppc64")))
 
+(define* (cc-for-target #:optional (target (%current-target-system)))
+  (if target
+      (string-append target "-gcc")
+      "gcc"))
+
 (define version-compare
   (let ((strverscmp
          (let ((sym (or (dynamic-func "strverscmp" (dynamic-link))
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#41579] [PATCH 2/2] gnu: Use 'cc-for-target' instead of custom implementations.
  2020-05-28 17:13 ` [bug#41579] [PATCH 1/2] utils: Add 'cc-for-target' Marius Bakke
@ 2020-05-28 17:13   ` Marius Bakke
  2020-05-28 18:04   ` [bug#41579] [PATCH 1/2] utils: Add 'cc-for-target' Tobias Geerinckx-Rice via Guix-patches via
  1 sibling, 0 replies; 6+ messages in thread
From: Marius Bakke @ 2020-05-28 17:13 UTC (permalink / raw)
  To: 41579

* gnu/packages/compression.scm (ecm)[arguments]: In #:make-flags, remove
TARGET binding and use CC-FOR-TARGET instead.
* gnu/packages/linux.scm (powerstat, crda, cachefilesd)[arguments]: Likewise.
* gnu/packages/mail.scm (alpine)[arguments]: Likewise.
* gnu/packages/music.scm (lsp-plugins)[arguments]: Likewise.
* gnu/packages/radio.scm (dump1090)[arguments]: Likewise.
* gnu/packages/suckless.scm (blind, dmenu, spoon, slock, st, surf, sent,
wificurse, sbm, prout, noice, human, fortify-headers, colors, libutf,
scron)[arguments]: Likewise.
---
 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 +++++++++++------------------------
 6 files changed, 52 insertions(+), 129 deletions(-)

diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 38adf35e33..cdab7408ed 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -2207,11 +2207,8 @@ computations.")
     (arguments
      `(#:tests? #f                      ; no check target
        #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "DESTDIR=" (assoc-ref %outputs "out"))))
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "DESTDIR=" (assoc-ref %outputs "out")))
        #:phases
        (modify-phases %standard-phases
          (replace 'configure
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index dad7b6e992..225f20caf6 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1222,11 +1222,8 @@ at login.  Local and dynamic reconfiguration are its key features.")
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags
-       (let* ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "prefix=" (assoc-ref %outputs "out"))))
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "prefix=" (assoc-ref %outputs "out")))
        #:tests? #f                      ; no test suite
        #:phases
        (modify-phases %standard-phases
@@ -3377,12 +3374,9 @@ interface.")
                        #t))))
        #:test-target "verify"
        #:make-flags (let ((out     (assoc-ref %outputs "out"))
-                          (regdb   (assoc-ref %build-inputs "wireless-regdb"))
-                          (target ,(%current-target-system)))
+                          (regdb   (assoc-ref %build-inputs "wireless-regdb")))
                       (list
-                       (string-append
-                        "CC=" (if target
-                                  (string-append target "-gcc") "gcc"))
+                       (string-append "CC=" ,(cc-for-target))
                        "V=1"
 
                        ;; Disable signature-checking on 'regulatory.bin'.
@@ -7040,12 +7034,8 @@ system boot process.")
      `(#:tests? #f ; there are no tests
        #:make-flags
        (let ((prefix-dir (lambda (var dir)
-                           (string-append var "=" %output "/" dir)))
-             (target ,(%current-target-system)))
-         (list (string-append "CC="
-                              (if target
-                                  (string-append target "-gcc")
-                                  "gcc"))
+                           (string-append var "=" %output "/" dir))))
+         (list (string-append "CC=" ,(cc-for-target))
                (prefix-dir "SBINDIR" "sbin/")
                (prefix-dir "ETCDIR" "etc/")
                (prefix-dir "MANDIR" "share/man/")))
diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm
index fa0b22cd9c..a19ec44026 100644
--- a/gnu/packages/mail.scm
+++ b/gnu/packages/mail.scm
@@ -2697,10 +2697,7 @@ operators and scripters.")
     (build-system gnu-build-system)
     (arguments
      `(#:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))))
+       (list (string-append "CC=" ,(cc-for-target)))
        #:configure-flags (list (string-append "--with-ssl-include-dir="
                                               (assoc-ref %build-inputs "openssl")
                                               "/include/openssl")
diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm
index 89edcae43e..9f75d32fa6 100644
--- a/gnu/packages/music.scm
+++ b/gnu/packages/music.scm
@@ -4886,11 +4886,7 @@ and reverb.")
     (arguments
      `(#:make-flags
        (list
-         (string-append "CC="
-                        (if ,(%current-target-system)
-                          (string-append (assoc-ref %build-inputs "cross-gcc")
-                                         "/bin/" ,(%current-target-system) "-gcc")
-                          "gcc"))
+         (string-append "CC=" ,(cc-for-target))
          "BUILD_MODULES=\"lv2 ladspa jack\"" "VST_UI=0"
          (string-append "PREFIX=" (assoc-ref %outputs "out"))
          (string-append "ETC_PATH=" (assoc-ref %outputs "out") "/etc"))
diff --git a/gnu/packages/radio.scm b/gnu/packages/radio.scm
index f5dbbf7838..2b27d03cb4 100644
--- a/gnu/packages/radio.scm
+++ b/gnu/packages/radio.scm
@@ -1017,11 +1017,8 @@ gain and standing wave ratio.")
     (arguments
      `(#:test-target "test"
        #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               "BLADERF=no"))
+       (list (string-append "CC=" ,(cc-for-target))
+             "BLADERF=no")
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)
diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
index 5cabb40eb0..bb21c13ad0 100644
--- a/gnu/packages/suckless.scm
+++ b/gnu/packages/suckless.scm
@@ -46,6 +46,7 @@
   #:use-module (guix download)
   #:use-module (guix git-download)
   #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix utils)
   #:use-module (guix packages))
 
 (define-public blind
@@ -62,12 +63,8 @@
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f                      ; no check target
-       #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "PREFIX=" %output)))
+       #:make-flags (list (string-append "CC=" ,(cc-for-target))
+                          (string-append "PREFIX=" %output))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure))))         ; no configure script
@@ -152,14 +149,11 @@ optimising the environment for the application in use and the task performed.")
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "PREFIX=" %output)
-               (string-append "FREETYPEINC="
-                              (assoc-ref %build-inputs "freetype")
-                              "/include/freetype2")))
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output)
+             (string-append "FREETYPEINC="
+                            (assoc-ref %build-inputs "freetype")
+                            "/include/freetype2"))
        #:phases
        (modify-phases %standard-phases (delete 'configure))))
     (inputs
@@ -190,11 +184,8 @@ numbers of user-defined menu items efficiently.")
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "PREFIX=" %output)))))
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output))))
     (inputs
      `(("libx11" ,libx11)
        ("libxkbfile" ,libxkbfile)
@@ -221,11 +212,8 @@ numbers of user-defined menu items efficiently.")
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "PREFIX=" %output)))
+       (list (string-append "CC=" ,(cc-for-target)
+                            (string-append "PREFIX=" %output)))
        #:phases (modify-phases %standard-phases (delete 'configure))))
     (inputs
      `(("libx11" ,libx11)
@@ -253,11 +241,8 @@ numbers of user-defined menu items efficiently.")
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "PREFIX=" %output)))
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)
@@ -298,11 +283,8 @@ drawing.")
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "PREFIX=" %output)))
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)
@@ -347,14 +329,11 @@ point surf to another URI by setting its XProperties.")
                   (delete 'configure))  ; no configuration
        #:tests? #f                      ; no test suite
        #:make-flags
-       (let ((target ,(%current-target-system))
-             (pkg-config (lambda (flag)
+       (let ((pkg-config (lambda (flag)
                            (string-append
                             "$(shell pkg-config " flag " "
                             "xft fontconfig x11 libpng)"))))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
+         (list (string-append "CC=" ,(cc-for-target))
                (string-append "PREFIX=" %output)
                (string-append "INCS=-I. " (pkg-config "--cflags"))
                (string-append "LIBS=" (pkg-config "--libs") " -lm")))))
@@ -390,11 +369,8 @@ few minutes.")
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "PREFIX=" %output)))))
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output))))
     (inputs
      `(("libx11" ,libx11)))
     (home-page "https://git.2f30.org/xbattmon/")
@@ -452,11 +428,8 @@ drivers capable of injecting packets in wireless networks.")
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "PREFIX=" %output)))
+       (list (string-append "CC=" ,(cc-for-target)
+                            (string-append "PREFIX=" %output)))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure))))         ; no configure script
@@ -484,11 +457,8 @@ left.")
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "PREFIX=" %output)))
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure))))         ; no configure script
@@ -514,11 +484,8 @@ left.")
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "PREFIX=" %output)))
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure))))         ; no configure script
@@ -550,11 +517,8 @@ cups server to be installed.")
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "PREFIX=" %output)))
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure)            ; no configure script
@@ -588,11 +552,8 @@ cups server to be installed.")
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "PREFIX=" %output)))
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure))))         ; no configure script
@@ -621,11 +582,8 @@ environment variable.")
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "PREFIX=" %output)))
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure))))         ; no configure script
@@ -666,11 +624,8 @@ initially intended to be used on musl-based Linux distributions.
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "PREFIX=" %output)))
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure))))         ; no configure script
@@ -707,11 +662,8 @@ colormap to stdout.")
       (arguments
        `(#:tests? #f                    ; no tests
          #:make-flags
-         (let ((target ,(%current-target-system)))
-           (list (string-append "CC=" (if target
-                                          (string-append target "-gcc")
-                                          "gcc"))
-                 (string-append "PREFIX=" %output)))
+         (list (string-append "CC=" ,(cc-for-target))
+                 (string-append "PREFIX=" %output))
          #:phases
          (modify-phases %standard-phases
            (delete 'configure))))       ; no configure script
@@ -756,11 +708,8 @@ as -1, to be used instead of U+FFFD.
       (arguments
        `(#:test-target "test"
          #:make-flags
-         (let ((target ,(%current-target-system)))
-           (list (string-append "CC=" (if target
-                                          (string-append target "-gcc")
-                                          "gcc"))
-                 (string-append "PREFIX=" %output)))
+         (list (string-append "CC=" ,(cc-for-target))
+               (string-append "PREFIX=" %output))
          #:phases
          (modify-phases %standard-phases
            (delete 'configure)          ; no configure script
@@ -805,11 +754,8 @@ chat output in the background.")
     (arguments
      `(#:tests? #f                      ; no tests
        #:make-flags
-       (let ((target ,(%current-target-system)))
-         (list (string-append "CC=" (if target
-                                        (string-append target "-gcc")
-                                        "gcc"))
-               (string-append "PREFIX=" %output)))
+       (list (string-append "CC=" ,(cc-for-target))
+             (string-append "PREFIX=" %output))
        #:phases
        (modify-phases %standard-phases
          (delete 'configure))))         ; no configure script
-- 
2.26.2





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [bug#41579] [PATCH 1/2] utils: Add 'cc-for-target'.
  2020-05-28 17:13 ` [bug#41579] [PATCH 1/2] utils: Add 'cc-for-target' Marius Bakke
  2020-05-28 17:13   ` [bug#41579] [PATCH 2/2] gnu: Use 'cc-for-target' instead of custom implementations Marius Bakke
@ 2020-05-28 18:04   ` Tobias Geerinckx-Rice via Guix-patches via
  1 sibling, 0 replies; 6+ messages in thread
From: Tobias Geerinckx-Rice via Guix-patches via @ 2020-05-28 18:04 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 41579

[-- Attachment #1: Type: text/plain, Size: 219 bytes --]

Marius,

Marius Bakke 写道:
> * guix/utils.scm (cc-for-target): New procedure.

Yes please!

I didn't review the package changes but know in my heart that 
you've tested them all.

Kind regards,

T G-R

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [bug#41579] [PATCH 0/2] Introduce 'cc-for-target'.
  2020-05-28 17:11 [bug#41579] [PATCH 0/2] Introduce 'cc-for-target' Marius Bakke
  2020-05-28 17:13 ` [bug#41579] [PATCH 1/2] utils: Add 'cc-for-target' Marius Bakke
@ 2020-05-28 18:43 ` Mathieu Othacehe
  2020-05-29 13:58   ` bug#41579: " Marius Bakke
  1 sibling, 1 reply; 6+ messages in thread
From: Mathieu Othacehe @ 2020-05-28 18:43 UTC (permalink / raw)
  To: Marius Bakke; +Cc: 41579


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.

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

Thanks,

Mathieu

[1]: https://lists.gnu.org/archive/html/guix-patches/2020-05/msg00423.html




^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#41579: [PATCH 0/2] Introduce 'cc-for-target'.
  2020-05-28 18:43 ` [bug#41579] [PATCH 0/2] Introduce 'cc-for-target' Mathieu Othacehe
@ 2020-05-29 13:58   ` Marius Bakke
  0 siblings, 0 replies; 6+ messages in thread
From: Marius Bakke @ 2020-05-29 13:58 UTC (permalink / raw)
  To: Mathieu Othacehe; +Cc: 41579-done

[-- Attachment #1: Type: text/plain, Size: 778 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-29 14:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-28 17:11 [bug#41579] [PATCH 0/2] Introduce 'cc-for-target' Marius Bakke
2020-05-28 17:13 ` [bug#41579] [PATCH 1/2] utils: Add 'cc-for-target' Marius Bakke
2020-05-28 17:13   ` [bug#41579] [PATCH 2/2] gnu: Use 'cc-for-target' instead of custom implementations Marius Bakke
2020-05-28 18:04   ` [bug#41579] [PATCH 1/2] utils: Add 'cc-for-target' Tobias Geerinckx-Rice via Guix-patches via
2020-05-28 18:43 ` [bug#41579] [PATCH 0/2] Introduce 'cc-for-target' Mathieu Othacehe
2020-05-29 13:58   ` bug#41579: " Marius Bakke

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).