From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Sven Eckelmann Date: Tue, 7 May 2013 14:51:06 +0200 Message-Id: <1367931069-7177-7-git-send-email-sven@narfation.org> In-Reply-To: <1367931069-7177-1-git-send-email-sven@narfation.org> References: <1367931069-7177-1-git-send-email-sven@narfation.org> Subject: [B.A.T.M.A.N.] [PATCH 6/9] alfred: Enable Link-time optimization Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: b.a.t.m.a.n@lists.open-mesh.org Cc: Sven Eckelmann Link-time optimization allows to move parts of the optimization from the single source file to the global source view. This is done by emitting the GIMPLE representation in each object file and analyzing it again during the link step. This reduces the binary size by around 10% on mipsel (this includes parts which were also removed by garbage collection). Signed-off-by: Sven Eckelmann --- alfred/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alfred/Makefile b/alfred/Makefile index ab19325..2656d1c 100644 --- a/alfred/Makefile +++ b/alfred/Makefile @@ -44,8 +44,8 @@ endef MAKE_ALFRED_FLAGS=\ CONFIG_ALFRED_VIS=$(if $(CONFIG_PACKAGE_ALFRED_VIS),y,n) -TARGET_CFLAGS += -ffunction-sections -fdata-sections -TARGET_LDFLAGS += -Wl,--gc-sections +TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto +TARGET_LDFLAGS += -Wl,--gc-sections -fuse-linker-plugin define Build/Compile CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \ -- 1.8.2.1