Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1505695rdf; Sun, 5 Nov 2023 02:16:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IHv6Y91Nxs4QyT6L3Sx4MO9n+bgLP7303dHjXoKHI9rGX7hGMPTQmu9hPup9ol/r1PFHqsZ X-Received: by 2002:a05:6830:1156:b0:6c4:d2a8:b789 with SMTP id x22-20020a056830115600b006c4d2a8b789mr26093533otq.35.1699179377295; Sun, 05 Nov 2023 02:16:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699179377; cv=none; d=google.com; s=arc-20160816; b=USrwEuhZ1JnEDCPwyF9gOCHQ7PW6TW6QkJoMz2PtEFoBS43dLP1TGU5WR5igRyfoyf xSLMeJxxpX+7r8du63IVDMoogiSuu2jBeH7FRZs2xyCtMRuPzDCNEPE+GuVeTWbahWyV L9PnO+z/xxVqZYVKpbyd54+E0CU1wMEw9gB+ytKAIa4/2k6+/P4DaqudenNuIDMdEcFe wUWTTCGG0pDrQP7Y8FPx66AxDOKvucSM80hdpNTmOrRN+d2NxORXpkppZMHTykm2FARR VgZKogkcYyhQWRZBEfAvMoCuNmFLWSwo0u09yra/CeKut5ZWOWDUWadT+X3GvqUeEa8M rUMQ== 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=nfbbjyl4aSzu3EPoduIuYua8SoSa2TCg29bqNeG+AbM=; fh=JRNmh72HsCuY/8FIVPb28sVny+CmDHBEFeZkZsBPzMc=; b=YWYXmnPnacupJj+goSyWJ2+eVdhgvWsoW0HOw6JU69vXQYl7KwST9u8r+r96rn+cYZ TCwUj3udlPdEbiaf4fdW+7dRjCI1V6aB6jfYtlNbpSwdHmCmPzMAAJkoP0a94dgwMyi/ i/QcVjMgNSPNfxk1OGkVOHcpnyw1NBiYEzGwJZ1v0nAP3vi00jBEFHv2d1/3AXf/ZpKN PVWHkPU5vgGTrDl4dkXCThDmm4uwSdpm/tUNf0TmMWvo2Qf5J0itIVnlXMEL5iS+uGxS B082WX4vMDX3wpDEzfdW5asBOUmWNmIW2KZed5HAUqBbIdqvg2PYqheQs8vDflP0r8I3 P68g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=TsSorgX9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id on12-20020a17090b1d0c00b002777081181fsi5963526pjb.51.2023.11.05.02.16.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 02:16:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=TsSorgX9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 80CC0807C640; Sun, 5 Nov 2023 02:16:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229638AbjKEKKU (ORCPT + 99 others); Sun, 5 Nov 2023 05:10:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229866AbjKEKKM (ORCPT ); Sun, 5 Nov 2023 05:10:12 -0500 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A6F8F2; 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=HOKeEAIHMRYfVoon/mx+VWMcYYNPi3QtyuybV2q/R1I=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=TsSorgX97xNatwFxA4FeECynO20C515J5PA2JRQ8E23GMkXpVgR/a5/emu9oji8pL 9J42v5gnVMfI6lktw+stcfVpJX9Ak//Gwlnp1Qo+4HrLqvAB0LvJQuw9MBrctREJ4n v9tUaqcjNIgrezjRalQqZOCMkJwr3TqaVcMqgQrM= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sun, 05 Nov 2023 11:09:56 +0100 Subject: [PATCH 2/6] tools/nolibc: move MIPS ABI validation into arch-mips.h MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20231105-nolibc-mips-be-v1-2-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=1401; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=HOKeEAIHMRYfVoon/mx+VWMcYYNPi3QtyuybV2q/R1I=; b=MAgipq15jOEiqliN00Hv04vNzZtIZ/jtOirHmetvf88ps3RKyanGwpHI08fmejygPHz/3z5sz MCiKkAx0jbXAloCtLPrPlnUvQpa5sKdWeiLFHe6Z5K4yYnUqwWNKl5a X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email 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 (fry.vger.email [0.0.0.0]); Sun, 05 Nov 2023 02:16:03 -0800 (PST) When installing nolibc to a sysroot arch.h is not used so its ABI check is bypassed. This makes is possible to compile nolibc with a non O32 ABI which may build but can not run. Move the check into arch-mips.h so it will always be evaluated. Signed-off-by: Thomas Weißschuh --- tools/include/nolibc/arch-mips.h | 4 ++++ tools/include/nolibc/arch.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/include/nolibc/arch-mips.h b/tools/include/nolibc/arch-mips.h index 4ab6fa54beee..3a2c76716b83 100644 --- a/tools/include/nolibc/arch-mips.h +++ b/tools/include/nolibc/arch-mips.h @@ -10,6 +10,10 @@ #include "compiler.h" #include "crt.h" +#if !defined(_ABIO32) +#error Unsupported MIPS ABI +#endif + /* Syscalls for MIPS ABI O32 : * - WARNING! there's always a delayed slot! * - WARNING again, the syntax is different, registers take a '$' and numbers diff --git a/tools/include/nolibc/arch.h b/tools/include/nolibc/arch.h index 2f72ccac0378..c8f4e5d3add9 100644 --- a/tools/include/nolibc/arch.h +++ b/tools/include/nolibc/arch.h @@ -23,7 +23,7 @@ #include "arch-arm.h" #elif defined(__aarch64__) #include "arch-aarch64.h" -#elif defined(__mips__) && defined(_ABIO32) +#elif defined(__mips__) #include "arch-mips.h" #elif defined(__powerpc__) #include "arch-powerpc.h" -- 2.42.1