If you don't know what to do here, say Y.
 
-config CC_HAS_ZICBOM
+config TOOLCHAIN_HAS_ZICBOM
        bool
-       default y if 64BIT && $(cc-option,-mabi=lp64 -march=rv64ima_zicbom)
-       default y if 32BIT && $(cc-option,-mabi=ilp32 -march=rv32ima_zicbom)
+       default y
+       depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zicbom)
+       depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zicbom)
+       depends on LLD_VERSION >= 150000 || LD_VERSION >= 23800
 
 config RISCV_ISA_ZICBOM
        bool "Zicbom extension support for non-coherent DMA operation"
-       depends on CC_HAS_ZICBOM
+       depends on TOOLCHAIN_HAS_ZICBOM
        depends on !XIP_KERNEL && MMU
        select RISCV_DMA_NONCOHERENT
        select RISCV_ALTERNATIVE
 
 riscv-march-$(toolchain-need-zicsr-zifencei) := $(riscv-march-y)_zicsr_zifencei
 
 # Check if the toolchain supports Zicbom extension
-toolchain-supports-zicbom := $(call cc-option-yn, -march=$(riscv-march-y)_zicbom)
-riscv-march-$(toolchain-supports-zicbom) := $(riscv-march-y)_zicbom
+riscv-march-$(CONFIG_TOOLCHAIN_HAS_ZICBOM) := $(riscv-march-y)_zicbom
 
 # Check if the toolchain supports Zihintpause extension
 toolchain-supports-zihintpause := $(call cc-option-yn, -march=$(riscv-march-y)_zihintpause)