diff options
author | Nathaniel Graff <nathaniel.graff@sifive.com> | 2019-03-05 17:45:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-05 17:45:29 +0000 |
commit | 292612e3ed9861088255d961d024863c56e4bd18 (patch) | |
tree | 0c5bcb153597f277646576cad922720e0ed94033 | |
parent | 13bc9767e23880849142526638a7d4a1110e5a4c (diff) | |
parent | ab55efed2d48dd8d60dcfc4152c10b2c7a9cb185 (diff) |
Merge pull request #180 from sifive/print-size
Print ELF size after build
-rw-r--r-- | scripts/standalone.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/standalone.mk b/scripts/standalone.mk index a412710..e5f2ff7 100644 --- a/scripts/standalone.mk +++ b/scripts/standalone.mk @@ -52,12 +52,14 @@ RISCV_GXX := $(CROSS_COMPILE)-g++ RISCV_OBJDUMP := $(CROSS_COMPILE)-objdump RISCV_GDB := $(CROSS_COMPILE)-gdb RISCV_AR := $(CROSS_COMPILE)-ar +RISCV_SIZE := $(CROSS_COMPILE)-size else RISCV_GCC := $(abspath $(RISCV_PATH)/bin/$(CROSS_COMPILE)-gcc) RISCV_GXX := $(abspath $(RISCV_PATH)/bin/$(CROSS_COMPILE)-g++) RISCV_OBJDUMP := $(abspath $(RISCV_PATH)/bin/$(CROSS_COMPILE)-objdump) RISCV_GDB := $(abspath $(RISCV_PATH)/bin/$(CROSS_COMPILE)-gdb) RISCV_AR := $(abspath $(RISCV_PATH)/bin/$(CROSS_COMPILE)-ar) +RISCV_SIZE := $(abspath $(RISCV_PATH)/bin/$(CROSS_COMPILE)-size) PATH := $(abspath $(RISCV_PATH)/bin):$(PATH) endif @@ -96,6 +98,8 @@ $(PROGRAM_ELF): \ LDLIBS="-Wl,--gc-sections -Wl,--start-group -lc -lgcc -lmetal -lmetal-gloss -Wl,--end-group" touch -c $@ + $(RISCV_SIZE) $@ + .PHONY: clean-software clean-software: $(MAKE) -C $(SRC_DIR) clean |