summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathaniel Graff <nathaniel.graff@sifive.com>2019-02-22 13:34:30 -0800
committerNathaniel Graff <nathaniel.graff@sifive.com>2019-02-22 13:34:30 -0800
commitab55efed2d48dd8d60dcfc4152c10b2c7a9cb185 (patch)
treee1de5bee362af5142c5661f4eb47a6b8629bed9c
parenteb626db1e2e20cb09524e3f4c8a0bcd7b9968f41 (diff)
Print ELF size after build
Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
-rw-r--r--scripts/standalone.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/standalone.mk b/scripts/standalone.mk
index 52926ac..23e2ca7 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,--start-group -lc -lgcc -lmetal -lmetal-gloss -Wl,--end-group"
touch -c $@
+ $(RISCV_SIZE) $@
+
.PHONY: clean-software
clean-software:
$(MAKE) -C $(SRC_DIR) clean