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/ \ From patchwork Tue Aug 6 23:09:16 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: 13755439 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 21B34C49EA1 for ; Tue, 6 Aug 2024 23:11:25 +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=lfjItIWs09n8VT7wjOe6KyQ5YimB9uS7/FV6X768BYg=; b=qws16DTrORstoUBE8xuVOZRD1u biZ+Bb0cArnyss/N4D11FuuCICdvyhe5H5xbPff61Mblo5jzJHA/wjiCUk3lprEyhO21lpQ92Vneg GKLKC6baDGNrCDQLTfSEmXAd4mQpGiQOQ35swTi0SpFNVqn6tzaLpa/4L3Id34mP1+gkH9jYSZMe/ IHPVVC9SofcQgUT/SThITttv37eOr5fYUVPCkVhb02hM3GbCifpg9h+jZLXC/cY6A7e1MOeAz/LBg 7cwaQZr5IDAQL5S9ZCPY32NysoKDV9Xk8qwZ/04aqeOuOuwpgGoGIp3Tra2I0aHUHGbN1r0GsnKeG Z9xjd1ww==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTKl-00000003G7n-2WgW; Tue, 06 Aug 2024 23:11:15 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTJc-00000003Ff7-2hcu for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 23:10:06 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 9F61C61138; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id DD429C4AF13; 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=1722985803; bh=xrcHA/O7r3/YYBS+h704QYs1S7cg1BNR1Qpxff2BfLo=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=mFCPbCCwA7dKJKjZ+Jye9k8VOGm2SpZuyRkh5tBD6YRUgHvF+iAy5FGjk7v7rt6BQ hdL/fsdNK3UaPf5Gr/N+VB1fJc+8dEpspMp9UzI9wiD/ERDntd+Rw0VCyDNYvCpMrG uPKwoAuYXZp2VcyTd3EZtAnA8MnoM/UG3UgmaiHCZsmkWeizWf4UMyjby+rHcdrPn/ EVDNLvC6dA49BB0YWHYRcTGLjLUr11wdtCwgTZASziM72h1gznDWVFnwtYJUsb6Bge r0wDhFhFVYS/FzHGitH2al3P71sR4X2N9p+CJ16PML6jorC6YL4r7A7rtHWdPTMnPU 4llX+qXyjhiXQ== 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 CA50CC52D6F; Tue, 6 Aug 2024 23:10:02 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Wed, 07 Aug 2024 01:09:16 +0200 Subject: [PATCH 02/12] kbuild: add header_install dependency to scripts MIME-Version: 1.0 Message-Id: <20240807-macos-build-support-v1-2-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 X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1722985800; l=856; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=0otf74yOlfB/2ZHNvaLEeBp7JJmGu+twOyvFqgg1tYs=; b=ZPst/uFwbcTWjclR+Q4Gx52+bt556TvdClk7ycF8grO6E00uv3oj7vx9fEgnW94ziDOTZ72WN VVPUIy4g0JyDnGz/jYwH+E/0Q/EDirhV3886smdGXs+ONGBw1DIy/vY 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_161004_861445_6366AEF2 X-CRM114-Status: GOOD ( 12.84 ) 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: Daniel Gomez Export kernel headers necessary for the tools located in scripts/. This ensures kernel headers are generated before building scripts/selinux. Kernel headers required for building are: asm/types.h, asm/bitsperlong.h and asm/poix_types.h. Signed-off-by: Daniel Gomez --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 44c02a6f60a1..7ac079955a94 100644 --- a/Makefile +++ b/Makefile @@ -1173,7 +1173,7 @@ include/config/kernel.release: FORCE # Carefully list dependencies so we do not try to build scripts twice # in parallel PHONY += scripts -scripts: scripts_basic scripts_dtc +scripts: headers_install scripts_basic scripts_dtc $(Q)$(MAKE) $(build)=$(@) # Things we need to do before we recursively start building the kernel From patchwork Tue Aug 6 23:09:17 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: 13755440 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 160D2C52D6F for ; Tue, 6 Aug 2024 23:12:00 +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=9fKH24qDY+k4lh+D5LgMbUjVnipGDg6GtkwbIoXumkU=; b=dwZMVI6OCEBUqkU+ZVrKM4pFAz 58+Z9Ku5AF/sKKnqRM1rG4qh4AWjJf01n0kBqBJKiulWt7IIxbbGhoz1G7iwPPiDxYDB5byWYOrcP /IaW3zvCkXGinJYXN3cVRA4KCROrilF0U+BAelOxihvOJvU4XrfLT49CxoJihOXZ9fe+NWf1yT9DY +SBy8Jt2KHfGbv70uMB4AJIj8QUKJ96+sjKUgTCkCtRiWlUMki3VM8RuCk7HQ0DXAHq4D1+4x3NeS 8+3wNzoubZ7ujpWO6Q7hFir1U98lWd5Mpu7m/RdktZlwOJhH5UVmx8xfV9mYsNf2WizcJZMrfRvhG BhYoCwAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTLG-00000003GE6-1O1J; Tue, 06 Aug 2024 23:11:46 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTJc-00000003FfH-3XYK for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 23:10:07 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B0C7361129; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 01B09C4AF16; 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=1722985803; bh=uHxvuxO0nTmpbMtxhgnEbpjTz1SrBIV60PpJ/lx8HtY=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=Qafz2PhGLQMsInHmaxpimjHf7o3vElKcSPcKPBkNLA8JmsImJyqRr1TA+PQw7yIWb DFFrqCGUYfIWUz3Mhwkc6nBFI3FoAQT/5bHnkY9IqwccKVsvaq8P0jh7FwqIqzutPW 1a+h06OAtCmOFSPrgH1Ou/QvwGmqkG+dPZK46ZBLa0g3Avpz5iJSTy0wClBLiKmSrM otMkTBzlZWAktenJiRsO2gsFNw+C7JGaeR0FuWnAjJCoc5/ehTvmPt+FwyO/mqSXFt dAeiARvy6n4kF1LmO0ZdL6zVCe/HI/qWz8SJVzmSkb/R/UmENH74Z+zXwEaDTj65t1 Ym4mYn26pW6qQ== 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 E2447C49EA1; Tue, 6 Aug 2024 23:10:02 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Wed, 07 Aug 2024 01:09:17 +0200 Subject: [PATCH 03/12] file2alias: fix uuid_t definitions for macos MIME-Version: 1.0 Message-Id: <20240807-macos-build-support-v1-3-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 X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1722985800; l=9911; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=nemzUrB1i67gy9aXyJv3/64HHXWWgSa+4xEBHOyixjc=; b=p+yuh3mL0iCpJvZtgrkpRIYmhQo3akpYmU0pqAz9yDBcruXUcnpdx64xl9e2JWqKRcddaLKCp Z9H1KKB7B39B+F3fPDUcBRxI0WkigqfNwAc/pD18VVCbCOpX8TuelHs 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_161005_714610_B3436873 X-CRM114-Status: UNSURE ( 9.22 ) X-CRM114-Notice: Please train this message. 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: Daniel Gomez The uuid_t struct defined in sys/types.h on macOS hosts conflicts with the one defined in file2alias, resulting in the typedef redefinition error below. To resolve this conflict, redefine the uuid_t specifically for macOS hosts. Error: HOSTCC scripts/mod/file2alias.o scripts/mod/file2alias.c:45:3: error: typedef redefinition with different types ('struct uuid_t' vs '__darwin_uuid_t' (aka 'unsigned char[16]')) 45 | } uuid_t; | ^ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ sys/_types/_uuid_t.h:31:25: note: previous definition is here 31 | typedef __darwin_uuid_t uuid_t; | ^ scripts/mod/file2alias.c:1354:7: error: member reference base type 'typeof (((struct tee_client_device_id *)0)->uuid)' (aka 'unsigned char[16]') is not a structure or union 1354 | uuid->b[0], uuid->b[1], uuid->b[2], uuid->b[3], uuid->b[4], | ~~~~^ ~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 47 | __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | ^~~~~~~~~~~ scripts/mod/file2alias.c:1354:19: error: member reference base type 'typeof (((struct tee_client_device_id *)0)->uuid)' (aka 'unsigned char[16]') is not a structure or union 1354 | uuid->b[0], uuid->b[1], uuid->b[2], uuid->b[3], uuid->b[4], | ~~~~^ ~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 47 | __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | ^~~~~~~~~~~ scripts/mod/file2alias.c:1354:31: error: member reference base type 'typeof (((struct tee_client_device_id *)0)->uuid)' (aka 'unsigned char[16]') is not a structure or union 1354 | uuid->b[0], uuid->b[1], uuid->b[2], uuid->b[3], uuid->b[4], | ~~~~^ ~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 47 | __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | ^~~~~~~~~~~ scripts/mod/file2alias.c:1354:43: error: member reference base type 'typeof (((struct tee_client_device_id *)0)->uuid)' (aka 'unsigned char[16]') is not a structure or union 1354 | uuid->b[0], uuid->b[1], uuid->b[2], uuid->b[3], uuid->b[4], | ~~~~^ ~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 47 | __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | ^~~~~~~~~~~ scripts/mod/file2alias.c:1354:55: error: member reference base type 'typeof (((struct tee_client_device_id *)0)->uuid)' (aka 'unsigned char[16]') is not a structure or union 1354 | uuid->b[0], uuid->b[1], uuid->b[2], uuid->b[3], uuid->b[4], | ~~~~^ ~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 47 | __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | ^~~~~~~~~~~ scripts/mod/file2alias.c:1355:7: error: member reference base type 'typeof (((struct tee_client_device_id *)0)->uuid)' (aka 'unsigned char[16]') is not a structure or union 1355 | uuid->b[5], uuid->b[6], uuid->b[7], uuid->b[8], uuid->b[9], | ~~~~^ ~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 47 | __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | ^~~~~~~~~~~ scripts/mod/file2alias.c:1355:19: error: member reference base type 'typeof (((struct tee_client_device_id *)0)->uuid)' (aka 'unsigned char[16]') is not a structure or union 1355 | uuid->b[5], uuid->b[6], uuid->b[7], uuid->b[8], uuid->b[9], | ~~~~^ ~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 47 | __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | ^~~~~~~~~~~ scripts/mod/file2alias.c:1355:31: error: member reference base type 'typeof (((struct tee_client_device_id *)0)->uuid)' (aka 'unsigned char[16]') is not a structure or union 1355 | uuid->b[5], uuid->b[6], uuid->b[7], uuid->b[8], uuid->b[9], | ~~~~^ ~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 47 | __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | ^~~~~~~~~~~ scripts/mod/file2alias.c:1355:43: error: member reference base type 'typeof (((struct tee_client_device_id *)0)->uuid)' (aka 'unsigned char[16]') is not a structure or union 1355 | uuid->b[5], uuid->b[6], uuid->b[7], uuid->b[8], uuid->b[9], | ~~~~^ ~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 47 | __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | ^~~~~~~~~~~ scripts/mod/file2alias.c:1355:55: error: member reference base type 'typeof (((struct tee_client_device_id *)0)->uuid)' (aka 'unsigned char[16]') is not a structure or union 1355 | uuid->b[5], uuid->b[6], uuid->b[7], uuid->b[8], uuid->b[9], | ~~~~^ ~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 47 | __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | ^~~~~~~~~~~ scripts/mod/file2alias.c:1356:7: error: member reference base type 'typeof (((struct tee_client_device_id *)0)->uuid)' (aka 'unsigned char[16]') is not a structure or union 1356 | uuid->b[10], uuid->b[11], uuid->b[12], uuid->b[13], uuid->b[14], | ~~~~^ ~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 47 | __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | ^~~~~~~~~~~ scripts/mod/file2alias.c:1356:20: error: member reference base type 'typeof (((struct tee_client_device_id *)0)->uuid)' (aka 'unsigned char[16]') is not a structure or union 1356 | uuid->b[10], uuid->b[11], uuid->b[12], uuid->b[13], uuid->b[14], | ~~~~^ ~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 47 | __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | ^~~~~~~~~~~ scripts/mod/file2alias.c:1356:33: error: member reference base type 'typeof (((struct tee_client_device_id *)0)->uuid)' (aka 'unsigned char[16]') is not a structure or union 1356 | uuid->b[10], uuid->b[11], uuid->b[12], uuid->b[13], uuid->b[14], | ~~~~^ ~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 47 | __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | ^~~~~~~~~~~ scripts/mod/file2alias.c:1356:46: error: member reference base type 'typeof (((struct tee_client_device_id *)0)->uuid)' (aka 'unsigned char[16]') is not a structure or union 1356 | uuid->b[10], uuid->b[11], uuid->b[12], uuid->b[13], uuid->b[14], | ~~~~^ ~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 47 | __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | ^~~~~~~~~~~ scripts/mod/file2alias.c:1356:59: error: member reference base type 'typeof (((struct tee_client_device_id *)0)->uuid)' (aka 'unsigned char[16]') is not a structure or union 1356 | uuid->b[10], uuid->b[11], uuid->b[12], uuid->b[13], uuid->b[14], | ~~~~^ ~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 47 | __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | ^~~~~~~~~~~ scripts/mod/file2alias.c:1357:7: error: member reference base type 'typeof (((struct tee_client_device_id *)0)->uuid)' (aka 'unsigned char[16]') is not a structure or union 1357 | uuid->b[15]); | ~~~~^ ~ /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/ secure/_stdio.h:47:56: note: expanded from macro 'sprintf' 47 | __builtin___sprintf_chk (str, 0, __darwin_obsz(str), __VA_ARGS__) | ^~~~~~~~~~~ 17 errors generated. Signed-off-by: Daniel Gomez --- scripts/mod/file2alias.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 99dce93a4188..ab743f6d60ef 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -11,6 +11,9 @@ */ #include "modpost.h" +#ifdef __APPLE__ +#define uuid_t sys_uuid_t +#endif #include "devicetable-offsets.h" /* We use the ELF typedefs for kernel_ulong_t but bite the bullet and From patchwork Tue Aug 6 23:09:18 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: 13755468 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 8D6E9C52D6F for ; Tue, 6 Aug 2024 23:13:03 +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=Ws94lht9Trq9NR5JwNEmGHFFJse41azThCdy8QV+O5U=; b=JjC7f0cHSWhdomTH4D6cC8lplO 398flnUuW6dyRxzc/wmi24UJu2FB07O9oJ9lJy3AahLO+dU2Oo+4Qr/XXoP3Dta6GKVr7dKPBDZLI ZuMyIak7pQ/ckWlDHsOw+xvj/JU+PWhAWHdq14ZtU/qJb/cYI5m8NgCQYEmTxYbiPLZeOSQTGrGRJ dFb5PYijesEysAKeO5boOUWWOs3t7NX0sHhSWUtQx1G5e/Xqn8TmR4btvR2SbI6YkLxE41wh5xTH1 OimhZzbHlXwvf75n/cVrW9jU9VroxHB6U2Dsdd/6o72He1r/ysG2Mqd3bCYDYw7jtQci/m2r2CVFX T1sJRs/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTMJ-00000003Gan-2gOl; Tue, 06 Aug 2024 23:12:51 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTJd-00000003Ffa-0G7T 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 dfw.source.kernel.org (Postfix) with ESMTP id 03AD461069; Tue, 6 Aug 2024 23:10:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 0EC67C4AF1B; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722985803; bh=Y/65RkebTnQaJk1vPg1V/dSUpJJYPtRYtTmiu8GArpE=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=KRo1Yh+MKuM2zphOGYW5HGzc/KIhWNRSVf/+7VfO25MuNFsQrDNXAQbKHrwJEzSQO /Gs9jHmiG4IRAnMzVfysvp0g9us4R2yhjf3yYFLCJjkk1UAA0L7HAfV8VEMM/g1OLL 8ACRLTePfpM8OdtW3IMjLhwhRp627HZgsPj+Wjz9p78awSL5385MA69s+6GEOSZbAL Lb7bgONSqmS/hFdPOqMnwz3XPsIYOj2GC0DOi7wCsBWEL4rEzcJSjInjCTSfejA2LL 4RQ5q8bwV0tectV4NJcm5D8rk0JEUBWM77oa3hoy+GetJFKPazFdt2pvF/6Vy/I6GB +TcXuL0G6+qiw== 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 F3CAFC52D7C; Tue, 6 Aug 2024 23:10:02 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Wed, 07 Aug 2024 01:09:18 +0200 Subject: [PATCH 04/12] drm/xe: xe_gen_wa_oob: fix program_invocation_short_name for macos MIME-Version: 1.0 Message-Id: <20240807-macos-build-support-v1-4-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 X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1722985800; l=1537; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=xYJE9WRRAIRv4i+z5sDXuKkMiFQ3KMmcYsQNverwAeg=; b=b7BMXAQke1LOkRHzmeWm0G5v1jBPAvdTULfW44FJ1gmeQ2FlQKfG/qqW9uaRzI43lVO8Cvgjq vO6Mvk57URgBL7EXOhPLs+fmTIcw6Z85RQzfx1AxgOGdYc6oq2bS1zD 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_161005_810988_C8DF775B X-CRM114-Status: GOOD ( 10.81 ) 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: Daniel Gomez Use getprogname() [1] instead of program_invocation_short_name() [2] for macOS hosts. [1]: https://www.gnu.org/software/gnulib/manual/html_node/ program_005finvocation_005fshort_005fname.html [2]: https://developer.apple.com/library/archive/documentation/System/ Conceptual/ManPages_iPhoneOS/man3/getprogname.3.html Fixes build error for macOS hosts: drivers/gpu/drm/xe/xe_gen_wa_oob.c:34:3: error: use of undeclared identifier 'program_invocation_short_name' 34 | program_invocation_short_name); | ^ 1 error generated. Signed-off-by: Daniel Gomez --- drivers/gpu/drm/xe/xe_gen_wa_oob.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/xe/xe_gen_wa_oob.c b/drivers/gpu/drm/xe/xe_gen_wa_oob.c index 904cf47925aa..079b8870c461 100644 --- a/drivers/gpu/drm/xe/xe_gen_wa_oob.c +++ b/drivers/gpu/drm/xe/xe_gen_wa_oob.c @@ -9,6 +9,12 @@ #include #include #include +#define PROG_INV_NAME program_invocation_short_name + +#ifdef __APPLE__ +#include +#define PROG_INV_NAME getprogname() +#endif #define HEADER \ "// SPDX-License-Identifier: MIT\n" \ @@ -31,7 +37,7 @@ static void print_usage(FILE *f) { fprintf(f, "usage: %s \n", - program_invocation_short_name); + PROG_INV_NAME); } static void print_parse_error(const char *err_msg, const char *line, From patchwork Tue Aug 6 23:09:19 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: 13755470 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 3BD0CC52D6F for ; Tue, 6 Aug 2024 23:14:10 +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=YCdVLjQpWb6qhGGmeCE9Bk6p5KlCSEtwjnRuk65bw4g=; b=olvHaM5NhQzoGZYhqv4Fdos1ha No0WB9EAoEZUNQ1cVboILDi9LttbrQurgQwO/pTAo5xH7RNINAlSZYwfA5j5JCMJDop9MbYpRL66J m6pTe+6PRRh01OO1v3qevBkyQaYb0luuki015DHX47HpQzA08GeHx/Q84ZkI76fdtn4M0Fdh3qv4A FrTfD4nZG/+8AxF2XhMKtD6xd+1qPReVwBkQLzWnZSFmvqmF/O/j70uIRMRztSPxN6Awv/x1WzGFO 0MizoqrbyZ0ZQpl7cb/QozMxAeJs1YfPXkGCUInDMhD28Q29lG0n/1kka5lopxsqUb8lHvV9bqPtL PSBaxlIQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTNN-00000003H0H-3YGf; Tue, 06 Aug 2024 23:13:57 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTJe-00000003Ffx-3brU for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 23:10:09 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 871F6CE0FB1; Tue, 6 Aug 2024 23:10:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 21795C4AF52; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722985803; bh=+He+gtxBEfl84UV5f19qlMQcV5CCfyJDOMqxiVvtbII=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=aLbLyJxtYoDu5TGf0hBkTczCnA5tXznd/CqtRPoDueECJQqPixBgxrK1R6VJU4ALQ wHZifyZwJpUqkcXzqh6ZTUeJXh9uE8lwd+OxU3dU99uZ56ZTSP+q0vSy4QSJktfZ2x /tZyFRY2dnCmPxOfo9NVMRqfVfcLqsZZVeXzBKgqj3BArSKVY8my2wx9g9QVJssTD6 gNmwARWq1WXchHb2JkQ5HlE7cifTbfItuWLYcMPM7rUweSS21IVX5l3qCGZP/bNc0S UUfSWuCWYu8/aAQmFYejLcdLA2FzilLeIF0l4Ry824CqiUIGQZq5bXm3UEaPJIRGnc RI9UhDJq7BmUw== 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 13D5DC52D7D; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Wed, 07 Aug 2024 01:09:19 +0200 Subject: [PATCH 05/12] accessiblity/speakup: genmap and makemapdata require linux/version.h MIME-Version: 1.0 Message-Id: <20240807-macos-build-support-v1-5-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 X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1722985800; l=1496; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=D/b2l/ogAQ53pGShlNQZ21O8ea5Cj2WGeFYeW0o1yvE=; b=R4qyiYP+OSMcXzv9ooR7/t6MnLqProoNVp1nlUQ8nIYUNbvpy7GzUbYP6W8c5xRb6Xs1z5qrf NNsKqstejrNCJU8W3NSEixOEN8GSNjVGvk+o0yOAwyi6oB306luifET 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_161007_450418_64F09C2F X-CRM114-Status: UNSURE ( 9.19 ) X-CRM114-Notice: Please train this message. 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: Daniel Gomez Both genmap and makemapdata require the linux/version.h header. To ensure successful builds on macOS hosts, make sure usr/include is included in the HOSTCFLAGS. Fixes errors: drivers/accessibility/speakup/genmap.c:13:10: fatal error: 'linux/version.h' file not found 13 | #include | ^~~~~~~~~~~~~~~~~ 1 error generated. drivers/accessibility/speakup/makemapdata.c:13:10: fatal error: 'linux/version.h' file not found 13 | #include | ^~~~~~~~~~~~~~~~~ 1 error generated. Signed-off-by: Daniel Gomez --- drivers/accessibility/speakup/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/accessibility/speakup/Makefile b/drivers/accessibility/speakup/Makefile index 6f6a83565c0d..74ee0c31370f 100644 --- a/drivers/accessibility/speakup/Makefile +++ b/drivers/accessibility/speakup/Makefile @@ -38,6 +38,7 @@ clean-files := mapdata.h speakupmap.h # Generate mapdata.h from headers hostprogs += makemapdata makemapdata-objs := makemapdata.o +HOSTCFLAGS_makemapdata.o += -I$(srctree)/usr/include quiet_cmd_mkmap = MKMAP $@ cmd_mkmap = TOPDIR=$(srctree) \ @@ -51,6 +52,7 @@ $(obj)/mapdata.h: $(obj)/makemapdata # Generate speakupmap.h from mapdata.h hostprogs += genmap genmap-objs := genmap.o +HOSTCFLAGS_genmap.o += -I$(srctree)/usr/include $(obj)/genmap.o: $(obj)/mapdata.h quiet_cmd_genmap = GENMAP $@ From patchwork Tue Aug 6 23:09:20 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: 13755467 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 C82A8C52D6F for ; Tue, 6 Aug 2024 23:12:30 +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=FQqfQVBKIxMnZucJeN0zAukpS7cxRl1qD7QHEwejFIU=; b=02f5ZZvv4LSA0CcodzXAXveaYj 1xr5/8eQ0xe/PnR51VZ+wYjs0adkZA6Z9XomnUn8CjYAUGKDGngVWKI9CQUhIUnGtgNUFAbzhfK1q P7GV3sYL3vI0DSBR7/loGUx3bBfK6zoqqD51AxuzKlRkEMlubWo6Vmb4lyqluZsaY+McnQPp6rmkt Genor/w7C0Mfs9qZ5pV+xXwXnVl8Vm/dafMF2r7NVGppZHIGmanCEp/ZHnGHBMd4KMHH+E7MdLrX6 w0hXtzDTVetDs6ysp6aWZd2W08TuBOpNA8vJFY9g5trYhSlhvdmSN+dZBk7TUkEQx8Aa4ImFk/DNo 1Bk8vlsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTLo-00000003GSE-0bto; Tue, 06 Aug 2024 23:12:20 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTJd-00000003Ffs-1R4u for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 23:10:07 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 4222361155; Tue, 6 Aug 2024 23:10:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 331BDC4AF63; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722985803; bh=D5CNbSA2nd8+8BFJ/Lxf4zZjzdHe9mqU7tf5klT3gu0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=fOMwWeuX+6Lfvtx14e8n+SexhkQo577QRdYpNq9mh/HWXy2DjmUULeQdEJJrIovoE 4d52aBfFcg/yKGYahmwaE4dwPQjUrghawQhWXyDJ5WW/fZz8yjfflghGrX2ymxjf/9 UE2FKzdrsmYjDwZiau3Z0f4L3w6x0WaVYJc7HKru0bj+ALIaNZdjXYr8QpDabbF4oS rvxa8WAvV0gKqwLm+mmlC/cmHUk+lR1bEd9Fu375CaXb4Blquf5Ep1P6d4njo6wL+s pRjUvs3oJeJtI0h2h9ISbF5TaJrz9+zbtPn4QfswfOCDJTLvwo/Mi3QYIPUiitzfhK olW0RHxF3r0qA== 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 2813FC49EA1; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Wed, 07 Aug 2024 01:09:20 +0200 Subject: [PATCH 06/12] selinux/genheaders: include bitsperlong and posix_types headers MIME-Version: 1.0 Message-Id: <20240807-macos-build-support-v1-6-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 X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1722985800; l=952; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=zkjqCDDWwxxcXmEm+jW0QannFSOP4w7DOpEHzeqzznI=; b=KS1HzePsm7adJO0+ulRuXmL0XzGu396kl5PQIL/Y+Ha4sBVswReLg26gtWlRY9ulp9HZfXTef mC9Dy8SO9GADeLaEPqz0n4cBifOqORRoKLP9Y+NObQyFVh4zLY67qbh 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_161005_780533_F292CD0C X-CRM114-Status: GOOD ( 10.95 ) 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: Daniel Gomez The genheaders requires the bitsperlong.h and posix_types.h headers. To ensure these headers are found during compilation on macOS hosts, add usr/include to HOST_EXTRACFLAGS in the genheaders Makefile. This adjustment allows the compiler to locate all necessary headers when they are not available by default on macOS. Signed-off-by: Daniel Gomez --- scripts/selinux/genheaders/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/selinux/genheaders/Makefile b/scripts/selinux/genheaders/Makefile index 1faf7f07e8db..017149c90f8e 100644 --- a/scripts/selinux/genheaders/Makefile +++ b/scripts/selinux/genheaders/Makefile @@ -2,4 +2,5 @@ hostprogs-always-y += genheaders HOST_EXTRACFLAGS += \ -I$(srctree)/include/uapi -I$(srctree)/include \ - -I$(srctree)/security/selinux/include + -I$(srctree)/security/selinux/include \ + -I$(srctree)/usr/include From patchwork Tue Aug 6 23:09:21 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: 13755471 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 1A07CC52D6F for ; Tue, 6 Aug 2024 23:14:38 +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=Rtcve5e5FgIr7m9A384MxS+aO8I45lJiza4j+8yrpAM=; b=2lzO/5wTbsMXeeWVxfMo68AOdQ vVU+nK0VonEu7TiyT/sFPswITRWxim6hv9KBwlGbyJB6SW/FT+kjTXRIBpVunc1Ea4TZlhrf/Ry6l U3y8kkE+A4RtWuioesqHpHxXaWssl/TJsPDOOF7q9JrzAnjLDc8npXserCI1jFdvtlQU09ZQ98S48 b6ZoZTeWzngdjEvXjwrc2ROke+lGl1YsnyDEGHHoRtZ84K0TrEAFZXw5AzIAdZvBmY9cIRa5cDmH6 8xDGubvG7lJXUNVRqCo9ntuIgUh5zAt50oHXOFhLnnzkY26MRXCHS/tOjHYSoSm40NseUhSmnWM4g cYhu7Y2w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTNt-00000003H8l-1fDV; Tue, 06 Aug 2024 23:14:29 +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-00000003Fg7-3fZq for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 23:10:09 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 78DF8CE0FA4; Tue, 6 Aug 2024 23:10:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 4E0C3C4DDE3; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722985803; bh=v+3D4lb213MioskawpwIVm0n1gy9X7rS+9rTnnk/THc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=UcbTcNUCEVVl6oxvmOWw2BiT+ElArILeG1oAnslTRxcJ2Gi/SKYGJ3ADXB4KM/kSD 7zI3tsZhf2PmkVPU5R+uYhWu/TEhYxpocso0dOHhwOgkKklRBv6LdbJ77P9RHQXtaF ApdZKxzrcB/pDn5/1+TiL5lJPZhercu5kvwmQ0W8EooGSrDr+D92E/CzUSfxMOUrFX UnqvanuR+aWSDbCHLTEQEpKrHqWGS7wwJWna8YEFXu+DaJ5DlqM+KpV8TH56nbPlBR YxA2dAU+3VQstKQl5GgOjBjoX8itT3D0ZB6tVaFxDyGYk1zRBxPiivAZr6tuDRFo0o XwlIForxD80Qw== 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 40075C52D6F; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Wed, 07 Aug 2024 01:09:21 +0200 Subject: [PATCH 07/12] selinux/mdp: include bitsperlong and posix_types headers MIME-Version: 1.0 Message-Id: <20240807-macos-build-support-v1-7-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 X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1722985800; l=995; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=amef7shqe+/pJSAuEYnttZteE9emVf2D8FOtG6wVLQs=; b=eEEO2XdHsOnjD70zsmSUCRd3hvX9udH5ozkEUFwVyjIqPSuD7NI4opv6Ndry8dslEYtsT1ENp 5rF5WjiBGzLAJoGrJzqo1wNi95MqafOkOKXvTlY0lrf9E5wgwW5kr+C 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_161007_538902_3664F80D X-CRM114-Status: GOOD ( 10.99 ) 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: Daniel Gomez The mdp object requires the bitsperlong.h and posix_types.h headers. To ensure these headers are found during compilation on macOS hosts, add usr/include to HOST_EXTRACFLAGS in the genheaders Makefile. This adjustment allows the compiler to locate all necessary headers when they are not available by default on macOS. Signed-off-by: Daniel Gomez --- scripts/selinux/mdp/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/selinux/mdp/Makefile b/scripts/selinux/mdp/Makefile index d61058ddd15c..19ab8682ae3d 100644 --- a/scripts/selinux/mdp/Makefile +++ b/scripts/selinux/mdp/Makefile @@ -2,6 +2,7 @@ hostprogs-always-y += mdp HOST_EXTRACFLAGS += \ -I$(srctree)/include/uapi -I$(srctree)/include \ - -I$(srctree)/security/selinux/include -I$(objtree)/include + -I$(srctree)/security/selinux/include -I$(objtree)/include \ + -I$(srctree)/usr/include clean-files := policy.* file_contexts From patchwork Tue Aug 6 23:09:23 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: 13755473 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 2B486C52D6F for ; Tue, 6 Aug 2024 23:15:49 +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=QK+RRx51iZg+9ipooMFkOwCYAjhKgGjBVBKrBxaOivw=; b=iic6kx18EbkuWJvh2GEbISBpvE wIBlVYTRDTVL+Hty81TPjqt8V8ALyviIUD2ktI6fgxA2qVlHnNPKTV2PULOqmbJL3sxPDCqe96kA6 tSZk7QfMw8IXgZ//tfOB4w3qVNgQgao8U/6RaPqh51gFtG+4t96sdCGvKlBTDCrf4Fw5B6RQouh6e L5+4emMZoDeah4lbpClzmuX71H83s4XLCTVSgqqDfFnAL+k6HGbRboqohdL7oxcSWI2muLw+8noLg q3lqgJG9Q8sViXN+CoMh0Fne/OXFw/HPfuETmEvcNwkofnMe+PMmDnBc/aDIfpQq0qWZgGwp9ea8v hvFlqpYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTP0-00000003HYY-3Gor; Tue, 06 Aug 2024 23:15:38 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTJf-00000003Fh8-05n9 for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 23:10:10 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 602AB61154; Tue, 6 Aug 2024 23:10:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 951A6C32786; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722985803; bh=gwRv4pCIfpi2yjceV4ySL6EBr771qtq3A547owu3a/w=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=HSoAOz7rgsv66grJP/k15A/DykRnOnUycdinS56zDhlh/+0MsznkltnyXqLaIQlS/ W5IDRxorOQPhKfJ9WYrOqaOxnE5HJiGFn8950C5nnNSnI37BMiY3sOOqu6d6IBFATq pMkRLKfDdyW0maVEf47VNRRvnWZ26qYXfGPB3oga6zj+rceMe2ligh62y/KLT7JLG1 2cLkO59/ztuT3pDZowD7nauXyY5I9EunHsYsLE8ctnjgYWpXLnq2DH8BSivBpvcXuZ usDbMatguOvpXX2SjZlP10dK3Wi8Y8RNXSn7hGVqjZ1Fi5wvyKrOGQnIuPXB0JMClV 0VwV4/+XTmR5A== 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 87479C52D7B; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Wed, 07 Aug 2024 01:09:23 +0200 Subject: [PATCH 09/12] include: add endian.h support MIME-Version: 1.0 Message-Id: <20240807-macos-build-support-v1-9-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 X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1722985800; l=6952; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=DtZVbn0fWX0kStQGRH/0NcswkT82D02BPxc7A212O48=; b=fHToSejWCNC5a5Y0d5FDWxUWxPOD39gQvn8dIfP7DYUHRLm01btwYrXIxK+zbXzSjEERCFH2E Toa//DYARs3Ad+ILXuWzrEr8j9YMAEO2jiTPhk1LqJjkcFnDKwl/eqB 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_161007_261608_BC4A76F4 X-CRM114-Status: GOOD ( 19.57 ) 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: Daniel Gomez macOS hosts do not include endian.h header required for gen-hyper object. Add a copy of the include/endian.h from the GNU C Library (glibc), version glib-2.40 into include/endian and a copy of bits/ uintn-identity.h into include/endian/bits and update the gen-hyper Makefile to include the library path. Remove the following from glibc include/endian.h: diff --git a/include/endian/endian.h b/include/endian/endian.h index fd20a2b1985d..f70e07f1d3c6 100644 --- a/include/endian/endian.h +++ b/include/endian/endian.h @@ -18,11 +18,6 @@ #ifndef _ENDIAN_H #define _ENDIAN_H 1 -#include - -/* Get the definitions of __*_ENDIAN, __BYTE_ORDER, and __FLOAT_WORD_ORDER. */ -#include - #ifdef __USE_MISC # define LITTLE_ENDIAN __LITTLE_ENDIAN # define BIG_ENDIAN __BIG_ENDIAN @@ -30,9 +25,6 @@ # define BYTE_ORDER __BYTE_ORDER #endif -#if defined __USE_MISC && !defined __ASSEMBLER__ -/* Conversion interfaces. */ -# include # include # if __BYTE_ORDER == __LITTLE_ENDIAN @@ -67,6 +59,5 @@ # define be64toh(x) __uint64_identity (x) # define le64toh(x) __bswap_64 (x) # endif -#endif #endif /* endian.h */ Remove the following from glibc bits/uintn-identity.h: diff --git a/include/endian/bits/uintn-identity.h b/include/endian/bits/uintn-identity.h index 8104070583c7..0310c9d955da 100644 --- a/include/endian/bits/uintn-identity.h +++ b/include/endian/bits/uintn-identity.h @@ -23,8 +23,6 @@ #ifndef _BITS_UINTN_IDENTITY_H #define _BITS_UINTN_IDENTITY_H 1 -#include - /* These inline functions are to ensure the appropriate type conversions and associated diagnostics from macros that convert to a given endianness. */ Signed-off-by: Daniel Gomez --- arch/arm64/kvm/hyp/nvhe/Makefile | 2 +- include/endian/bits/uintn-identity.h | 48 +++++++++++++++++++++++++++ include/endian/endian.h | 63 ++++++++++++++++++++++++++++++++++++ 3 files changed, 112 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kvm/hyp/nvhe/Makefile b/arch/arm64/kvm/hyp/nvhe/Makefile index 40541c0812bf..1bbe2c2a4aed 100644 --- a/arch/arm64/kvm/hyp/nvhe/Makefile +++ b/arch/arm64/kvm/hyp/nvhe/Makefile @@ -15,7 +15,7 @@ ccflags-y += -fno-stack-protector \ $(DISABLE_STACKLEAK_PLUGIN) hostprogs := gen-hyprel -HOST_EXTRACFLAGS += -I$(objtree)/include -I$(srctree)/include/elf +HOST_EXTRACFLAGS += -I$(objtree)/include -I$(srctree)/include/elf -I$(srctree)/include/endian lib-objs := clear_page.o copy_page.o memcpy.o memset.o lib-objs := $(addprefix ../../../lib/, $(lib-objs)) diff --git a/include/endian/bits/uintn-identity.h b/include/endian/bits/uintn-identity.h new file mode 100644 index 000000000000..0310c9d955da --- /dev/null +++ b/include/endian/bits/uintn-identity.h @@ -0,0 +1,48 @@ +/* Inline functions to return unsigned integer values unchanged. + Copyright (C) 2017-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#if !defined _NETINET_IN_H && !defined _ENDIAN_H +# error "Never use directly; include or instead." +#endif + +#ifndef _BITS_UINTN_IDENTITY_H +#define _BITS_UINTN_IDENTITY_H 1 + +/* These inline functions are to ensure the appropriate type + conversions and associated diagnostics from macros that convert to + a given endianness. */ + +static __inline __uint16_t +__uint16_identity (__uint16_t __x) +{ + return __x; +} + +static __inline __uint32_t +__uint32_identity (__uint32_t __x) +{ + return __x; +} + +static __inline __uint64_t +__uint64_identity (__uint64_t __x) +{ + return __x; +} + +#endif /* _BITS_UINTN_IDENTITY_H. */ diff --git a/include/endian/endian.h b/include/endian/endian.h new file mode 100644 index 000000000000..f70e07f1d3c6 --- /dev/null +++ b/include/endian/endian.h @@ -0,0 +1,63 @@ +/* Copyright (C) 1992-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _ENDIAN_H +#define _ENDIAN_H 1 + +#ifdef __USE_MISC +# define LITTLE_ENDIAN __LITTLE_ENDIAN +# define BIG_ENDIAN __BIG_ENDIAN +# define PDP_ENDIAN __PDP_ENDIAN +# define BYTE_ORDER __BYTE_ORDER +#endif + +# include + +# if __BYTE_ORDER == __LITTLE_ENDIAN +# define htobe16(x) __bswap_16 (x) +# define htole16(x) __uint16_identity (x) +# define be16toh(x) __bswap_16 (x) +# define le16toh(x) __uint16_identity (x) + +# define htobe32(x) __bswap_32 (x) +# define htole32(x) __uint32_identity (x) +# define be32toh(x) __bswap_32 (x) +# define le32toh(x) __uint32_identity (x) + +# define htobe64(x) __bswap_64 (x) +# define htole64(x) __uint64_identity (x) +# define be64toh(x) __bswap_64 (x) +# define le64toh(x) __uint64_identity (x) + +# else +# define htobe16(x) __uint16_identity (x) +# define htole16(x) __bswap_16 (x) +# define be16toh(x) __uint16_identity (x) +# define le16toh(x) __bswap_16 (x) + +# define htobe32(x) __uint32_identity (x) +# define htole32(x) __bswap_32 (x) +# define be32toh(x) __uint32_identity (x) +# define le32toh(x) __bswap_32 (x) + +# define htobe64(x) __uint64_identity (x) +# define htole64(x) __bswap_64 (x) +# define be64toh(x) __uint64_identity (x) +# define le64toh(x) __bswap_64 (x) +# endif + +#endif /* endian.h */ From patchwork Tue Aug 6 23:09:24 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: 13755474 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 6CCEEC52D6F for ; Tue, 6 Aug 2024 23:16:24 +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=oVqKyJ7sCHW4ByYRkNZS+wQRSCmUSIIiS6NMdnp5mAs=; b=xyvAOTDVLbflC0kFVpbQm08LgB LRMhh/zl+6i7IekwbDjrEMQsy86VKisSBL8unBkJ1b68aG7bmMEJ7Ns3Wc8gDZMt3HVJ8Bdo5+eEE Sfx8DGcIIcLxPiznOx3tsVhKOo9DgT348+a3QEqqXP6lxxRks9C4ub0TiSFzKeTeoewmehwef6V1d uVOXEi/5FVcvygJex907oIenSng9tWx0JJGm/agS0EVifEFcPsDOM8aCyg528kZFtLCbRHHgn9Vpm Mj9DE4rEpZaA+fkUZLc1TLOMQlPAKmHWRWmukPnZVC/ZU2K0rlm4+E2aaeh8rmYRZdZl+BD7F2UcO 84r9M9xA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTPW-00000003Hiy-3McG; Tue, 06 Aug 2024 23:16:10 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTJf-00000003FhT-1MGg for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 23:10:10 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 6FF7961161; Tue, 6 Aug 2024 23:10:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id AC059C4DDF2; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722985803; bh=9e5HihbYrzW+yqMwPJuNIyYK7+g4nznwrO87MB3vxcw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=o+lQ8BSoR4Ju/qZlqGOlRz8W2f4q625HDTETwcqpRBjBIpAHGmQ4EhMKKTCrVreRQ cIij2h8u3Uj6gXm5CHjB8ZQimA5YafQ9XWOV2o1uu3tZBWOvgIMFI8AFfFiJ0dI92M aoytBlmDJanRB8H64UdAlaPbXPnzN4D/Wc3OFyrsX5han8E3MgpLOUmmDDLWEAHz9y p+5O8jYXU7kKMItQ7ePyHdVWGORIV+pm5SYHGS28lg/JmvXwTxkuGKyTZ97qEWWWqF AjIMrzZ4mMs+L8E3mvHZQYOkKmBB3WEHGFQ6jwmqa8mALLsYxxk4D8WrcyhqZtG2kx h3F7SMY6psQPQ== 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 9C3E3C52D7C; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Wed, 07 Aug 2024 01:09:24 +0200 Subject: [PATCH 10/12] scripts/mod: add byteswap support MIME-Version: 1.0 Message-Id: <20240807-macos-build-support-v1-10-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 X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1722985800; l=5000; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=Qowyf7kXi1f6DRNle64eE+hm/m7HuihHCLdS1ou6yWA=; b=XP/CA3ITn/u6BrAjNNPHqWBAlVrrGINO1YjcxsqBUDayPo6aLVaS+rjtkAXOWZpLD9D5LKteD curVBFT06iiCK+55uBnnvP0sGKgQlV/aIMRgcPJ3CQmwNbgNCAfx2DS 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_161007_696815_EAF97C1B X-CRM114-Status: GOOD ( 19.77 ) 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: Daniel Gomez macOS hosts do not include byteswap.h header required for modpost objects. Add a copy of the string/byteswap.h from the GNU C Library (glibc), version glibc-2.40 into include/byteswap and update the modpost Makefile to include the library. Remove the following headers from glibc: diff --git a/include/byteswap/byteswap.h b/include/byteswap/byteswap.h index 66efb8fc4327..d27dd5e4bc6a 100644 --- a/include/byteswap/byteswap.h +++ b/include/byteswap/byteswap.h @@ -19,11 +19,6 @@ #ifndef _BYTESWAP_H #define _BYTESWAP_H 1 -#include - -/* Get the machine specific, optimized definitions. */ -#include - /* The following definitions must all be macros, otherwise some of the possible optimizations are not possible. */ Fixes build error for macOS: $SUBARCH is [arm64] HOSTCC scripts/mod/modpost.o HOSTCC scripts/mod/sumversion.o HOSTCC scripts/mod/symsearch.o HOSTCC scripts/mod/file2alias.o In file included from scripts/mod/symsearch.c:8: scripts/mod/modpost.h:2:10: fatal error: 'byteswap.h' file not found ^~~~~~~~~~~~ In file included from scripts/mod/sumversion.c:11: scripts/mod/modpost.h:2:10: fatal error: 'byteswap.h' file not found ^~~~~~~~~~~~ In file included from scripts/mod/modpost.c:23: scripts/mod/modpost.h:2:10: fatal error: 'byteswap.h' file not found ^~~~~~~~~~~~ 1 error generated. make[1]: *** [scripts/Makefile.host:133: scripts/mod/symsearch.o] Error 1 make[1]: *** Waiting for unfinished jobs.... 1 error generated. In file included from scripts/mod/file2alias.c:15: scripts/mod/modpost.h:2:10: fatal error: 'byteswap.h' file not found ^~~~~~~~~~~~ make[1]: *** [scripts/Makefile.host:133: scripts/mod/sumversion.o] Error 1 1 error generated. make[1]: *** [scripts/Makefile.host:133: scripts/mod/modpost.o] Error 1 1 error generated. make[1]: *** [scripts/Makefile.host:133: scripts/mod/file2alias.o] Error 1 make: *** [Makefile:1191: prepare0] Error 2 error: Recipe `kernel-build` failed with exit code 2 Fixes: bd78c9d71420 ("modpost: define TO_NATIVE() using bswap_* functions") build error for macOS. Signed-off-by: Daniel Gomez --- include/byteswap/byteswap.h | 35 +++++++++++++++++++++++++++++++++++ scripts/mod/Makefile | 8 ++++---- 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/include/byteswap/byteswap.h b/include/byteswap/byteswap.h new file mode 100644 index 000000000000..d27dd5e4bc6a --- /dev/null +++ b/include/byteswap/byteswap.h @@ -0,0 +1,35 @@ +/* Swap byte order for 16, 32 and 64 bit values + Copyright (C) 1997-2024 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _BYTESWAP_H +#define _BYTESWAP_H 1 + + +/* The following definitions must all be macros, otherwise some + of the possible optimizations are not possible. */ + +/* Return a value with both bytes in the 16 bit argument swapped. */ +#define bswap_16(x) __bswap_16 (x) + +/* Return a value with all bytes in the 32 bit argument swapped. */ +#define bswap_32(x) __bswap_32 (x) + +/* Return a value with all bytes in the 64 bit argument swapped. */ +#define bswap_64(x) __bswap_64 (x) + +#endif /* byteswap.h */ diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile index 98b4cd8cc7e6..f398dcddef58 100644 --- a/scripts/mod/Makefile +++ b/scripts/mod/Makefile @@ -8,10 +8,10 @@ modpost-objs := modpost.o file2alias.o sumversion.o symsearch.o devicetable-offsets-file := devicetable-offsets.h -HOSTCFLAGS_modpost.o = -I$(srctree)/include/elf -HOSTCFLAGS_file2alias.o = -I$(srctree)/include/elf -HOSTCFLAGS_sumversion.o = -I$(srctree)/include/elf -HOSTCFLAGS_symsearch.o = -I$(srctree)/include/elf +HOSTCFLAGS_modpost.o = -I$(srctree)/include/elf -I$(srctree)/include/byteswap +HOSTCFLAGS_file2alias.o = -I$(srctree)/include/elf -I$(srctree)/include/byteswap +HOSTCFLAGS_sumversion.o = -I$(srctree)/include/elf -I$(srctree)/include/byteswap +HOSTCFLAGS_symsearch.o = -I$(srctree)/include/elf -I$(srctree)/include/byteswap HOSTCFLAGS_mk_elfconfig.o = -I$(srctree)/include/elf $(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s FORCE From patchwork Tue Aug 6 23:09:25 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: 13755472 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 6A268C52D6F for ; Tue, 6 Aug 2024 23:15:18 +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=orWO7CQHl0q2zZKgDpAphY/SHc5hiN/jwU6fioFvwhg=; b=ygRfAI3uH6vKww1SzBKpEsMJF0 XJKWilDMfE9cFXRgQ2QvskTa0XxHdk8nY9P1gdtmZEFYtG1FLJFfhbRTpwjaKLubOl66NjR8GN2PM STgWxrs58dnL6sbeUVR5/rYb3+jeG/eV/zERZufvIlDRV7rWnO4Tcna9Pey0RgN940bzln/eG2c04 7KFOdKah+6SLelmhh8UiVtulQKv4SusGAP1DjElbInCQOfMWi7LAdoBBiQlaZMw6go6JeZ1YtZZRc 9LYYhwfv+8NKukoK6ICQp2ivJEgBZNCzLZ2IldMBjMYfRJBMcg/QuTKgLfo2clhyS9q0oBNkfRVju yhcUAX2Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTOT-00000003HL9-3UzC; Tue, 06 Aug 2024 23:15:05 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTJf-00000003FhU-1K9w for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 23:10:09 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id A1E1461173; Tue, 6 Aug 2024 23:10:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id BC8D9C4AF1C; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722985803; bh=JOwNCNr3/IEbe6BdNnnrPTwJINMvSZj5yZCINdET7DM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=d1tdHXXGxre4WSP+5XHhbrZaAFl9Q1axTlOCxWPyt0PC+zHC5BPvvBMCXPxJ5VQPQ D/MKgQHR6vbSQV3xdkFAZ/FjkZFAGbq2Mhb5PonaeTYS7pTdpS3TKqZcqo+TzgG+Uw fpzPYYvGH8RF4B8nDZDoBPruy+MECvLKlGrh/gif7Kofoz15Xs5ofSpukwv4A6lgXC 6b0fkVNKMKXF5pf05LOBnSUX58K9ml4QGZ+UQUC/UJzNI7jmYDK+UoOJgLqDwPCBrh +uomJrEsMpLCrEGtUP6Kk1JIJ65rwcpNSVxo+XEvqZ93peIKWNNwnPJdTWXcKGtneW aF6P7uexYQfhA== 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 AF56DC49EA1; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Wed, 07 Aug 2024 01:09:25 +0200 Subject: [PATCH 11/12] tty/vt: conmakehash requires linux/limits.h MIME-Version: 1.0 Message-Id: <20240807-macos-build-support-v1-11-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 X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1722985800; l=1705; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=GlY+ZLQcYSKSN3SyY915ZDHwX28gVnVDJorFIIf1+Jo=; b=TXC+qEwbi6LwhRfspoNf9uCJM5mS5rpVYHpZ3bnRG1KFrfzm+UI/apLoI43ShxbZHbpUUEVBL CkbYZiLdsfUA4G8wSWyMc3cIK3tGKT6BD0jGlYhjBBXl1eg0MflhqKS 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_161007_614564_CC7FF687 X-CRM114-Status: UNSURE ( 9.78 ) X-CRM114-Notice: Please train this message. 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: Daniel Gomez macOS hosts do not provide the linux/limits.h header required for conmakehash. To address this, ensure that usr/include is included in the conmakehash HOSTCFLAGS. This will provide the necessary header for successful compilation on macOS. Fixes error: HOSTCC drivers/tty/vt/conmakehash - due to target missing clang -Wp,-MMD,drivers/tty/vt/.conmakehash.d -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11 -I ./scripts/include -o drivers/tty/vt/conmakehash drivers/tty/vt/conmakehash.c drivers/tty/vt/conmakehash.c:15:10: fatal error: 'linux/ limits.h' file not found 15 | #include | ^~~~~~~~~~~~~~~~ 1 error generated. make[5]: *** [scripts/Makefile.host:116: drivers/tty/vt/conmakehash] Error 1 make[4]: *** [scripts/Makefile.build:485: drivers/tty/vt] Error 2 make[3]: *** [scripts/Makefile.build:485: drivers/tty] Error 2 make[2]: *** [scripts/Makefile.build:485: drivers] Error 2 make[1]: *** [/Volumes/src/kernel/linux-next/Makefile:1925: .] Error 2 make: *** [Makefile:224: __sub-make] Error 2 Signed-off-by: Daniel Gomez --- drivers/tty/vt/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/tty/vt/Makefile b/drivers/tty/vt/Makefile index 2c8ce8b592ed..d266895357e5 100644 --- a/drivers/tty/vt/Makefile +++ b/drivers/tty/vt/Makefile @@ -13,6 +13,7 @@ obj-$(CONFIG_CONSOLE_TRANSLATIONS) += consolemap.o consolemap_deftbl.o clean-files := consolemap_deftbl.c defkeymap.c hostprogs += conmakehash +HOSTCFLAGS_conmakehash.o = -I$(srctree)/usr/include quiet_cmd_conmk = CONMK $@ cmd_conmk = $(obj)/conmakehash $< > $@ From patchwork Tue Aug 6 23:09:26 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: 13755475 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 2FD76C49EA1 for ; Tue, 6 Aug 2024 23:16:51 +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=aUOvblp4fDpVRov6+fu6hGAM0cHI/QGThPhRmwuSBy8=; b=GyGLyVMNeqB/fIeLayLo9aT73Z qU/Ii5M/wuHsEWw9rn3bHgy3d6EFksCtEjy/PdCDeiyOfYB+fZM9/cGIB/qxymy2gvhqnyXt8lQl6 TuhBdyVdb16784wnc4fS98wcYD7QPFp7buF8O8tfdK/lrMPHLY+x91im2sqP086Htt6IOGmfNGiaU JqmpSQF6/tcIo5cPsPxWpl7fdT3S2vCHqFIfvLQLkDqR6TU3ZK3jfCXykBYOEklIzPc1tNJ21NbjK WDDu+ZLV14qxnjtWr08iZbpWngnUK/M8a4aVrgiqa64oEpE6rPsGNfxJaqNBbV057XxfP/tQAmr7v yTJQSkBg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTQ1-00000003HnV-2AIB; Tue, 06 Aug 2024 23:16:41 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sbTJf-00000003Fi0-3ef0 for linux-arm-kernel@lists.infradead.org; Tue, 06 Aug 2024 23:10:10 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id B608B6117C; Tue, 6 Aug 2024 23:10:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id DB346C4AF16; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1722985804; bh=F/61/VQXtzneQgOaAhBFTxqHT0QyvEg2fHmrDz3d6fc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=bAwtcOMC8uO9tQnqyMg3XmA8qwx6z04MqrogLLb2sa0ckkM37lEQCb10pqiKe5Sh1 fmisLW9J+woUaDJ1WuRkdMlf2ppQaPwmanZ1ABs7nrUmoeOywkpZbOvijM0iJgZSr+ GRrc+9SDnopW0bT7lbT4XbO+bPLex8HyZUrSExZxqT2uc+CucKsSSiDYhc2dyTs/se q3HQRFQnsfAs13xFXF0v164/6XO2YrL130OLGwcMh3XlYX99l7xORXhsy54KZAf4qk ka5IeQgoPsUv1Pncs0bCSiRpdk+AYCOSJ61umxoJoNVYkY9UujpLl7drVDp3WCEszh zeN2ZldHpKbhQ== 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 CCECFC52D6F; Tue, 6 Aug 2024 23:10:03 +0000 (UTC) From: Daniel Gomez via B4 Relay Date: Wed, 07 Aug 2024 01:09:26 +0200 Subject: [PATCH 12/12] scripts/kallsyms: add compatibility support for macos MIME-Version: 1.0 Message-Id: <20240807-macos-build-support-v1-12-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 X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1722985800; l=1149; i=da.gomez@samsung.com; s=20240621; h=from:subject:message-id; bh=m407j60dxP91/ofe/fC4k8KKLnSnwDft1+cuKD+Nr3Q=; b=9wVc3kFNW+eWlInTH68OVYW9lOTG64z9J8uGc06BNi0UKGSdgCWwd1pkJsrDb88EilcZAB+Hc BJiETDqZxOnA90nq/6n8hSEX1pXA+98beHklgtsWgzrpZRnNCLjTyIj 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_161008_198523_CF1CEA67 X-CRM114-Status: GOOD ( 11.93 ) 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: Daniel Gomez Commit 67bf347ba924 ("kbuild: remove PROVIDE() for kallsyms symbols") introduces the use of scripts/kallsyms with /dev/null as input to generate the kernel symbols file. This results in getline() returning ENOTTY as the errno value on macOS hosts. To handle this different behavior, add a specific #ifdef condition for macOS. Fixes: + scripts/kallsyms --base-relative /dev/null read_symbol: Inappropriate ioctl for device make[1]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1 make: *** [Makefile:1172: vmlinux] Error 2 Signed-off-by: Daniel Gomez --- scripts/kallsyms.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 0ed873491bf5..cb200120a072 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -130,7 +130,11 @@ static struct sym_entry *read_symbol(FILE *in, char **buf, size_t *buf_len) errno = 0; readlen = getline(buf, buf_len, in); if (readlen < 0) { +#ifndef __APPLE__ if (errno) { +#else + if (errno && errno != ENOTTY) { +#endif perror("read_symbol"); exit(EXIT_FAILURE); }