From patchwork Tue Aug 6 23:09:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Gomez via B4 Relay X-Patchwork-Id: 13755469 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C7716C49EA1 for ; Tue, 6 Aug 2024 23:13:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To: References:Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version: Subject:Date:From:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=5h8gvXa2WSXyjbuob/Tj1KSUJnzJ81dHvkGtJZRcMOo=; b=KWa3YvtuaaF2RrKzTg2SiJEQCC WISmEIxRjMBVRpr48g56Ff+MEbtrSymujvv5Kwi0/g8L/LSuoy5FThaPcY//uSgf4s5+wvMOQijch Vi7VF7+fBJ53+HrEw5WJc/KXz+P1Hi0QI7YhidpWKmrmBwDG2Z4acAXcam+z2VTaTZkeatORvPE0T jpjMGbZXCruQMsMkhih5inanDqvdQZYRfFX54cscHeHiVBHFO7lcZ5uZH7MmQ2QhRq4clM9hU3097 E1ypKbnlXH5mVg/b4wsRua1ZgFknQg3a3MjBOzVQ1+G4lqCwDE0gbiYILWhIg/5CESj5HIMWwrHcp 6CK4qPFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTMq-00000003GpA-2zyJ; Tue, 06 Aug 2024 23:13:24 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTJe-00000003FfB-0xvW for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 23:10:08 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id D4161CE0C70; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id CC20EC4AF0C; Tue, 6 Aug 2024 23:10:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722985802; bh=TxCIbk5kpqAWpCSxGxR1hhZf2RT69+54zaMWnuFPywQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=hZOOQ616lMICi1so631oPK8lRs/b8+S/8NaZ6SrLVqGuF+LQNJgMyPSJa1nIbWE2q VqyNqczws1XjLMxdIMijDBp6g6qTQwD6CMVOLaiwwwBx9EfUJm2PNcQCxR2HBhdQ9Y Mmtjek0ooH7L0sjGVJ2vTl9/2kYXQwT2EOrBmVxZEyLp8iDAB2AgnrBxIbZQd5BgLm 90n8FyZfoEp0mpvKWjPlgi/xZIN/2dCunx9ghGpPs8kYMtNeF5BdN08WnomLmfQZ5K IYyO4kNQrRObqmsxmBC9Cxv1pPaWq1XytcmrulFBUrsRx6OkZDFLr2FTYDc+GVqBcm DHda1Az6QvaXw== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3827C52D7B; Tue, 6 Aug 2024 23:10:02 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Wed, 07 Aug 2024 01:09:15 +0200 Subject: [PATCH 01/12] scripts: subarch.include: fix SUBARCH on MacOS hosts MIME-Version: 1.0 Message-Id: <20240807-macos-build-support-v1-1-4cd1ded85694@samsung.com> References: <20240807-macos-build-support-v1-0-4cd1ded85694@samsung.com> In-Reply-To: <20240807-macos-build-support-v1-0-4cd1ded85694@samsung.com> To: Masahiro Yamada , Nathan Chancellor , Nicolas Schier , Lucas De Marchi , =?utf-8?q?Thomas_Hellstr=C3=B6?= =?utf-8?q?m?= , Rodrigo Vivi , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , William Hubbs , Chris Brannon , Kirk Reiser , Samuel Thibault , Paul Moore , Stephen Smalley , Ondrej Mosnacek , Catalin Marinas , Will Deacon , Marc Zyngier , Oliver Upton , James Morse , Suzuki K Poulose , Zenghui Yu , Greg Kroah-Hartman , Jiri Slaby , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, speakup@linux-speakup.org, selinux@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-serial@vger.kernel.org, llvm@lists.linux.dev, Finn Behrens , "Daniel Gomez (Samsung)" , gost.dev@samsung.com, Daniel Gomez , Nick Desaulniers X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1722985800; l=1489; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=pKrUy+kUc7s1sGJ4V0pnKiAjUgJie+thKNoMDcFS8Ws=; b=BaL7A1rlA7gJqeye5jr4ewbPFIbJKovsy2703k4UjEVlRUIdHP5xKklCusXzrOGVDQfD0QJSj APMBaZZ1ODpAzcjGgS5l4MO4plml4BUxFF4TM1ExHvcSpGvrfIornNn X-Developer-Key: i=da.gomez@samsung.com; a=ed25519; pk=BqYk31UHkmv0WZShES6pIZcdmPPGay5LbzifAdZ2Ia4= X-Endpoint-Received: by B4 Relay for da.gomez@samsung.com/20240621 with auth_id=175 X-Original-From: Daniel Gomez X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240806_161006_756479_5E5FEECD X-CRM114-Status: GOOD ( 12.04 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: da.gomez@samsung.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Nick Desaulniers When building the Linux kernel on an aarch64 MacOS based host, if we don't specify a value for ARCH when invoking make, we default to arm and thus multi_v7_defconfig rather than the expected arm64 and arm64's defconfig. This is because subarch.include invokes `uname -m` which on MacOS hosts evaluates to `arm64` but on Linux hosts evaluates to `aarch64`, This allows us to build ARCH=arm64 natively on MacOS (as in ARCH need not be specified on an aarch64-based system). Utilize a negative lookahead regular expression to avoid matching arm64. Add a separate expression to support for armv.* as per error reported by Nicolas Schier [1]. [1] https://lore.kernel.org/all/Y3MRvtwdjIwMHvRo@bergen.fjasle.eu/#t Signed-off-by: Nick Desaulniers Signed-off-by: Daniel Gomez Reviewed-by: Nicolas Schier --- scripts/subarch.include | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/subarch.include b/scripts/subarch.include index 4bd327d0ae42..5d84ad8c0dee 100644 --- a/scripts/subarch.include +++ b/scripts/subarch.include @@ -6,7 +6,8 @@ SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \ -e s/sun4u/sparc64/ \ - -e s/arm.*/arm/ -e s/sa110/arm/ \ + -e s/armv.*/arm/ \ + -e s/arm\(?:\(?!64\).*\)/arm/ -e s/sa110/arm/ \ -e s/s390x/s390/ \ -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \