Skip to content

Commit 22193c5

Browse files
ojedarostedt
authored andcommitted
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 <[email protected]> Cc: Alex Gaynor <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Boqun Feng <[email protected]> Cc: Gary Guo <[email protected]> Cc: Björn Roy Baron <[email protected]> Cc: Benno Lossin <[email protected]> Cc: Andreas Hindborg <[email protected]> Cc: Alice Ryhl <[email protected]> Cc: Trevor Gross <[email protected]> Cc: "Linux Next Mailing List" <[email protected]> Link: https://lore.kernel.org/[email protected] Reported-by: Stephen Rothwell <[email protected]> Closes: https://lore.kernel.org/all/[email protected]/ Fixes: 91d3902 ("rust: samples: add tracepoint to Rust sample") Signed-off-by: Miguel Ojeda <[email protected]> Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent 169484a commit 22193c5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

samples/rust/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
ccflags-y += -I$(src) # needed for trace events
33

44
obj-$(CONFIG_SAMPLE_RUST_MINIMAL) += rust_minimal.o
5-
obj-$(CONFIG_SAMPLE_RUST_PRINT) += rust_print.o rust_print_events.o
5+
obj-$(CONFIG_SAMPLE_RUST_PRINT) += rust_print.o
6+
7+
rust_print-y := rust_print_main.o rust_print_events.o
68

79
subdir-$(CONFIG_SAMPLE_RUST_HOSTPROGS) += hostprogs
File renamed without changes.

0 commit comments

Comments
 (0)