From patchwork Tue Mar 28 14:28:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 48774 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2BC4717132; Tue, 28 Mar 2023 15:32:00 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 1F8D117011 for ; Tue, 28 Mar 2023 15:31:57 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1phAKs-0004dY-Nd; Tue, 28 Mar 2023 10:30:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phAKp-0004cq-Un for guix-patches@gnu.org; Tue, 28 Mar 2023 10:30:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phAKp-0006lE-M4 for guix-patches@gnu.org; Tue, 28 Mar 2023 10:30:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1phAKp-0002a9-3i for guix-patches@gnu.org; Tue, 28 Mar 2023 10:30:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62307] [PATCH core-updates v2 02/20] gnu: cross-base: Use gexps for 'cross-gcc-arguments'. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 28 Mar 2023 14:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62307 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62307@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 62307-submit@debbugs.gnu.org id=B62307.16800137629625 (code B ref 62307); Tue, 28 Mar 2023 14:30:03 +0000 Received: (at 62307) by debbugs.gnu.org; 28 Mar 2023 14:29:22 +0000 Received: from localhost ([127.0.0.1]:50372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phAK9-0002VA-D2 for submit@debbugs.gnu.org; Tue, 28 Mar 2023 10:29:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1phAK6-0002UM-Ug for 62307@debbugs.gnu.org; Tue, 28 Mar 2023 10:29:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1phAK1-0006Nf-NN; Tue, 28 Mar 2023 10:29:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=hhAyms358SzPPIl8vdelyJAJ/0QIdY9qWuz8Oa/4akE=; b=gR4a+ZVerzzlmVBF87Wc EoKuaUVqXKQ76aTj8JgTmRXaxmNNHcfXl2AvTB3Hap1KDMQnYEMEjVlerqXOUtYNqqM5baiJp5+8I PY7jRpsy69eL90j3zSgk2VXzgmN5zu3wNE+pJRN1Sc7mdHJ78r6R0XcRg21D320y0xLFonDXJLFsY lxj5cgf83nctG0ZblUdFfec6irlMMoDX5XVw0/4qJN80/gRCiuQ5N5tOvkiKmQxlBExkzyVCT0m+l hstQchfrMMU2GmorQ1QvcZV2cL9dsUt8WiXhlhNoAyvaB6KFNFM+hksssoXNg2X1FB6SkYg1y4SWL 2FCTNQg9nn/1xQ==; Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1phAK1-00026Y-8c; Tue, 28 Mar 2023 10:29:13 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Tue, 28 Mar 2023 16:28:34 +0200 Message-Id: <20230328142852.26635-3-ludo@gnu.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230328142852.26635-1-ludo@gnu.org> References: <87pm90bzva.fsf_-_@gnu.org> <20230328142852.26635-1-ludo@gnu.org> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/cross-base.scm (cross-gcc-arguments): Switch to gexps. --- gnu/packages/cross-base.scm | 104 ++++++++++++++++++------------------ 1 file changed, 52 insertions(+), 52 deletions(-) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index f86e8005c4..adead3206a 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -147,69 +147,69 @@ (define (cross-gcc-arguments target xgcc libc) ,@(package-arguments xgcc)))) (substitute-keyword-arguments args ((#:configure-flags flags) - `(append (list ,(string-append "--target=" target) - ,@(if libc - `( ;; Disable libcilkrts because it is not - ;; ported to GNU/Hurd. - "--disable-libcilkrts" - ;; When building a cross compiler, --with-sysroot is - ;; implicitly set to "$gcc_tooldir/sys-root". This does - ;; not work for us, because --with-native-system-header-dir - ;; is searched for relative to this location. Thus, we set - ;; it to "/" so GCC is able to find the target libc headers. - ;; This is safe because in practice GCC uses CROSS_CPATH - ;; & co to separate target and host libraries. - "--with-sysroot=/") - `( ;; Disable features not needed at this stage. - "--disable-shared" "--enable-static" - "--enable-languages=c,c++" + #~(append (list #$(string-append "--target=" target) + #$@(if libc + #~( ;; Disable libcilkrts because it is not + ;; ported to GNU/Hurd. + "--disable-libcilkrts" + ;; When building a cross compiler, --with-sysroot is + ;; implicitly set to "$gcc_tooldir/sys-root". This does + ;; not work for us, because --with-native-system-header-dir + ;; is searched for relative to this location. Thus, we set + ;; it to "/" so GCC is able to find the target libc headers. + ;; This is safe because in practice GCC uses CROSS_CPATH + ;; & co to separate target and host libraries. + "--with-sysroot=/") + #~( ;; Disable features not needed at this stage. + "--disable-shared" "--enable-static" + "--enable-languages=c,c++" - ;; libstdc++ cannot be built at this stage - ;; ("Link tests are not allowed after - ;; GCC_NO_EXECUTABLES."). - "--disable-libstdc++-v3" + ;; libstdc++ cannot be built at this stage + ;; ("Link tests are not allowed after + ;; GCC_NO_EXECUTABLES."). + "--disable-libstdc++-v3" - "--disable-threads" ;libgcc, would need libc - "--disable-libatomic" - "--disable-libmudflap" - "--disable-libgomp" - "--disable-libmpx" - "--disable-libssp" - "--disable-libquadmath" - "--disable-decimal-float" ;would need libc - "--disable-libcilkrts" + "--disable-threads" ;libgcc, would need libc + "--disable-libatomic" + "--disable-libmudflap" + "--disable-libgomp" + "--disable-libmpx" + "--disable-libssp" + "--disable-libquadmath" + "--disable-decimal-float" ;would need libc + "--disable-libcilkrts" - ;; When target is any OS other than 'none' these - ;; libraries will fail if there is no libc - ;; present. See - ;; - "--disable-libitm" - "--disable-libvtv" - "--disable-libsanitizer" - )) + ;; When target is any OS other than 'none' these + ;; libraries will fail if there is no libc + ;; present. See + ;; + "--disable-libitm" + "--disable-libvtv" + "--disable-libsanitizer" + )) - ;; Install cross-built libraries such as libgcc_s.so in - ;; the "lib" output. - ,@(if libc - `((string-append "--with-toolexeclibdir=" - (assoc-ref %outputs "lib") - "/" ,target "/lib")) - '())) + ;; Install cross-built libraries such as libgcc_s.so in + ;; the "lib" output. + #$@(if libc + #~((string-append "--with-toolexeclibdir=" + (assoc-ref %outputs "lib") + "/" #$target "/lib")) + #~())) - ,(if libc - flags - `(remove (cut string-match "--enable-languages.*" <>) - ,flags)))) + #$(if libc + flags + #~(remove (cut string-match "--enable-languages.*" <>) + #$flags)))) ((#:make-flags flags) (if libc - `(let ((libc (assoc-ref %build-inputs "libc"))) + #~(let ((libc (assoc-ref %build-inputs "libc"))) ;; FLAGS_FOR_TARGET are needed for the target libraries to receive ;; the -Bxxx for the startfiles. - (cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib") - ,flags)) + (cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib") + #$flags)) flags)) ((#:phases phases) - `(cross-gcc-build-phases ,target ,phases)))))) + #~(cross-gcc-build-phases #$target #$phases)))))) (define (cross-gcc-patches xgcc target) "Return GCC patches needed for XGCC and TARGET."