The recipe ignores the passed in -march= and other parameters, instead it discovers it's own settings for the compiler. (I believe this is because, like u-boot and the kenrel, OpenSBI is really building baremetal software.) In the configuration/compile step, in the Makefile there is a specific check to see if the _zicsr and _zifencei are supported by the compiler in -march=. CC_SUPPORT_ZICSR_ZIFENCEI := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) -nostdlib -march=rv$(OPENSBI_CC_XLEN)imafd_zicsr_zifencei -x c /dev/null -o /dev/null 2>&1 | grep -e "zicsr" -e "zifencei" > /dev/null && echo n || echo y) The compilation command in the check always fails, the difference is if it fails saying that it can't link or that there is an error with the cflags (march=) passed to the compiler. The grep statement is too broad, in that it will scan the entire error message including any paths, if the paths have zicsr and/or zifencei then the condition is triggered and the system doesn't believe it needs to specify those options in -march=. Later during compilation, when the instructions are used a failure will occur as they are not in the 'imafd' configuation in the current gcc. I suspect the Yocto Project fix is to either hard code the value to 'y' (unconditionally), or work with the upstream project to make the test better and somehow ignore the current path.
Need to identify someone to help with RISC-V issues.
Medium+ bugs should have a 6.1-M* milestone so pick M2.
Pretty sure this just needs a little rework to the relevant Makefile lines (a couple of other spots have the same pattern). I should have a patch soon.
Patches on the mailing list: https://lore.kernel.org/openembedded-core/20260910150843.1531415-1-tgamblin@baylibre.com/T/#t One needed to patch OpenSBI itself, the other to remove the TUNE_RISCV_PKGARCH restriction.
Fixed in: https://git.openembedded.org/openembedded-core/commit/?id=beff656c54be6d80880b5208944b8405debcff60