From patchwork Mon Sep 2 15:33:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 15242 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 8D47017348; Mon, 2 Sep 2019 16:36:49 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 3971217348 for ; Mon, 2 Sep 2019 16:36:49 +0100 (BST) Received: from localhost ([::1]:37632 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oNs-0003sx-F7 for patchwork@mira.cbaines.net; Mon, 02 Sep 2019 11:36:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42844) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i4oMP-0002QG-Tt for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1i4oMO-0004sy-NZ for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:17 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50048) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1i4oMO-0004sb-JI for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:16 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1i4oMO-0006fV-EF for guix-patches@gnu.org; Mon, 02 Sep 2019 11:35:16 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH v3 43/48] utils: Use target-arm64? and target-arm? helpers. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 Sep 2019 15:35:16 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36477 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 36477@debbugs.gnu.org Received: via spool by 36477-submit@debbugs.gnu.org id=B36477.156743849325349 (code B ref 36477); Mon, 02 Sep 2019 15:35:16 +0000 Received: (at 36477) by debbugs.gnu.org; 2 Sep 2019 15:34:53 +0000 Received: from localhost ([127.0.0.1]:58827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4oM1-0006ah-8z for submit@debbugs.gnu.org; Mon, 02 Sep 2019 11:34:53 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]:38139) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1i4oLh-0006WS-5v for 36477@debbugs.gnu.org; Mon, 02 Sep 2019 11:34:33 -0400 Received: by mail-wr1-f50.google.com with SMTP id l11so5631254wrx.5 for <36477@debbugs.gnu.org>; Mon, 02 Sep 2019 08:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tOPPkls69kv9Lkg6E8gEaO9JlsfXS8SFgBkf0UuFSEo=; b=fdr0W0hp1JYlaNe2q6q3tU9OB2zzXTee/0BC9rGMYSj9/1v6ZrbtRoyjxznuM3HyZ/ uD4qrSg1vas2uokBbzPAkbq3eCJbWu9AGqt2KQslX+aorYhx2sjLzOataRzGiR4KUnhg 8HfV3v4fVNONAc13Xhtp5ndG08YK1yp5lhDuUxqKS8Wwpq/uXOkZwxEZWr3twxwV7nXE RzaeenBEcd3Tyak2kpTwZGfvqty6MGDx3gS7sy6H4nN5dJrhyMun/vVBg1WHLmHyYvf2 sjQVOLg/Y00qwK6s6uMQMpQU+ihW8E1heenzs/211rxcrPZCg1+F4fjg0mv3Izzc65tk fhQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tOPPkls69kv9Lkg6E8gEaO9JlsfXS8SFgBkf0UuFSEo=; b=CepLtP4czfCe8ZjJlZE9YmQJsbp4H0eo8C93DAWKboI+Z53u3OebD/wAhHIl5YPKoW 1ZyGg5vCUjpHeWobR6SPyprLBi09M7FHurIEJL1MOsbTb3dV/g0hCVAlCg7vZU+23Y4V Hfaf8VxyEK+bDyD6ketwRHwgsYUZLZEESau01uvXgiaOg949KkDkCr6munvOEVmZz/mF 7jFsmUQLQDs4055Ojm4UaWB/re0ZOuEwUH+hnYjyf+qK4obxogFl7uesrAp90MaHN8qD u82sJa/0XPT3z3OKQK1IZDQYqP8yuQFlPGxLIZA4YW1TKKCnSQcScUra0H9PyZY5zeig ZzLg== X-Gm-Message-State: APjAAAV/K58ut4CkOotDCxzCh5AaN59HY3Os+Rey6AwzP0FczmE6CsNk BP8M4h1ZNl6Y2zq2EAhYur+PbZ6A X-Google-Smtp-Source: APXvYqwJ6cu7RjE/ULKmn37i88y8cEWQj7ZRWKP8NHN6qn+sKUkt8UnvZ9rPyfoJRZFgmtEIHS0sgg== X-Received: by 2002:adf:fad0:: with SMTP id a16mr36527946wrs.195.1567438467492; Mon, 02 Sep 2019 08:34:27 -0700 (PDT) Received: from localhost.localdomain ([80.12.63.115]) by smtp.gmail.com with ESMTPSA id b26sm17232265wmj.14.2019.09.02.08.34.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Sep 2019 08:34:27 -0700 (PDT) From: Mathieu Othacehe Date: Mon, 2 Sep 2019 17:33:28 +0200 Message-Id: <20190902153333.11190-44-m.othacehe@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190902153333.11190-1-m.othacehe@gmail.com> References: <20190902153333.11190-1-m.othacehe@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mathieu Othacehe Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * guix/utils.scm (target-arm64?, target-arm?): New exported procedures. --- guix/utils.scm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/guix/utils.scm b/guix/utils.scm index f480c3291f..3eb156ad4e 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -78,6 +78,8 @@ package-name->name+version target-mingw? target-arm32? + target-arm64? + target-arm? target-64bit? version-compare version>? @@ -493,6 +495,12 @@ a character other than '@'." (define (target-arm32?) (string-prefix? "arm" (or (%current-target-system) (%current-system)))) +(define (target-arm64?) + (string-prefix? "aarch64" (or (%current-target-system) (%current-system)))) + +(define (target-arm?) + (or (target-arm32?) (target-arm64?))) + (define (target-64bit?) (let ((system (or (%current-target-system) (%current-system)))) (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "ppc64"))))