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,