aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/riscv/cppc.c
diff options
context:
space:
mode:
authorNathan Chancellor <[email protected]>2025-07-10 20:25:26 +0000
committerPaul Walmsley <[email protected]>2025-09-04 22:25:46 +0000
commit41f9049cff324b7033e6ed1ded7dfff803cf550a (patch)
tree0fff12ed1a6840fdab1620904098f8e18a2932bf /drivers/acpi/riscv/cppc.c
parentLinux 6.17-rc1 (diff)
downloadkernel-41f9049cff324b7033e6ed1ded7dfff803cf550a.tar.gz
kernel-41f9049cff324b7033e6ed1ded7dfff803cf550a.zip
riscv: Only allow LTO with CMODEL_MEDANY
When building with CONFIG_CMODEL_MEDLOW and CONFIG_LTO_CLANG, there is a series of errors due to some files being unconditionally compiled with '-mcmodel=medany', mismatching with the rest of the kernel built with '-mcmodel=medlow': ld.lld: error: Function Import: link error: linking module flags 'Code Model': IDs have conflicting values: 'i32 3' from vmlinux.a(init.o at 899908), and 'i32 1' from vmlinux.a(net-traces.o at 1014628) Only allow LTO to be performed when CONFIG_CMODEL_MEDANY is enabled to ensure there will be no code model mismatch errors. An alternative solution would be disabling LTO for the files with a different code model than the main kernel like some specialized areas of the kernel do but doing that for individual files is not as sustainable than forbidding the combination altogether. Cc: [email protected] Fixes: 021d23428bdb ("RISC-V: build: Allow LTO to be selected") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Signed-off-by: Nathan Chancellor <[email protected]> Link: https://lore.kernel.org/r/20250710-riscv-restrict-lto-to-medany-v1-1-b1dac9871ecf@kernel.org Signed-off-by: Paul Walmsley <[email protected]>
Diffstat (limited to 'drivers/acpi/riscv/cppc.c')
0 files changed, 0 insertions, 0 deletions