From patchwork Sun Nov 5 11:34:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Patchwork-Id: 161635 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp2078624vqu; Sun, 5 Nov 2023 03:35:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IHHhCW0lzeRx1QJoNFJLLOcv4dECAY2GK67yqyhybQqWsuvBd8EbtjR950SVSpuRDRT0+97 X-Received: by 2002:a05:6a20:429f:b0:169:7d6f:9f22 with SMTP id o31-20020a056a20429f00b001697d6f9f22mr31192912pzj.54.1699184121352; Sun, 05 Nov 2023 03:35:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699184121; cv=none; d=google.com; s=arc-20160816; b=qqVbGUhz5GKkDyoarVWhpAuw1aZdQJOXYitxeHiyrTZ+y3MrUH105xBf5oT5fFfNR7 Xvj4D9STbL/U9fyZE4MC/Wa5hrR+LPTfxgfka4tQ5tWH8LK5RZ100DXnbcbtMYgYSwza 0ArJ8m8hm+UvRc52XOyQRP2x6kkhyH/0nvUi4SQyPqfFMHKIAWzKzppxwCJErrBO5r2F ZuaWzQqSEztM+g4uc+nATfNcUGpuaLvSSg5G26uekzZyhJ3PpE5QVHVVPC+LfsUIomqb u7IZK1+QHvWJun7KHO5E0+G1LQ1LSB3B8YAy/3n9XTY8gXmOdlbsYuOzpOTO/81EeuQf wo6w== 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=fHr2dnV5BkoFfg4FIppcwFFK1hSNx/DhgBxvOrh4BH0=; fh=JRNmh72HsCuY/8FIVPb28sVny+CmDHBEFeZkZsBPzMc=; b=JltOKJVxavvUOngXMIl0iXPCKuhWD33TMp9i11zEjpcZjT3UJVWJCfhsESTMFC3bxg AYwbJtIBchfJ5xb9a+CLL36a05t69zLKQXHuIHY0SvqqeSY2bV9Ztr/yS5A2YOiGZgUm N140Xx0jEZStK73rnX1Anhab5aajT0sTQboyK9egLdPIpTbwcnKIUBaAFMlqSQFZ6Jwg xu16YWWNziDf/dy3iz6jSooJdP1WXti08hH7SzBUUdLEaa9qM9AZ/1MduNhiCbGqXj6C V+M01wGbN0ySryebqUZ6XToGEc6KyS48zgZtd7E+4jIxNBF39qw9L7ZiCpZkb3WTrkEz iMyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=ggObUooO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id gx18-20020a17090b125200b002802c0c4cdasi5873508pjb.181.2023.11.05.03.35.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 03:35:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=ggObUooO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 3069A804DDAD; Sun, 5 Nov 2023 03:35:20 -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 S230370AbjKELfR (ORCPT + 34 others); Sun, 5 Nov 2023 06:35:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229621AbjKELfJ (ORCPT ); Sun, 5 Nov 2023 06:35:09 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CB05EB; Sun, 5 Nov 2023 03:35:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1699184102; bh=bfoswv7ncWkCUqW4AE0EZoLtlErB+6knnnYOlA24mFg=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ggObUooOsP16O4x6BewBPKt6dbJAKMDPCMukaNrJQ4tPmNjjhReY/M/3h2igCqr9e 8QDP9goT7oeZIGARnHqLn5ovBLbsZDsGMGdu0gdHzujocpCrT2c2D4SvmTm8BtFWmq HZob2QtRpfTDqOfB4RWC1qBbqcLoN1DTldflgf14= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sun, 05 Nov 2023 12:34:58 +0100 Subject: [PATCH v2 1/6] tools/nolibc: error out on unsupported architecture MIME-Version: 1.0 Message-Id: <20231105-nolibc-mips-be-v2-1-4ec993cb5407@weissschuh.net> References: <20231105-nolibc-mips-be-v2-0-4ec993cb5407@weissschuh.net> In-Reply-To: <20231105-nolibc-mips-be-v2-0-4ec993cb5407@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=1699184102; l=839; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=bfoswv7ncWkCUqW4AE0EZoLtlErB+6knnnYOlA24mFg=; b=h1P8i1kDOIISeYbFLfzWqMLh6zBFs5DBo7Ec2xs4xRvaX+LTXzcXL3OdniFMrew7OO+bp1Vbg 4liZd88i89SDABWH8QxgfHjGsWri5e7JtAdVORS/QKYZtWAg8u/Az5q 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 03:35:20 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781723689215304306 X-GMAIL-MSGID: 1781723689215304306 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 Acked-by: Willy Tarreau --- 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 */