diff --git a/rv_tests/hello_world/Makefile b/rv_tests/hello_world/Makefile index c126b61..ba2ea75 100644 --- a/rv_tests/hello_world/Makefile +++ b/rv_tests/hello_world/Makefile @@ -27,7 +27,7 @@ $(ELF): $(SRC) $(LDSCRIPT) $(BIN): $(ELF) $(OBJCOPY) -O binary $(ELF) $(BIN) # Pad the binary to a multiple of 4 bytes - size=$$(stat -f%z $(BIN)); \ + size=$$(stat -c %s $(BIN)); \ padding=$$(( (4 - (size % 4)) % 4 )); \ [ $$padding -ne 0 ] && dd if=/dev/zero bs=1 count=$$padding >> $(BIN) || true