Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1504055rdf; Sun, 5 Nov 2023 02:10:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IGavl5BvGVelCYCmJnlkxwX01N79Ok+yL/lYC8PiQNHfM2+OXchSQpA3O46y2iGAuYP++M1 X-Received: by 2002:a05:6358:710:b0:169:abed:1fc3 with SMTP id e16-20020a056358071000b00169abed1fc3mr11974474rwj.0.1699179022632; Sun, 05 Nov 2023 02:10:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699179022; cv=none; d=google.com; s=arc-20160816; b=W3BqNQa2uJs7MQG7KI61m2PzTwIuoxHoMD7OFY4Ds1wGqTgqL+ZfDdpdnSYorCK1y0 rhCbqCE/RmG4Uvpm5UbS4ojufPCItkbsx6Eb9/FctI3lVDqWjRZZO5+EZIPhI5Ng2zP7 lwhr8+wPDpWVTskL4NbP52ue1pXqJmEESamP76j2s4EGqmngMD92G+DkSldks0pVde24 OdC9JlIHY+YYAeeaLst02lzYqGlFNGNjH1Jru70s90yrqQRhLahKRoXNVOt5O47ZKKzG NSEU5PnFER3RgJwUlYesgZT8HGaccB1HautE5Hmq7q5XHm30v7ZEC1cjd9g45FcHYvHj kM7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=rkgMm5Cpbv+eap3k1QnAgYMEliWCrqjLC/I68Xw2xt8=; fh=JRNmh72HsCuY/8FIVPb28sVny+CmDHBEFeZkZsBPzMc=; b=WsxAPKDUuiPa5bsLoPMHzDkanyVQ0jl1yVLerdt7Ia+iyfa+fGZmOgafFNZcFy7LaJ SPslqY1a2SDKIPDDXvoZhuk3RLTSEAJlnlFSC1KqUY6HGqeObuEyfWm4FjRCAIq1TpWu /Omh7odEYVIybq8J6FO0YoOh5j0qlH/vfAMVNMJlI2ZYyS1Cz1fGkaFx0a3DInBwVIAq j0WjNutXjGWpY141sSe7b0jOZxAShVQ6W34mVaGq88/4vtk3xyeRpmhf80Ksv2AyB5qC rK6M5AkUFFigvO//l5CescvawpEm+UMCt8xp/xaWN+TJDOOZ7HKnNUnBUDhXJ8/7SfDJ oTYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=kcRymekr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id q13-20020a170902dacd00b001c9dfd47959si6012327plx.602.2023.11.05.02.10.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 02:10:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=kcRymekr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9E59C804E7A6; Sun, 5 Nov 2023 02:10:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229884AbjKEKKM (ORCPT + 99 others); Sun, 5 Nov 2023 05:10:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjKEKKM (ORCPT ); Sun, 5 Nov 2023 05:10:12 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [IPv6:2a01:4f8:c010:41de::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 061E0E1; Sun, 5 Nov 2023 02:10:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1699179007; bh=AVSI3iU8EOjAQAr1auwQ6ceFLr1ULSrPhBv72fpFr7k=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kcRymekrTVhD86tT67H4xUlFGRYr3jRRPASht/myx8stRQHYPYXC1o7mWISFW4jno MOtLEX8i6kesQD5dxgZm1Jl7hnARkMuoSIYAMWsWtNnZzTO3d1t7DuPumUwCkUlRUr DUXz2iRhwKZ5S7wb6b3W/ycWPRNEJbGKNvtGL2EE= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sun, 05 Nov 2023 11:09:55 +0100 Subject: [PATCH 1/6] tools/nolibc: error out on unsupported architecture MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20231105-nolibc-mips-be-v1-1-6c2ad3e50a1f@weissschuh.net> References: <20231105-nolibc-mips-be-v1-0-6c2ad3e50a1f@weissschuh.net> In-Reply-To: <20231105-nolibc-mips-be-v1-0-6c2ad3e50a1f@weissschuh.net> To: Willy Tarreau , Shuah Khan Cc: Zhangjin Wu , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1699179006; l=803; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=AVSI3iU8EOjAQAr1auwQ6ceFLr1ULSrPhBv72fpFr7k=; b=jlLtqmMRpQ60zNE3gOr2zSIQYq7SbbtUurG3tfEGmKWKXsV8B8NPZol5S2FdhjzAa4IMrTAGW MLYtCADmZjaBVSKD9kFYxZ5P3OJxuWxZWI+1kmVQcdoNg1LPS6cKy0m X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sun, 05 Nov 2023 02:10:21 -0800 (PST) When an architecture is unsupported arch.h would silently continue. This leads to a lot of followup errors because my_syscallX() is not defined and the startup code is missing. Avoid these confusing errors and fail the build early with a clear error message and location. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/arch.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/include/nolibc/arch.h b/tools/include/nolibc/arch.h index e276fb0680af..2f72ccac0378 100644 --- a/tools/include/nolibc/arch.h +++ b/tools/include/nolibc/arch.h @@ -33,6 +33,8 @@ #include "arch-s390.h" #elif defined(__loongarch__) #include "arch-loongarch.h" +#else +#error Unsupported Architecture #endif #endif /* _NOLIBC_ARCH_H */ -- 2.42.1