From patchwork Wed Jul 26 15:37:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Pierre De Jesus DIAZ X-Patchwork-Id: 52193 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 1F1AE27BBE9; Wed, 26 Jul 2023 16:54:22 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,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 81A6C27BBE2 for ; Wed, 26 Jul 2023 16:54:21 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOgb0-0007ZQ-Sz; Wed, 26 Jul 2023 11:38:38 -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 1qOgaW-0007Tr-FO for guix-patches@gnu.org; Wed, 26 Jul 2023 11:38:08 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOgaV-0004qL-QM; Wed, 26 Jul 2023 11:38:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qOgaP-0003yK-W5; Wed, 26 Jul 2023 11:38:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64874] [PATCH] guix: tuned-package: Use target on cross-compile. Resent-From: Jean-Pierre De Jesus DIAZ Original-Sender: "Debbugs-submit" Resent-CC: mail@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Wed, 26 Jul 2023 15:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64874 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64874@debbugs.gnu.org Cc: Jean-Pierre De Jesus DIAZ , mail@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: mail@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr Received: via spool by submit@debbugs.gnu.org id=B.169038587215250 (code B ref -1); Wed, 26 Jul 2023 15:38:01 +0000 Received: (at submit) by debbugs.gnu.org; 26 Jul 2023 15:37:52 +0000 Received: from localhost ([127.0.0.1]:49881 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOgaG-0003xu-1Z for submit@debbugs.gnu.org; Wed, 26 Jul 2023 11:37:52 -0400 Received: from lists.gnu.org ([2001:470:142::17]:58996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOgaC-0003xg-LG for submit@debbugs.gnu.org; Wed, 26 Jul 2023 11:37:49 -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 1qOga5-00077k-Dv for guix-patches@gnu.org; Wed, 26 Jul 2023 11:37:43 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOga3-0004gf-5J for guix-patches@gnu.org; Wed, 26 Jul 2023 11:37:41 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3159d5e409dso838842f8f.0 for ; Wed, 26 Jul 2023 08:37:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundationdevices.com; s=google; t=1690385853; x=1690990653; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=TVgOWdWsXw1xxsq3WDTo/GcgGSoVbMHVqhzrmLCFt0I=; b=GpSKM78apMC1Ir0QqBQt1tm4kdHzOvnN8yoNBfdC+qng1wcr/lICxWdCLcaYnP1EOB aNXFR7b0b+BHBtFxWEwosLsvQ+qzuXgewOmX0/Oa1DPACio+jRbYep1HAzd2Ko2bnxwi 4tnabWwe83h04R7KO/8Jxjg5LIfx7blA/3e1XNirlYht61c76YcEXdXhrp7JGXo445u7 C9kmeGUCg7LSj1NvtJBV0oyQQ687Ig0azF+q+0e2jE+oczrR7mY5JjdGqflYuQ4nRGGf IpR1C0WfjKy6fuPl/WFBeMZsKNC5it6qvA6/mTcxnVyk6lYo4/p1A2viB4HxYuudzIid Ij9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690385853; x=1690990653; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TVgOWdWsXw1xxsq3WDTo/GcgGSoVbMHVqhzrmLCFt0I=; b=OJ5HFIq9/CBNONi2ftpugvReBS/LqhbXmEV0JnO32QEpXrB9k8oQ4bZ54anJuHAisX z+MxW1gMAlUHxhP4uelQjdbl/epQsKxBsg/HyHM5QO0MCNrEb5C8gYbjFUm540xEWMie nJeF+FmQpRrrOUKtluINbvWP3+ltksXrwpmE7ACwfWZivWwTvHBTnna+iciB9BMQf2uT u1hMXEFVPnI73idgaT98IHTlAsDJkcyeqNVTWSr+bETePATaNP3ppqfwQkpI/KN4jogV /B8d1cUH53Yts5i7o00xZp1ICbQI2iU476WJLHnY1+awXayByx9BQ+JQIV2YbWM9HVLY nVeg== X-Gm-Message-State: ABy/qLbT0yATEE8ilXzE3vhLoE6YIreHaXzciQE7+vmBxUlzsYQENUxt 2l5bJOuXFN88KUKsz/j0dsI0X3mlbtNE4cQDvtKq6A== X-Google-Smtp-Source: APBJJlHAl2RF9wiCRDcO1Iw8O0j+U2TIo71tTZ8DlnoZB7d6IRNz05XPO/cQcC1T4pwlbvgXeW2QnA== X-Received: by 2002:adf:e651:0:b0:317:6c3:c94d with SMTP id b17-20020adfe651000000b0031706c3c94dmr2342478wrn.14.1690385853702; Wed, 26 Jul 2023 08:37:33 -0700 (PDT) Received: from omen15.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id s14-20020adfea8e000000b003143be36d99sm20172710wrm.58.2023.07.26.08.37.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 08:37:33 -0700 (PDT) Date: Wed, 26 Jul 2023 17:37:29 +0200 Message-Id: <20230726153729.4147922-1-jean@foundationdevices.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=jean@foundationdevices.com; helo=mail-wr1-x436.google.com 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, RCVD_IN_DNSWL_NONE=-0.0001, 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: , Reply-to: Jean-Pierre De Jesus DIAZ X-ACL-Warn: , Jean-Pierre De Jesus DIAZ via Guix-patches X-Patchwork-Original-From: Jean-Pierre De Jesus DIAZ via Guix-patches via From: Jean-Pierre De Jesus DIAZ 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 * guix/transformations.scm (tuned-package): Use either bag-target if available or bag-system to select the CPU architecture of the package that is going to be tuned. This enables the tuning of cross-compiled packages. Signed-off-by: Jean-Pierre De Jesus DIAZ --- guix/transformations.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) base-commit: cf9904bcc8dd03e73675475bb4d8746dc434e415 diff --git a/guix/transformations.scm b/guix/transformations.scm index 92d9c89c0e..76d0208bf1 100644 --- a/guix/transformations.scm +++ b/guix/transformations.scm @@ -510,8 +510,9 @@ (define (lower* . args) ;; leading to an obscure build error, check whether the compiler is known ;; to support MICRO-ARCHITECTURE. If not, bail out. (let* ((lowered (apply lower args)) - (architecture (match (string-tokenize (bag-system lowered) - %not-hyphen) + (target (or (bag-target lowered) + (bag-system lowered))) + (architecture (match (string-tokenize target %not-hyphen) ((arch _ ...) arch))) (compiler (any (match-lambda ((label (? package? p) . _)