From nobody Sat Nov 23 22:56:43 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A48613AD26; Sat, 9 Nov 2024 16:55:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731171333; cv=none; b=aHi8znXGjwprSVsmpPzkbIjrM/lQ4UC9e3McrT6XzW4tCpxuUuSvgKLFYjPriExjx9F5azmh7ILQUmpHRv0NSbt9wKKGr0DYFxs65nWWlxYrHBUbXrimZB2f2ud/Cl2G+QAEee1riqYxJUA/Diu5fya0JqdkVwcmiTc63SWRNUI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731171333; c=relaxed/simple; bh=GJ6OMCNdBUV+NNO8nN3bK8dKyElJu2aj9aL34bm5n5Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ISEgkV5Q5WWM+7+TVm8STVJxkTeweNU873DWA3qZ4qcEv33QEVWzKAndm3EI3mCZtTE/JxzQGJGSyeKfqpTuaMX1SkxA0WmqXAmdZTnytWKO6sql4RgqOBeX06QeoLvOFiBcWy7qrmcBKJ/0yB3klvnkDyw6EqasB7pULOdlSVI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=XnXRXcnT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="XnXRXcnT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3EA70C4CECE; Sat, 9 Nov 2024 16:55:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731171332; bh=GJ6OMCNdBUV+NNO8nN3bK8dKyElJu2aj9aL34bm5n5Q=; h=From:To:Cc:Subject:Date:From; b=XnXRXcnT0HT8LGGtWLEqGxacbrdkqj6/FodCWnCn8c2gdMX55kLKYdw63fUXPFqpC CuVg2VUnkp/ehniV9g7Tul8EzJL6W4GuwPPGqeNNWJkcEtHV8j5UEJBveH1iN79a6N O1gcjJ59NAYPfFhHLGUdfkgYAXuehlssL48j3Nu3iheQJUjvNDJha7nq2SSd1iNEtM Wr05cM70nH227a/KWCYtr0GDwRv4NeUrQBK4FGKZXxoXQKIRVy1SQpPwZFk+RXDiqc bV8oDEapr1diWFzwpFMP3ptowke8n3Uwsx8TKIFmRb2TL28ri6DolGHZ7RSCjyPAFL sjzrnOK9t/Oag== From: Miguel Ojeda To: Steven Rostedt , Masami Hiramatsu , Miguel Ojeda , Alex Gaynor Cc: Mark Rutland , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, Boqun Feng , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , rust-for-linux@vger.kernel.org, patches@lists.linux.dev, Stephen Rothwell , Linux Next Mailing List Subject: [PATCH RESEND] samples: rust: fix `rust_print` build making it a combined module Date: Sat, 9 Nov 2024 17:55:20 +0100 Message-ID: <20241109165520.1461400-1-ojeda@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The `rust_print` module, when built as a module, fails to build with: ERROR: modpost: missing MODULE_LICENSE() in samples/rust/rust_print_eve= nts.o ERROR: modpost: "__tracepoint_rust_sample_loaded" [samples/rust/rust_pr= int.ko] undefined! ERROR: modpost: "rust_do_trace_rust_sample_loaded" [samples/rust/rust_p= rint.ko] undefined! Fix it by building it as a combined one. Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/all/20241108152149.28459a72@canb.auug.org.a= u/ Fixes: 91d39024e1b0 ("rust: samples: add tracepoint to Rust sample") Signed-off-by: Miguel Ojeda Reviewed-by: Alice Ryhl --- Steven: please feel free to rebase the original if that is better for you, but in case you prefer a formal patch on top, here it is. Thanks! samples/rust/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/samples/rust/Makefile b/samples/rust/Makefile index f29280ec4820..17017115657d 100644 --- a/samples/rust/Makefile +++ b/samples/rust/Makefile @@ -2,6 +2,8 @@ ccflags-y +=3D -I$(src) # needed for trace events obj-$(CONFIG_SAMPLE_RUST_MINIMAL) +=3D rust_minimal.o -obj-$(CONFIG_SAMPLE_RUST_PRINT) +=3D rust_print.o rust_print_events.o +obj-$(CONFIG_SAMPLE_RUST_PRINT) +=3D rust-print.o + +rust-print-y :=3D rust_print.o rust_print_events.o subdir-$(CONFIG_SAMPLE_RUST_HOSTPROGS) +=3D hostprogs base-commit: 91d39024e1b02914cc5e2dbc137908e29b269ce4 -- 2.47.0