From e559536daa88fa8c1adfdfb0d840fe55719ceb8b Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Wed, 1 Jul 2015 11:30:03 -0700 Subject: [PATCH] libpayload: always compile with -ffunction-sections Always compile with -ffunction-sections and -fdata-sections This does not hurt, and it allows the linker to produce much smaller binaries in some circumstances. Change-Id: Ibf9f24c210d6d2ed40451b4cf0d68ce88220bc5f Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/10750 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- payloads/libpayload/Makefile.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/payloads/libpayload/Makefile.inc b/payloads/libpayload/Makefile.inc index a3094aa85f..05754fe887 100644 --- a/payloads/libpayload/Makefile.inc +++ b/payloads/libpayload/Makefile.inc @@ -59,6 +59,7 @@ INCLUDES := -Iinclude -Iinclude/$(ARCHDIR-y) -I$(obj) -include include/kconfig.h CFLAGS = $(EXTRA_CFLAGS) $(INCLUDES) -Os -pipe -nostdinc -ggdb3 CFLAGS += -nostdlib -fno-builtin -ffreestanding -fomit-frame-pointer +CFLAGS += -ffunction-sections -fdata-sections CFLAGS += -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes CFLAGS += -Wwrite-strings -Wredundant-decls -Wno-trigraphs CFLAGS += -Wstrict-aliasing -Wshadow -Werror