From patchwork Wed Jun 8 07:10:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 1640376 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=DHrRkk2a; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LHz2N6d9Tz9sFk for ; Wed, 8 Jun 2022 17:12:44 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 6E03E60FEE; Wed, 8 Jun 2022 07:12:43 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BnjdFzdLojzE; Wed, 8 Jun 2022 07:12:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 8FF3860FF8; Wed, 8 Jun 2022 07:12:41 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 0A4391BF3D2 for ; Wed, 8 Jun 2022 07:10:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id EE3F283F4F for ; Wed, 8 Jun 2022 07:10:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp1.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=bootlin.com Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YjeDCZow_lhI for ; Wed, 8 Jun 2022 07:10:46 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::229]) by smtp1.osuosl.org (Postfix) with ESMTPS id 0893483F4C for ; Wed, 8 Jun 2022 07:10:45 +0000 (UTC) Received: (Authenticated sender: thomas.petazzoni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPA id 213F9FF804; Wed, 8 Jun 2022 07:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1654672244; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F5kAP5+DAhfBc63h9BAEP3Bqqs5XnCbeLaP/41GmYMQ=; b=DHrRkk2arPyhZBqChpPaRFfZPvWTA414mrq1lmb0qQPTGOMYe34D30YYRSUsOJlh6hK8vQ EVJ9oognfjxGIMg+Nnn6RMw7lyKfEuzhfWxU7lKyLDxk4wMb/SikvXxoryfU5Yyr4JgpqZ NOF6txEhp5BpdPE91QDk8+mxbnpVkPdakM7+SU5d/rd++jZjSyS/TehO/4qWDQulQEIfgY P9n7MrPchxGLAHnvbMK9QhG6G0tbcaF+/tuXMVHlyFQSYSAivtIV0CU03feDfj/NE2X1Kj 5A6NVL0+rj/RfrFS/flUgDShtPzajp7Q4sqEk1EsY8dgaPQNxRDbHtCEpweQ4w== To: "Yann E. MORIN" , Romain Naour , Buildroot List Date: Wed, 8 Jun 2022 09:10:22 +0200 Message-Id: <20220608071027.3384469-11-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220608071027.3384469-1-thomas.petazzoni@bootlin.com> References: <20220608071027.3384469-1-thomas.petazzoni@bootlin.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 10/14] support/scripts/gen-bootlin-toolchains: check that toolchains exists for a certain arch X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Thomas Petazzoni via buildroot From: Thomas Petazzoni Reply-To: Thomas Petazzoni Cc: Thomas Petazzoni Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" The "arches" dict lists the architectures for which Bootlin toolchains are available, along with the corresponding Buildroot conditions for those architecture variants. However, there is nothing that checks that such architectures really have Bootlin toolchains available. Even if no toolchain is available, the architecture is considered as support, and will be listed in the BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARCH_SUPPORTS option, making menuconfig believe that some Bootlin toolchain is available for the selected architecture variant. This is currently the case with the "mips64" architecture (as identified by the Bootlin toolchains project). Such toolchains have been made obsolete in toolchains.bootlin.com and replaced by the mips64-n32 toolchains. But "mips64" is still listed in "arches", causing this architecture to be considered as having Bootlin toolchains available. To avoid this to happen in the future, this commit adds a check that verifies that an architecture listed in "arches" really has at least one toolchain available. Signed-off-by: Thomas Petazzoni --- support/scripts/gen-bootlin-toolchains | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/support/scripts/gen-bootlin-toolchains b/support/scripts/gen-bootlin-toolchains index ad65f9fe5e..36727c8fea 100755 --- a/support/scripts/gen-bootlin-toolchains +++ b/support/scripts/gen-bootlin-toolchains @@ -4,6 +4,7 @@ import os.path import re import requests import textwrap +import sys BASE_URL = "https://toolchains.bootlin.com/downloads/releases/toolchains" @@ -483,6 +484,10 @@ def get_toolchains(): version = parts[2][len("bleeding-edge-"):] tmp[(arch, libc, variant)] = version + if len(tmp) == 0: + print("ERROR: no toolchains found for architecture %s" % arch) + sys.exit(1) + toolchains += [Toolchain(k[0], k[1], k[2], v) for k, v in tmp.items()] return toolchains