From c82dfbe2a77ce4d7381111b844421e8aa1ec96ad Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 22 Feb 2025 21:44:28 +0200 Subject: [PATCH] hello_world: Fix stat with coreutils(linux) the development nix shell has coreutils --- rv_tests/hello_world/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rv_tests/hello_world/Makefile b/rv_tests/hello_world/Makefile index 468fa6f..7a70dc4 100644 --- a/rv_tests/hello_world/Makefile +++ b/rv_tests/hello_world/Makefile @@ -28,7 +28,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