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)