From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 CKmBMVjAb2KjTgAAbAwnHQ (envelope-from ) for ; Mon, 02 May 2022 13:28:24 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id cC13MVjAb2ILqAAA9RJhRA (envelope-from ) for ; Mon, 02 May 2022 13:28:24 +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 68601453C9 for ; Mon, 2 May 2022 13:28:24 +0200 (CEST) Received: from localhost ([::1]:39182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlUE3-0006ku-HX for larch@yhetil.org; Mon, 02 May 2022 07:28:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlU42-0000Ez-UR for guix-patches@gnu.org; Mon, 02 May 2022 07:18:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41103) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlU42-0005Pd-Du for guix-patches@gnu.org; Mon, 02 May 2022 07:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlU42-0005eX-5x for guix-patches@gnu.org; Mon, 02 May 2022 07:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55220] [PATCH 0/4] Add --list-systems and --list-targets options. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 May 2022 11:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55220 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55220@debbugs.gnu.org Cc: Mathieu Othacehe X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165149025421669 (code B ref -1); Mon, 02 May 2022 11:18:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 May 2022 11:17:34 +0000 Received: from localhost ([127.0.0.1]:34994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlU3a-0005dK-Dk for submit@debbugs.gnu.org; Mon, 02 May 2022 07:17:34 -0400 Received: from lists.gnu.org ([209.51.188.17]:53326) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlU3V-0005Ye-6c for submit@debbugs.gnu.org; Mon, 02 May 2022 07:17:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlU3U-0006pG-W5 for guix-patches@gnu.org; Mon, 02 May 2022 07:17:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:54116) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlU3U-0005M3-MU for guix-patches@gnu.org; Mon, 02 May 2022 07:17:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:Subject:To:From:in-reply-to: references; bh=iQH5HxaJB5BGYHtxdU+qLWqTMZdpS/0ImMp1K1NABGI=; b=ZnwvtIproNRZ+t tvKcQ4s4xB0GsTbM3GuJy/CY6HrJ8MfZ+XoXD6mRhR689/RtS/DuiTXhSDNHSgsbbY/3+SG08shuX FShzl0ig1Czks2NkuImGfGNvTjcm9xYXxCWIeIPMTH/JnDHjDsUGSd3L2qEkeRDke0uFpFTp7S1mS ENYxANMcXX+hbWLTjy4gzzEsgUkZIc6NheBx1+pbOeIULACptaXw+WwRojqHhdLCPNBirRBVQ+GGV tc5PB1YxcDJCf7/ppDuSwlVTGXFw8+j+3Kn+cg98Q0fRMX1lr2s/1/4fBR9eMqh1P7xZeJN9AAJu0 xieB9gPvp+uaHluYc+EQ==; Received: from 71.125.192.77.rev.sfr.net ([77.192.125.71]:33766 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlU3U-0003Em-6j; Mon, 02 May 2022 07:17:28 -0400 From: Mathieu Othacehe Date: Mon, 2 May 2022 13:17:15 +0200 Message-Id: <20220502111715.13500-1-othacehe@gnu.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" 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=1651490904; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=iQH5HxaJB5BGYHtxdU+qLWqTMZdpS/0ImMp1K1NABGI=; b=eZmHnhYPWRYr2QNiaUJoJnUlKpRDFvktyGxGpshl9HfJklbYbVH0599CjQW70IwNtY/w5D bBqNDzHuoLdBE2YefCUZ9uBbraBHNujCmnV0zVx/Hc8Z2M3jJToUmzjTgXPyz6SiWkwV5W Z7hiXlJ9kepLEalRqDYoVpNZdHQlXEQYColqnZH8WAV99iuPfIYQHuJSYfetZqG09RX6ym OU3dz9iMGt9g8yg3pJ1if3/+OPUQkq1l8r9VbnDCRDGU+M8UYnKMoAVnYjRFv2zztxYgnr ajmv7jUmms8+VjX69iN4mXM7R/1/2EH7wCjXGm7kJ6GtwPuxrPyKmdu1YIMDXw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651490904; a=rsa-sha256; cv=none; b=BChdBPTSi0etFhjlwCN/bvBpg5HfeNBRAUtLhsWDa3+ZdSSXM9uxhhTigz/IPCjXPTsa5e 8EWUrS6ZlbDWrgiXHoeNLbOQnDAPFwPPgaQJbBWB5jJkOgHs+n49zWRUwNIKrgBQQLi8BI ykGj/BalOHa9NuRCrkoCMXqDL2ihwA6plUn09gF9Cf6KCuia2GF28HKsjMBBAb1Dwg6yBP yLipmzxIwbBPtG4l0RfVRlfgf8aGYh/6ZCMp+VcS8J/PNDiaBdjQdnQTe6dfw5wXzvgY6o io399F+b30crs+i/sEGTmSP5aiJnPD0nQleU+j1fcKYHCbetxWee0TZrJ8hRtw== 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=ZnwvtIpr; 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: -1.39 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=ZnwvtIpr; 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: 68601453C9 X-Spam-Score: -1.39 X-Migadu-Scanner: scn1.migadu.com X-TUID: QyK5F++81K9x Hello, Most build commands support --system and --target options. Those options suffer from multiple issues: they are never listed and never checked. For --system, this is a real issue as aside from reading the (gnu packages bootstrap) module content the user cannot know what are the supported arguments. Providing a wrong system also fails badly: mathieu@meije ~$ guix build hello --system=arm-linux Backtrace: In guix/memoization.scm: 101:0 19 (_ # # …) ... ice-9/boot-9.scm:1685:16: In procedure raise-exception: dynamic linker name not known for this system "arm-linux" For --target, any GNU supported triplet can possibly work but providing a wrong triplet will also fail badly: mathieu@meije ~$ guix build hello --target=arm-linux Backtrace: In guix/store.scm: 1385:9 19 (map/accumulate-builds # …) ... ice-9/boot-9.scm:1685:16: In procedure raise-exception: dynamic linker name not known for this system "arm-linux" This patchset adds two new options: --list-systems and --list-targets that list the supported systems and targets. The arguments passed to --system and --target options are also checked: mathieu@meije ~/guix [env]$ ./pre-inst-env guix build hello --system=arm-linux guix build: error: 'arm-linux' is not a supported system. mathieu@meije ~/guix [env]$ ./pre-inst-env guix build hello --target=arm-linux guix build: error: 'arm-linux' is not a supported target. Thanks, Mathieu Mathieu Othacehe (4): platform: Introduce new platforms. platform: Add discovery support. ci: Do not rely on hardcoded cross-targets lists. scripts: Add --list-systems and --list-targets options. doc/guix.texi | 8 ++++ etc/release-manifest.scm | 4 +- gnu/ci.scm | 15 +------ gnu/local.mk | 4 ++ gnu/platform.scm | 62 ++++++++++++++++++++++++-- gnu/platforms/intel.scm | 48 +++++++++++++++++++++ gnu/platforms/mips.scm | 29 +++++++++++++ gnu/platforms/powerpc.scm | 36 ++++++++++++++++ gnu/platforms/riscv.scm | 29 +++++++++++++ guix/scripts/archive.scm | 20 +++------ guix/scripts/build.scm | 84 ++++++++++++++++++++++++++++++------ guix/scripts/environment.scm | 11 ++--- guix/scripts/graph.scm | 15 +++---- guix/scripts/pack.scm | 20 +++------ guix/scripts/pull.scm | 12 +++--- guix/scripts/size.scm | 13 +++--- guix/scripts/weather.scm | 11 +++-- 17 files changed, 329 insertions(+), 92 deletions(-) create mode 100644 gnu/platforms/intel.scm create mode 100644 gnu/platforms/mips.scm create mode 100644 gnu/platforms/powerpc.scm create mode 100644 gnu/platforms/riscv.scm -- 2.35.1