From patchwork Wed Oct 2 09:59:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Othacehe X-Patchwork-Id: 15562 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 0AA741749F; Wed, 2 Oct 2019 11:01:11 +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 84DB31749E for ; Wed, 2 Oct 2019 11:01:09 +0100 (BST) Received: from localhost ([::1]:53148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFbRU-0004KK-G6 for patchwork@mira.cbaines.net; Wed, 02 Oct 2019 06:01:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51195) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFbQf-0003sp-V0 for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFbQe-0000F8-QN for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:17 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54928) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iFbQe-0000EM-MV for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:16 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iFbQe-0000b4-JO for guix-patches@gnu.org; Wed, 02 Oct 2019 06:00:16 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#36477] [PATCH v4 19/23] utils: Use target-aarch64? and target-arm? helpers. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 02 Oct 2019 10:00: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 Cc: Mathieu Othacehe Received: via spool by 36477-submit@debbugs.gnu.org id=B36477.15700104012018 (code B ref 36477); Wed, 02 Oct 2019 10:00:16 +0000 Received: (at 36477) by debbugs.gnu.org; 2 Oct 2019 10:00:01 +0000 Received: from localhost ([127.0.0.1]:35488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFbQO-0000WO-Kg for submit@debbugs.gnu.org; Wed, 02 Oct 2019 06:00:00 -0400 Received: from mail-wr1-f53.google.com ([209.85.221.53]:45909) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iFbQE-0000UH-9e for 36477@debbugs.gnu.org; Wed, 02 Oct 2019 05:59:51 -0400 Received: by mail-wr1-f53.google.com with SMTP id r5so18858700wrm.12 for <36477@debbugs.gnu.org>; Wed, 02 Oct 2019 02:59:50 -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=Z32VsnVCIp4SlMoUBOL6TJuR/uSgqcuRy8t1NNgMBhc=; b=DRNitoTKngABm8MDI6W63ie2510dL1thh9L7xi3tLkPzDNSktOlE6wB4N2Z03yICAR FTTbSE8witKApY0qucoLoeB8ALNQixqSXv/UYmj+dA3PxlZR87lPC+ynv6zW/71xDs6C 25ax+w0XSA592JhLqTqcLAJAH8XbJVtFRNoh5NsRJ3Udw9YlMr8ASXDvdWZ77cjazJnu KGQOyKVf6irbwPpXJMHEVwbdPOzT7R09BomLQO9pmJNMilyQOQlFd1IrJY2WOsgCsWzt az4710szRi2NeEryvWagxgOOHSwwXvO9xR+C7fo61mMFv1CWWFkSIj928vcjGMBuljfp EfqA== 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=Z32VsnVCIp4SlMoUBOL6TJuR/uSgqcuRy8t1NNgMBhc=; b=PoDBwYdBKFSkJgUcG1t6QF/kO/IppT3REkhwAi7IRGza/Vn6Fuk+g947kg+S9YgrH+ IJfSECIF79dx5W1GCwAyxasHo6c7n3KVLRzwrti3z63V6qxn/KG+gK491AqUmzTPYDSX 3AsAJIhtWXQsHjkfdIewDE7U72tCoVX/8fNp/kQV0iunRR5G1/7+tUOFJHQf1WqUxtHB 6WDZhY/CTPoKA8ej17jDhP3X6XxMOj4EI3l03hsJB/3iOS1pChYONlqRtOfL2KfYKMbf 0i82th0L6xrsOP0a1++lN92klxx/oJgl4L04BGXljUYHKygQyVdq3ehJpht9FiiCj+Y+ ezsA== X-Gm-Message-State: APjAAAWecCawXtwpkS/k12uNGBn9ytFNUqnShTazsokCjz7ZAMEr/9LM nUWSoagrJonhtYSE8Byc6HPP+WUz X-Google-Smtp-Source: APXvYqxXWKq73HoAvMsMoB4mXIzpiRcqaqYUL8dcdKI+HpC/iJXwlLXzxTKqO0fDaxQW8Es9D/eqJw== X-Received: by 2002:a5d:6885:: with SMTP id h5mr2037367wru.92.1570010384403; Wed, 02 Oct 2019 02:59:44 -0700 (PDT) Received: from localhost.localdomain ([2a01:e0a:fa:a50:21e:67ff:fe5b:4283]) by smtp.gmail.com with ESMTPSA id w12sm29621318wrg.47.2019.10.02.02.59.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Oct 2019 02:59:43 -0700 (PDT) From: Mathieu Othacehe Date: Wed, 2 Oct 2019 11:59:00 +0200 Message-Id: <20191002095904.6325-20-m.othacehe@gmail.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191002095904.6325-1-m.othacehe@gmail.com> References: <20191002095904.6325-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: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * guix/utils.scm (target-aarch64?, 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 1f99c5b3f5..c9236ad165 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -78,6 +78,8 @@ package-name->name+version target-mingw? target-arm32? + target-aarch64? + target-arm? target-64bit? version-compare version>? @@ -494,6 +496,12 @@ a character other than '@'." (define (target-arm32?) (string-prefix? "arm" (or (%current-target-system) (%current-system)))) +(define (target-aarch64?) + (string-prefix? "aarch64" (or (%current-target-system) (%current-system)))) + +(define (target-arm?) + (or (target-arm32?) (target-aarch64?))) + (define (target-64bit?) (let ((system (or (%current-target-system) (%current-system)))) (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "ppc64"))))