From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 1TTtG5Pxz15xBQAA0tVLHw (envelope-from ) for ; Thu, 28 May 2020 17:14:59 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id MPRGF5Pxz16JYgAA1q6Kng (envelope-from ) for ; Thu, 28 May 2020 17:14:59 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EE5539400C3 for ; Thu, 28 May 2020 17:14:58 +0000 (UTC) Received: from localhost ([::1]:43998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeM7N-0000nk-Vk for larch@yhetil.org; Thu, 28 May 2020 13:14:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48414) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeM6V-0008AR-AQ for guix-patches@gnu.org; Thu, 28 May 2020 13:14:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41407) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jeM6V-00034B-1d for guix-patches@gnu.org; Thu, 28 May 2020 13:14:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jeM6U-0006aD-Tg for guix-patches@gnu.org; Thu, 28 May 2020 13:14:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41579] [PATCH 2/2] gnu: Use 'cc-for-target' instead of custom implementations. Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 28 May 2020 17:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41579 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41579@debbugs.gnu.org Received: via spool by 41579-submit@debbugs.gnu.org id=B41579.159068600425247 (code B ref 41579); Thu, 28 May 2020 17:14:02 +0000 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 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 3.99 X-TUID: ehzi0zsk8kJo * 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