From unknown Mon Aug 18 00:06:53 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#41579 <41579@debbugs.gnu.org> To: bug#41579 <41579@debbugs.gnu.org> Subject: Status: [PATCH 0/2] Introduce 'cc-for-target'. Reply-To: bug#41579 <41579@debbugs.gnu.org> Date: Mon, 18 Aug 2025 07:06:53 +0000 retitle 41579 [PATCH 0/2] Introduce 'cc-for-target'. reassign 41579 guix-patches submitter 41579 Marius Bakke severity 41579 normal tag 41579 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu May 28 13:11:45 2020 Received: (at submit) by debbugs.gnu.org; 28 May 2020 17:11:45 +0000 Received: from localhost ([127.0.0.1]:52944 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeM4H-0006Vr-Gz for submit@debbugs.gnu.org; Thu, 28 May 2020 13:11:45 -0400 Received: from lists.gnu.org ([209.51.188.17]:40822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeM4G-0006Vk-25 for submit@debbugs.gnu.org; Thu, 28 May 2020 13:11:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeM4F-0006gh-Ta for guix-patches@gnu.org; Thu, 28 May 2020 13:11:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37248) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeM4F-0001qW-L9 for guix-patches@gnu.org; Thu, 28 May 2020 13:11:43 -0400 Received: from ti0006q161-2604.bb.online.no ([84.202.68.75]:41846 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jeM4C-0001yf-Ep for guix-patches@gnu.org; Thu, 28 May 2020 13:11:41 -0400 From: Marius Bakke To: guix-patches@gnu.org Subject: [PATCH 0/2] Introduce 'cc-for-target'. Date: Thu, 28 May 2020 19:11:37 +0200 Message-Id: <20200528171137.29146-1-marius@gnu.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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 From debbugs-submit-bounces@debbugs.gnu.org Thu May 28 13:13:19 2020 Received: (at 41579) by debbugs.gnu.org; 28 May 2020 17:13:19 +0000 Received: from localhost ([127.0.0.1]:52949 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeM5m-0006Ys-Rz for submit@debbugs.gnu.org; Thu, 28 May 2020 13:13:19 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40938) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeM5l-0006Yc-QS for 41579@debbugs.gnu.org; Thu, 28 May 2020 13:13:18 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37316) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeM5g-0002m0-KI for 41579@debbugs.gnu.org; Thu, 28 May 2020 13:13:12 -0400 Received: from ti0006q161-2604.bb.online.no ([84.202.68.75]:42596 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jeM5f-0002Gr-Hp for 41579@debbugs.gnu.org; Thu, 28 May 2020 13:13:12 -0400 From: Marius Bakke To: 41579@debbugs.gnu.org Subject: [PATCH 1/2] utils: Add 'cc-for-target'. Date: Thu, 28 May 2020 19:13:08 +0200 Message-Id: <20200528171309.29346-1-marius@gnu.org> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41579 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * 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 ;;; Copyright © 2015 David Thompson ;;; Copyright © 2017 Mathieu Othacehe -;;; Copyright © 2018 Marius Bakke +;;; Copyright © 2018, 2020 Marius Bakke ;;; ;;; 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 From debbugs-submit-bounces@debbugs.gnu.org Thu May 28 13:13:24 2020 Received: (at 41579) by debbugs.gnu.org; 28 May 2020 17:13:24 +0000 Received: from localhost ([127.0.0.1]:52952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeM5r-0006Z8-4G for submit@debbugs.gnu.org; Thu, 28 May 2020 13:13:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeM5o-0006Yh-4s for 41579@debbugs.gnu.org; Thu, 28 May 2020 13:13:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37318) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeM5i-0002mg-VK for 41579@debbugs.gnu.org; Thu, 28 May 2020 13:13:14 -0400 Received: from ti0006q161-2604.bb.online.no ([84.202.68.75]:42622 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jeM5i-0002HT-Bm for 41579@debbugs.gnu.org; Thu, 28 May 2020 13:13:14 -0400 From: Marius Bakke To: 41579@debbugs.gnu.org Subject: [PATCH 2/2] gnu: Use 'cc-for-target' instead of custom implementations. Date: Thu, 28 May 2020 19:13:09 +0200 Message-Id: <20200528171309.29346-2-marius@gnu.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200528171309.29346-1-marius@gnu.org> References: <20200528171309.29346-1-marius@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41579 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * 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 From debbugs-submit-bounces@debbugs.gnu.org Thu May 28 14:04:33 2020 Received: (at 41579) by debbugs.gnu.org; 28 May 2020 18:04:33 +0000 Received: from localhost ([127.0.0.1]:53001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeMtN-0007pl-8V for submit@debbugs.gnu.org; Thu, 28 May 2020 14:04:33 -0400 Received: from tobias.gr ([80.241.217.52]:39648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeMtL-0007pd-OX for 41579@debbugs.gnu.org; Thu, 28 May 2020 14:04:32 -0400 Received: by tobias.gr (OpenSMTPD) with ESMTP id 1db650ef; Thu, 28 May 2020 18:04:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tobias.gr; h=from:to:cc :subject:references:in-reply-to:date:message-id:mime-version :content-type; s=2018; i=me@tobias.gr; bh=1fneEaFl//EN614DGQTXi6 048VzEQJAIHpeguM6xR/Q=; b=GdVIyvhS0aC4vmSReZO3fm4pZJu7eTem+zZ54V LMGvgHKc0OLJNj3ZDRsOzz9UoxMytZ/AQIU9kLfVcFvRhZCi7AIF4Di0+dqGJEP8 dQal0GE88A/eofwFzaNI8JE3Np0UaHyiur339Vygx52GaLjJvPkwOvrEeUe3oVgf XvICb7d5etNg2Rb1GhCI2uUoUeI5PTvoMM817utmOu3tHRs6bS6Ar1gIAwiLttXG i7Lww5fBi7UUM9ZryCzLNKsZOCDWMN19G7kraUOqW0GScwA6C4lx9i3R/+8TIVQs mFd/IHzcJzEAvYoHSQ3+54NHt+BXKIiH2760Y3CyDN9GR2gg== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id f68f700c (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Thu, 28 May 2020 18:04:32 +0000 (UTC) From: Tobias Geerinckx-Rice To: Marius Bakke Subject: Re: [bug#41579] [PATCH 1/2] utils: Add 'cc-for-target'. References: <20200528171137.29146-1-marius@gnu.org> <20200528171309.29346-1-marius@gnu.org> In-reply-to: <20200528171309.29346-1-marius@gnu.org> Date: Thu, 28 May 2020 20:04:29 +0200 Message-ID: <87367k3phu.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41579 Cc: 41579@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Marius, Marius Bakke =E5=86=99=E9=81=93=EF=BC=9A > * guix/utils.scm (cc-for-target): New procedure. Yes please! I didn't review the package changes but know in my heart that=20 you've tested them all. Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXs/9LQAKCRANsP+IT1Vt eTktAP9AqVczZBKx2MVGTWfNOAEHLaecIFRrxEl3Djp8dHSJqgEAsra42kw2ZoNF 8lHSZ4lvXFg46B6IPMBS2VHRQnCSwQY= =g8TS -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu May 28 14:43:55 2020 Received: (at 41579) by debbugs.gnu.org; 28 May 2020 18:43:55 +0000 Received: from localhost ([127.0.0.1]:53031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeNVT-0000K4-HO for submit@debbugs.gnu.org; Thu, 28 May 2020 14:43:55 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jeNVR-0000Jp-Gp for 41579@debbugs.gnu.org; Thu, 28 May 2020 14:43:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38885) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeNVM-0006dh-7v for 41579@debbugs.gnu.org; Thu, 28 May 2020 14:43:48 -0400 Received: from [2a01:e0a:fa:a50:9d06:5008:a301:87e5] (port=33690 helo=meru) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jeNVK-00089E-RF; Thu, 28 May 2020 14:43:47 -0400 From: Mathieu Othacehe To: Marius Bakke Subject: Re: [bug#41579] [PATCH 0/2] Introduce 'cc-for-target'. References: <20200528171137.29146-1-marius@gnu.org> Date: Thu, 28 May 2020 20:43:44 +0200 In-Reply-To: <20200528171137.29146-1-marius@gnu.org> (Marius Bakke's message of "Thu, 28 May 2020 19:11:37 +0200") Message-ID: <87eer3zyqn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41579 Cc: 41579@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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 From debbugs-submit-bounces@debbugs.gnu.org Fri May 29 09:58:33 2020 Received: (at 41579-done) by debbugs.gnu.org; 29 May 2020 13:58:33 +0000 Received: from localhost ([127.0.0.1]:55686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jefWr-00047K-AF for submit@debbugs.gnu.org; Fri, 29 May 2020 09:58:33 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45206) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jefWq-000476-68 for 41579-done@debbugs.gnu.org; Fri, 29 May 2020 09:58:32 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:39251) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jefWk-0006Sb-QH for 41579-done@debbugs.gnu.org; Fri, 29 May 2020 09:58:26 -0400 Received: from ti0006q161-2604.bb.online.no ([84.202.68.75]:57160 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jefWj-0004Tm-4o; Fri, 29 May 2020 09:58:25 -0400 From: Marius Bakke To: Mathieu Othacehe Subject: Re: [bug#41579] [PATCH 0/2] Introduce 'cc-for-target'. In-Reply-To: <87eer3zyqn.fsf@gnu.org> References: <20200528171137.29146-1-marius@gnu.org> <87eer3zyqn.fsf@gnu.org> Date: Fri, 29 May 2020 15:58:22 +0200 Message-ID: <87o8q64zcx.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41579-done Cc: 41579-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Mathieu Othacehe 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! --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAl7RFP4ACgkQoqBt8qM6 VPqudQf/ayvm/6A+MAbs9SJ5+dBWyi8G4m5ddGQ/lhZMY/l0n8J54x6Yz1LxEIzg /EMu4XpSgxIyhmNZsow8k+4jK7d0LBq8zkefmxj3/t6+oNu2tKiqYBnsip46GZ5M V3vNYGGrDCiHjw442jih7HQDNGtibXYnnTA9QJ5chiMwG+gWasCPomoQJDPuFK8H LWEb74ZgvLKv7pXj53HTtqYRnvj1oa7leZN7gXaKez11MYexxpIS9B+Sg4V3fBAi U9xmrD2x8u6lfYQU1YhdzC7KiuNviQozaSy//pg+goWd3PnEhD/POVm0bCbwVNoc /zaiHR/3UC3wYqu1idbOX0Az+Ft+0A== =Usjt -----END PGP SIGNATURE----- --=-=-=-- From unknown Mon Aug 18 00:06:53 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 27 Jun 2020 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator