riscv_encoding.h: double definition upon integration with other projects

Petro Karashchenko petro.karashchenko at gmail.com
Thu Feb 17 13:31:39 PST 2022


Hello,

Recently the opensbi support was added to Apache NuttX project. But
the integration didn't pass cleanly and currently require few
workarounds to eliminate dozens of warnings. The reason for this is
that internal NuttX header files have defines with the same names that
are available in
https://github.com/riscv-software-src/opensbi/blob/master/include/sbi/riscv_encoding.h

I want to ask the OpenSBI team for advice on what can be an optimal
solution for such types of issues? Can we add "#ifndef" wrapper for
defines in "riscv_encoding.h" so there will be no redefinition
warnings or add "OPENSBI_" prefix? Do you see this as a reasonable
solution?

Best regards,
Petro



More information about the opensbi mailing list