From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uCYhGaV+t2KnAAEAbAwnHQ (envelope-from ) for ; Sat, 25 Jun 2022 23:31:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GCdOGKV+t2K2dAEAG6o9tA (envelope-from ) for ; Sat, 25 Jun 2022 23:31:17 +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 E376A361B2 for ; Sat, 25 Jun 2022 23:31:16 +0200 (CEST) Received: from localhost ([::1]:37658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o5DN6-0000bY-2K for larch@yhetil.org; Sat, 25 Jun 2022 17:31:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5DMt-0000b9-2E for guix-patches@gnu.org; Sat, 25 Jun 2022 17:31:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52420) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o5DMs-0000Qt-QD for guix-patches@gnu.org; Sat, 25 Jun 2022 17:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o5DMs-0004Zj-Hh for guix-patches@gnu.org; Sat, 25 Jun 2022 17:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56224] [PATCH] guix: utils: Add as-for-target. Resent-From: Antero Mejr Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 25 Jun 2022 21:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56224 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56224@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165619266117576 (code B ref -1); Sat, 25 Jun 2022 21:31:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Jun 2022 21:31:01 +0000 Received: from localhost ([127.0.0.1]:46317 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5DMq-0004ZP-Gw for submit@debbugs.gnu.org; Sat, 25 Jun 2022 17:31:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:45134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o5DMk-0004ZB-AV for submit@debbugs.gnu.org; Sat, 25 Jun 2022 17:30:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51366) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o5DMk-0000aX-43 for guix-patches@gnu.org; Sat, 25 Jun 2022 17:30:54 -0400 Received: from mout-p-202.mailbox.org ([2001:67c:2050:0:465::202]:47548) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1o5DMg-0000QI-9j for guix-patches@gnu.org; Sat, 25 Jun 2022 17:30:53 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4LVnGV4R4kz9sRs for ; Sat, 25 Jun 2022 23:30:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1656192642; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iT8MM4LjTt7tOGJwJXDfuvBnCIUbb5ZPSkgHGywDpQs=; b=f4FpHGqqscqRBx03SpVowOWtJkKVSuBjGR2DJ6NkI7P/lzYYTUEkfHRPFYOwpDsy2q3Vdv G6nb//qrkKgdT/gtDohpDmwc5n16ZOjy5b7NVvd3ovimETto0ekNxHjMRoeywZ4qyWc+9H jgkAO+DB/7AeBVngmNZH2SuKv+9V6UbKL6LVozun1w6A86+9+TXhoUR5ppCEkUWbfaOgrx B3uUTOQO2HPUjyXBvs0WICmo7Jwe5BN3LSJG+9fMqMz0fidpVIbros0FIo+RaY/mi7yu2k 7B4n8GEh3oUfRmrzTRYLlFGo+GxO8TuaQP9EagAs8zlj2Z3+pMd2mla/OVgHzA== Date: Sat, 25 Jun 2022 21:30:32 +0000 Message-Id: <20220625213032.2043-1-antero@mailbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MBO-RS-META: miny67rc6cxj5m9rm68icgcyfu8iw6gz X-MBO-RS-ID: c5f6e5f7c6f1240e19f X-Rspamd-Queue-Id: 4LVnGV4R4kz9sRs Received-SPF: pass client-ip=2001:67c:2050:0:465::202; envelope-from=antero@mailbox.org; helo=mout-p-202.mailbox.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Antero Mejr X-ACL-Warn: , Antero Mejr via Guix-patches From: Antero Mejr via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1656192677; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=iT8MM4LjTt7tOGJwJXDfuvBnCIUbb5ZPSkgHGywDpQs=; b=m/wEiLalkTKP3D36+cZpkenJFxgScCtVPDmN/r51J4qHT2UV3/PAcYnS0uBIiACj8FJZyC QqwcBtEIu/G6weBLNfaZcU1Jnu3TyIA9CXaaw4w/Sw2F0sH7JlzgnankhjYOc2EfQDscqp blCRLlISRKqYFBgYxFIAUkCEQhtUqBY///qJ/clTMtF/b8opqjHNHmofOHGLPiqAlsMAKi ZOjCVn2dEBBlLvWkjI4kqN/D25B5Teu2BPSEX6nmvdZwGusPL5iQdVsswPllt1utdgD8V4 ot8iLKF6ZHnaDlNEuJyzzMu7ss3LUF/XUHRaF2QmwimiMbb6P+6nMepRBOqhiw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656192677; a=rsa-sha256; cv=none; b=OacqwD4DoS6d1TRGiis2x5R/zMx9/skKQT4qVaknpvgge5F7WW151waJxfGVrBbIrK9Bt7 aYSvcjh42bnLlWIiWOHH3PEFAzWxnUbWA9vQJ3SbNTzE6QIdmSm55TQtUSKnGOEATipF4U WlC6xyFYxIZe6qL4dwYDk8RrVL+sCAbFw/AEdQaoEAbFOcFQN20faoBuFx2gJfLiUvACUB NrhP6sxvZMgpirmbrtZbArNAFnopr9D8D5UjhO/xwf8f8D3akMINCGWi2IKYGFtyMdQgPq VS55005Umu1kvvUDJnBEaInpSF6Yxqd21m/ipzGLVTcy4BMj+K208g7N4U1L4Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=f4FpHGqq; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Spam-Score: -2.76 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b=f4FpHGqq; dmarc=pass (policy=none) header.from=gnu.org; 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" X-Migadu-Queue-Id: E376A361B2 X-Spam-Score: -2.76 X-Migadu-Scanner: scn0.migadu.com X-TUID: HdrLMYYTxi4M * guix/utils.scm (as-for-target): New function. --- guix/utils.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/guix/utils.scm b/guix/utils.scm index 745da98a79..4cfa9d863f 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2018 Steve Sprang ;;; Copyright © 2022 Taiju HIGASHI ;;; Copyright © 2022 Denis 'GNUtoo' Carikli +;;; Copyright © 2022 Antero Mejr ;;; ;;; This file is part of GNU Guix. ;;; @@ -103,6 +104,7 @@ (define-module (guix utils) target-riscv64? target-64bit? ar-for-target + as-for-target cc-for-target cxx-for-target ld-for-target @@ -742,6 +744,11 @@ (define* (ar-for-target #:optional (target (%current-target-system))) (string-append target "-ar") "ar")) +(define* (as-for-target #:optional (target (%current-target-system))) + (if target + (string-append target "-as") + "as")) + (define* (cc-for-target #:optional (target (%current-target-system))) (if target (string-append target "-gcc") -- 2.36.1