forked from Yehowshua/RiscV-Formal
hello_world: Fix stat with coreutils(linux)
the development nix shell has coreutils
This commit is contained in:
parent
459ed89ce2
commit
eb77c50eb2
|
@ -27,7 +27,7 @@ $(ELF): $(SRC) $(LDSCRIPT)
|
||||||
$(BIN): $(ELF)
|
$(BIN): $(ELF)
|
||||||
$(OBJCOPY) -O binary $(ELF) $(BIN)
|
$(OBJCOPY) -O binary $(ELF) $(BIN)
|
||||||
# Pad the binary to a multiple of 4 bytes
|
# 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=$$(( (4 - (size % 4)) % 4 )); \
|
||||||
[ $$padding -ne 0 ] && dd if=/dev/zero bs=1 count=$$padding >> $(BIN) || true
|
[ $$padding -ne 0 ] && dd if=/dev/zero bs=1 count=$$padding >> $(BIN) || true
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue