From nobody Sat Nov 23 23:09:15 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 3FB151F26D7; Fri, 8 Nov 2024 21:51:38 +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=1731102699; cv=none; b=ajcC/0fAD1u7bux1h2HOPhLm7kSMNt8dsmyv3NEfeDTGdouymbRu1Kzx00DHeaNvajlI2H/FLeBPpb9r5O0c3Kt3Vq6RhUtU5tdRDEXEKFTcb3kF8dU3mIkTfU58gStOLJOAfGqnqMLHc4Bppbvr8vbjzKzAASKCrF6lrGlbruw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731102699; c=relaxed/simple; bh=GJ6OMCNdBUV+NNO8nN3bK8dKyElJu2aj9aL34bm5n5Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WjVlfA0J6OnM9zvfkpVFXu+6UPDtZ+YVtnpA/0Aj3Ic8HatggPvVu7dph/CqrKBjIjOR+HNBiPH72McmXTnINt7QeoI6VgEkHg0BFdkTGXQybXRVYLdF9Jep/EL9alnNNKYuCKKRBETqwyHaqjR0uhbrj6kn109gWjUUsSzPSEw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DHrwgeWg; 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="DHrwgeWg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 193FEC4CECD; Fri, 8 Nov 2024 21:51:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1731102698; bh=GJ6OMCNdBUV+NNO8nN3bK8dKyElJu2aj9aL34bm5n5Q=; h=From:To:Cc:Subject:Date:From; b=DHrwgeWgDpX2VcmIQMIr0DSQqaqobfi7UnlJoB6xCHZuZcFNAqxIaNWaKP/M4c7K3 xxwYYPoAe8wWYH5gSMFEQ8ywyJwzRDmlg8wZZ6ha8TEExavRagEgOaJboiZHL/gmPA FRQyqMlD+QMw536uLoeQN+2i2WOHGy1BAES+PlkDMVJKhwIWm7drMLRPTvSkI3E+f0 nstt2riJuVImJ9REQCNZcEBQugeNyVVrohzByEtIg7imPhaT5Bsl/Jpr6Uir/o+lHd PPhET1lVXvwiYO2KQYwXzqoxLJ59GASic+a8roni98dHYz3xW6n2av98LZJYOwfx2y yaikL4QuRlpyg== From: Miguel Ojeda To: Steven Rostedt , Alice Ryhl Cc: Stephen Rothwell , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Trevor Gross , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Miguel Ojeda , Masami Hiramatsu , Linux Next Mailing List Subject: [PATCH] samples: rust: fix `rust_print` build making it a combined module Date: Fri, 8 Nov 2024 22:51:15 +0100 Message-ID: <20241108215115.1398033-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 --- 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