-
-
Notifications
You must be signed in to change notification settings - Fork 91
Open
Description
I encountered an issue when building the kernel with x86-64-v2 settings.
The kernel itself builds and runs fine, but several host tools (such as objtool, fixdep, modpost, resolve_btfids, etc.) are generated with a .note.gnu.property section that declares "ISA needed: x86-64-v3".
This causes a problem on CPUs that only support x86-64-v2:
- The kernel image works correctly.
- However, DKMS fails when trying to build external modules, because these host tools cannot run on v2-only hardware.
Steps to reproduce:
- Build the kernel with
_config=config_x86-64-v2(or equivalent-march=x86-64-v2). - Inspect
tools/objtool/objtoolwithreadelf -n. - The output shows
ISA needed: x86-64-v3.
Build environment:
- CPU: AMD Zen3
- Compiler: Clang
- LTO mode: Full LTO
Expected behavior:
- Host tools should match the selected ISA level (v2 in this case), so that DKMS and external module builds remain functional on v2 hardware.
Actual behavior:
- Host tools require x86-64-v3 even when the kernel is built for x86-64-v2.
Impact:
- DKMS cannot build modules on v2-only CPUs, making kernel customization impossible in such environments.
Workaround:
- Manually stripping the
.note.gnu.propertysection from host tools after build resolves the issue, for example:
strip --remove-section=.note.gnu.property ./tools/objtool/objtool - While this workaround allows DKMS to function, it is not a sustainable solution.
Could you please review the build flags or toolchain settings for host tools so they respect the selected ISA level?
Metadata
Metadata
Assignees
Labels
No labels