From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id SM2cG136ImRQQQAASxT56A (envelope-from ) for ; Tue, 28 Mar 2023 16:31:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id AP6BG136ImRSrAAA9RJhRA (envelope-from ) for ; Tue, 28 Mar 2023 16:31:57 +0200 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 2099F3763 for ; Tue, 28 Mar 2023 16:31:57 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=gR4a+ZVe; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680013917; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=hhAyms358SzPPIl8vdelyJAJ/0QIdY9qWuz8Oa/4akE=; b=QUA/DQF1z5gIc0xMQYYz5RWN6WVFEPVt+z2GJL+LJySvmYC6KW2y1WfBTz3U/NcwuLqV+e JWXfrJzXsZqm7DaTYydi0ie7ITNbf95ki0YkNaMDNCV19MEMlCSN5tzNqPIXjIkp9x6lq8 4626fmSy2IHsujfc6vclAxdE6jM/vBmK7qfM8gQNVMz3AcajB/5KHiQcuIC8Xnip294lWn sF++Vp1QgWYYJ/Chym2TixtiPcVJ1Re7KDjnnwW60OfmKmA5274ljRCluT27CbK9wrEbkl qY88OZiZc3LPu5GlmJIh+91JiDl9qYimGk75ehe9RRNWoWLtwKambiIdXBOmNg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680013917; a=rsa-sha256; cv=none; b=JCvt8VMv0fw//uHypm+28uKY4XZIZM7pWQKHa8pfrcCDivSaTp0WzV9RyXx7Q2OLPTbPlJ gowzemzGUDuPfGzEQPwQ6K3yhaSocHuzAuDIOUvrCOVmdoqvJhHWwtnljaMDEGTPD5lomC +UiXjXoktUCWkjk0cmApBq4MH3g75VkqE2hQNWErzMmFrlrwfk8g0NgB4bAXVaxpRfdn3I SFJ1pF5hqP+geaH8RUgbiv98lx++1IByZFQ8Fw/rfDFmedPtF7xHI4HBdVT4kxejwjCKt6 WAXZy7keTAUoovutsfYieianYS92cBMVj66xejz+yUTFIv5Wk+ci8rXVw5ILOA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=gR4a+ZVe; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org 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 Content-Transfer-Encoding: 8bit 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: X-Migadu-Queue-Id: 2099F3763 X-Spam-Score: -2.03 X-Migadu-Spam-Score: -2.03 X-Migadu-Scanner: scn0.migadu.com List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-TUID: G+OZTOTg6TN2 * 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." -- 2.39.2