opensbi icon indicating copy to clipboard operation
opensbi copied to clipboard

Getting compilation error on generic firmware

Open IkerGalardi opened this issue 1 year ago • 0 comments

Getting a compilation error when compilign with clang (used command make PLATFORM=generic PLATFORM_RISCV_XLEN=64 LLVM=1:

opensbi/lib/utils/serial/semihosting.c:158:12: error: result of comparison of constant -1 with expression of type 'char' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
                ret = ch > -1 ? ch : -1;
                      ~~ ^ ~~
1 error generated.

Easily fixed with removing the -Werror flag but its a pain in the ass. Using clang14 as the compiler.

IkerGalardi avatar Sep 21 '22 19:09 IkerGalardi