File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -1913,7 +1913,7 @@ config RUST
1913
1913
depends on !MODVERSIONS
1914
1914
depends on !GCC_PLUGINS
1915
1915
depends on !RANDSTRUCT
1916
- depends on !DEBUG_INFO_BTF
1916
+ depends on !DEBUG_INFO_BTF || PAHOLE_HAS_LANG_EXCLUDE
1917
1917
select CONSTRUCTORS
1918
1918
help
1919
1919
Enables Rust support in the kernel.
Original file line number Diff line number Diff line change @@ -364,6 +364,15 @@ config PAHOLE_HAS_BTF_TAG
364
364
btf_decl_tag) or not. Currently only clang compiler implements
365
365
these attributes, so make the config depend on CC_IS_CLANG.
366
366
367
+ config PAHOLE_HAS_LANG_EXCLUDE
368
+ def_bool PAHOLE_VERSION >= 124
369
+ help
370
+ Support for the --lang_exclude flag which makes pahole exclude
371
+ compilation units from the supplied language. Used in Kbuild to
372
+ omit Rust CUs which are not supported in version 1.24 of pahole,
373
+ otherwise it would emit malformed kernel and module binaries when
374
+ using DEBUG_INFO_BTF_MODULES.
375
+
367
376
config DEBUG_INFO_BTF_MODULES
368
377
def_bool y
369
378
depends on DEBUG_INFO_BTF && MODULES && PAHOLE_HAS_SPLIT_BTF
Original file line number Diff line number Diff line change 19
19
if [ " ${pahole_ver} " -ge " 122" ]; then
20
20
extra_paholeopt=" ${extra_paholeopt} -j"
21
21
fi
22
+ if [ " ${pahole_ver} " -ge " 124" ]; then
23
+ # see PAHOLE_HAS_LANG_EXCLUDE
24
+ extra_paholeopt=" ${extra_paholeopt} --lang_exclude=rust"
25
+ fi
22
26
23
27
echo ${extra_paholeopt}
You can’t perform that action at this time.
0 commit comments