mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:44:45 +01:00
`ModuleParamAccess` uses `SetOnce`, which depends on the helper functions
so the `macros` crate example under `rusttest` fails to build:
---- rust/macros/lib.rs - module (line 62) stdout ----
error: linking with `cc` failed: exit status: 1
|
= note: "cc" "-m64" ...
= note: some arguments are omitted. use `--verbose` to show all linker arguments
= note: rust-lld: error: undefined symbol: rust_helper_atomic_try_cmpxchg_relaxed
>>> referenced by kernel.ecd446ce39a5fcbb-cgu.3
>>> kernel.kernel.ecd446ce39a5fcbb-cgu.3.rcgu.o:(kernel::sync::set_once::SetOnce$LT$T$GT$::populate::h8b02644e30bd70bc) in archive ./rust/test/libkernel.rlib
rust-lld: error: undefined symbol: rust_helper_atomic_set_release
>>> referenced by kernel.ecd446ce39a5fcbb-cgu.3
>>> kernel.kernel.ecd446ce39a5fcbb-cgu.3.rcgu.o:(kernel::sync::set_once::SetOnce$LT$T$GT$::populate::h8b02644e30bd70bc) in archive ./rust/test/libkernel.rlib
collect2: error: ld returned 1 exit status
Thus ignore that example to fix the error.
[ Only the first one is needed (the other example does not use
parameters), so we can keep it enabled. Thus I removed that second
deletion (and reworded a bit).
We may want to do something better here later on; on the other hand,
we should get KUnit tests for `macros` too eventually, so we may end
up removing or repurposing that target anyway, so it is not a big deal.
- Miguel ]
Reported-by: Miguel Ojeda <ojeda@kernel.org>
Closes: https://lore.kernel.org/rust-for-linux/CANiq72mEYacdZmHKvpbahJzO_X_qqYyiSiSTYaWEQZAfp6sbxg@mail.gmail.com/
Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
Fixes:
|
||
|---|---|---|
| .. | ||
| concat_idents.rs | ||
| export.rs | ||
| fmt.rs | ||
| helpers.rs | ||
| kunit.rs | ||
| lib.rs | ||
| module.rs | ||
| paste.rs | ||
| quote.rs | ||
| vtable.rs | ||