Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust: Proper bindgen sources for BTF debug builds
As Clang 14 supports the btf_type_tag attribute and building with PAHOLE_HAS_BTF_TAG defines BTF_TYPE_TAG(value) to be __attribute__((btf_type_tag(#value))). Because of this bindgen might get confused and discards constness of attributed function parameters that are indeed const pointers (like const char __user * -> char *). This patch fixes that by passing a BINDGEN_RUN definition to bindgen that causes BTF_TYPE_TAG(value) to be defined as nothing, thus generating proper definitions for functions like write in the file_operations struct. Signed-off-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
- Loading branch information