[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20241112112601.58aed250@gandalf.local.home>
Date: Tue, 12 Nov 2024 11:26:01 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: LKML <linux-kernel@...r.kernel.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>, Mathieu Desnoyers
<mathieu.desnoyers@...icios.com>, Miguel Ojeda <ojeda@...nel.org>, Alex
Gaynor <alex.gaynor@...il.com>, Mark Rutland <mark.rutland@....com>, Boqun
Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>, Benno Lossin
<benno.lossin@...ton.me>, Andreas Hindborg <a.hindborg@...nel.org>, Alice
Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>
Subject: [for-next][PATCH] samples: rust: fix `rust_print` build making it a
combined module
git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git
rust/for-next
Head SHA1: 22193c586b43ee88d66954395885742a6e4a49a9
Miguel Ojeda (1):
samples: rust: fix `rust_print` build making it a combined module
----
samples/rust/Makefile | 4 +++-
samples/rust/{rust_print.rs => rust_print_main.rs} | 0
2 files changed, 3 insertions(+), 1 deletion(-)
rename samples/rust/{rust_print.rs => rust_print_main.rs} (100%)
---------------------------
commit 22193c586b43ee88d66954395885742a6e4a49a9
Author: Miguel Ojeda <ojeda@...nel.org>
Date: Mon Nov 11 23:08:05 2024 +0100
samples: rust: fix `rust_print` build making it a combined module
The `rust_print` module, when built as a module, fails to build with:
ERROR: modpost: missing MODULE_LICENSE() in samples/rust/rust_print_events.o
ERROR: modpost: "__tracepoint_rust_sample_loaded" [samples/rust/rust_print.ko] undefined!
ERROR: modpost: "rust_do_trace_rust_sample_loaded" [samples/rust/rust_print.ko] undefined!
Fix it by building it as a combined one.
Cc: Masami Hiramatsu <mhiramat@...nel.org>
Cc: Alex Gaynor <alex.gaynor@...il.com>
Cc: Mark Rutland <mark.rutland@....com>
Cc: Boqun Feng <boqun.feng@...il.com>
Cc: Gary Guo <gary@...yguo.net>
Cc: Björn Roy Baron <bjorn3_gh@...tonmail.com>
Cc: Benno Lossin <benno.lossin@...ton.me>
Cc: Andreas Hindborg <a.hindborg@...nel.org>
Cc: Alice Ryhl <aliceryhl@...gle.com>
Cc: Trevor Gross <tmgross@...ch.edu>
Cc: "Linux Next Mailing List" <linux-next@...r.kernel.org>
Link: https://lore.kernel.org/20241111220805.708889-1-ojeda@kernel.org
Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Closes: https://lore.kernel.org/all/20241108152149.28459a72@canb.auug.org.au/
Fixes: 91d39024e1b0 ("rust: samples: add tracepoint to Rust sample")
Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
diff --git a/samples/rust/Makefile b/samples/rust/Makefile
index f29280ec4820..c1a5c1655395 100644
--- a/samples/rust/Makefile
+++ b/samples/rust/Makefile
@@ -2,6 +2,8 @@
ccflags-y += -I$(src) # needed for trace events
obj-$(CONFIG_SAMPLE_RUST_MINIMAL) += rust_minimal.o
-obj-$(CONFIG_SAMPLE_RUST_PRINT) += rust_print.o rust_print_events.o
+obj-$(CONFIG_SAMPLE_RUST_PRINT) += rust_print.o
+
+rust_print-y := rust_print_main.o rust_print_events.o
subdir-$(CONFIG_SAMPLE_RUST_HOSTPROGS) += hostprogs
diff --git a/samples/rust/rust_print.rs b/samples/rust/rust_print_main.rs
similarity index 100%
rename from samples/rust/rust_print.rs
rename to samples/rust/rust_print_main.rs
Powered by blists - more mailing lists