riscv-software-src / riscv-pk

RISC-V Proxy Kernel
Other
579 stars 306 forks source link

Error during make #249

Closed Marytv closed 3 years ago

Marytv commented 3 years ago

I need to build a 32 bit version of pk and bbl and did following steps.

$ mkdir build $ cd build $../configure --prefix=$RISCV --host=riscv32-unknown-elf --with-arch=rv32i $make

make give me the following error. How to solve this?

../machine/mtrap.h:51:29: error: initialization of 'uintptr_t ' {aka 'unsigned int '} from incompatible pointer type 'char ' [-Werror=incompatible-pointer-types] 51 | #define MACHINE_STACK_TOP() ({ \ | ^ ../machine/minit.c:246:23: note: in expansion of macro 'MACHINE_STACK_TOP' 246 | uintptr_t p_fcsr = MACHINE_STACK_TOP() - MENTRY_FRAME_SIZE; // the x0's save slot | ^~~~~ cc1: all warnings being treated as errors make: *** [Makefile:336: minit.o] Error 1

aswaterman commented 3 years ago

Sorry about that; recent attempts to remove undefined behavior in the code have injected a handful of new problems. I'll push a fix.