[runtime] Add more pedantic warnings to compilation flow
@@ -58,7 +58,8 @@ DEFINES := -DNUM_CORES=$(num_cores) -DNUM_HIVES=$(num_hives)
# Specify cross compilation target. This can be omitted if LLVM is built with riscv as default target
RISCV_LLVM_TARGET ?= --target=$(RISCV_TARGET) --sysroot=$(GCC_INSTALL_DIR)/$(RISCV_TARGET) --gcc-toolchain=$(GCC_INSTALL_DIR)
-RISCV_FLAGS_COMMON ?= -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -I$(CURDIR)/common -static -std=gnu99 -O3 -ffast-math -fno-common -fno-builtin-printf $(DEFINES)
+RISCV_WARNINGS += -Wunused-variable -Wconversion -Wall -Wextra # -Werror
+RISCV_FLAGS_COMMON ?= -march=$(RISCV_ARCH) -mabi=$(RISCV_ABI) -I$(CURDIR)/common -static -std=gnu99 -O3 -ffast-math -fno-common -fno-builtin-printf $(DEFINES) $(RISCV_WARNINGS)
RISCV_FLAGS_GCC ?= -mcmodel=medany
RISCV_FLAGS_LLVM ?= -mcmodel=small -mllvm -enable-misched
ifeq ($(COMPILER),gcc)
