From 1dd7ac05750925dd74b6bcb00b5f33743e16fd59 Mon Sep 17 00:00:00 2001
From: Josarn <josuaarndt@live.de>
Date: Thu, 26 Apr 2018 11:18:15 +0200
Subject: [PATCH] Makefile.include: add SIZEFLAGS

---
 Makefile.include      | 2 +-
 makefiles/vars.inc.mk | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Makefile.include b/Makefile.include
index 7823b5f11c..bf1a088fa0 100644
--- a/Makefile.include
+++ b/Makefile.include
@@ -362,7 +362,7 @@ $(_SUBMAKE_LIBS): $(BINDIR)/$(APPLICATION_MODULE).a $(USEPKG:%=$(BINDIR)/%.a)
 
 # 'print-size' triggers a rebuild. Use 'info-buildsize' if you do not need to rebuild.
 print-size: $(ELFFILE)
-	$(Q)$(SIZE) $<
+	$(Q)$(SIZE) $(SIZEFLAGS) $<
 
 %.hex: %.elf
 	$(Q)$(OBJCOPY) $(OFLAGS) -Oihex $< $@
diff --git a/makefiles/vars.inc.mk b/makefiles/vars.inc.mk
index 5adc7303ee..6bb2433a50 100644
--- a/makefiles/vars.inc.mk
+++ b/makefiles/vars.inc.mk
@@ -55,6 +55,7 @@ export OFLAGS                # The parameter for OBJCOPY, e.g. to strip the debu
 export OBJDUMP               # The command used to create the assembly listing.
 export OBJDUMPFLAGS          # The parameter for OBJDUMP.
 export SIZE                  # The command to read to size of the ELF sections.
+export SIZEFLAGS             # The optional size flags.
 export UNDEF                 # Object files that the linker must include in the ELFFILE even if no call to the functions or symbols (ex: interrupt vectors).
 export WERROR                # Treat all compiler warnings as errors if set to 1 (see -Werror flag in GCC manual)
 
-- 
GitLab