Commit

4bcfe29021993cb167fd9bbdb849f7d7247a166f

iommupt/kunit: Use if_changed_rule for the kunit

Use if_changed_rule so rule_cc_o_c runs cmd_save_c_flags for the kunit
objects. Without the saved flags CONFIG_LTO_CLANG_THIN_DIST runs the
ThinLTO backend with no --target and generates x86_64 code from arm64
bitcode.

Fixes: 1dd4187f53c3 ("iommupt: Add a kunit test for Generic Page Table")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202610110841.120JzAJG-lkp@intel.com/
Assisted-by: LLM
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>

Jason Gunthorpe <jgg@nvidia.com> · 2026-10-13 13:13 UTC · committed by Joerg Roedel

Browse files
1 file changed, +1 −1
modified drivers/iommu/generic_pt/fmt/Makefile
@@ -25,6 +25,6 @@ $(eval $(foreach fmt,$(iommu_pt_fmt-m),$(call create_format,$(fmt),m)))
25 25 # with -DGENERIC_PT_KUNIT
26 26 $(obj)/kunit_iommu_%.o: $(src)/iommu_%.c FORCE
27 27 $(call rule_mkdir)
28 - $(call if_changed_dep,cc_o_c)
28 + $(call if_changed_rule,cc_o_c)
29 29
30 30 obj-$(CONFIG_IOMMU_PT_KUNIT_TEST) += $(IOMMU_PT_KUNIT_TEST)