From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Sven Eckelmann Date: Tue, 7 May 2013 14:51:09 +0200 Message-Id: <1367931069-7177-10-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 5/9] batman-adv-devel: 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 6% on mipsel (this includes parts which were also removed by garbage collection). Signed-off-by: Sven Eckelmann --- batman-adv-devel/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/batman-adv-devel/Makefile b/batman-adv-devel/Makefile index 6dc66b8..cad95c6 100644 --- a/batman-adv-devel/Makefile +++ b/batman-adv-devel/Makefile @@ -76,8 +76,8 @@ MAKE_BATCTL_ARGS += \ STRIP="/bin/true" \ batctl install -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 ifneq ($(DEVELOPER)$(CONFIG_KMOD_BATMAN_ADV_DEVEL_BATCTL),) define Download/batctl -- 1.8.2.1