File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# SPDX-License-Identifier: GPL-2.0
22
3- obj-$(CONFIG_RUST) += core.o compiler_builtins.o helpers.o
3+ obj-$(CONFIG_RUST) += core.o compiler_builtins.o
44always-$(CONFIG_RUST) += exports_core_generated.h
55
6+ # Missing prototypes are expected in the helpers since these are exported
7+ # for Rust only, thus there is no header nor prototypes.
8+ obj-$(CONFIG_RUST) += helpers.o
9+ CFLAGS_REMOVE_helpers.o = -Wmissing-prototypes
10+
611always-$(CONFIG_RUST) += libmacros.so
712no-clean-files += libmacros.so
813
@@ -253,9 +258,11 @@ quiet_cmd_bindgen_helper = BINDGEN $@
253258 --use-core --with-derive-default --ctypes-prefix c_types \
254259 --no-debug '.*' \
255260 --size_t-is-usize -o $@ -- $(bindgen_c_flags_final ) \
256- -I$(objtree ) /rust/ -DMODULE; \
261+ -I$(objtree ) /rust/ -DMODULE $( bindgen_target_cflags ) ; \
257262 sed -Ei 's/pub fn rust_helper_([a-zA-Z0-9_]*)/\# [link_name="rust_helper_\1"]\n pub fn \1/g' $@
258263
264+ # See `CFLAGS_REMOVE_helpers.o` above.
265+ $(objtree ) /rust/bindings_helpers_generated.rs : private bindgen_target_cflags = -Wno-missing-prototypes
259266$(objtree ) /rust/bindings_helpers_generated.rs : $(srctree ) /rust/helpers.c FORCE
260267 $(call if_changed_dep,bindgen_helper)
261268
You can’t perform that action at this time.
0 commit comments