Repository : ssh://git@open-mesh.org/openwrt-feed-batman-adv
On branch : master
commit e25de79760c368b03e641bd7bc90ef3cf6294320 Author: Sven Eckelmann sven@narfation.org Date: Tue May 7 14:51:09 2013 +0200
batman-adv-devel: Enable Link-time optimization
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 sven@narfation.org
e25de79760c368b03e641bd7bc90ef3cf6294320 batman-adv-devel/Makefile | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/batman-adv-devel/Makefile b/batman-adv-devel/Makefile index 79b4294..12749be 100644 --- a/batman-adv-devel/Makefile +++ b/batman-adv-devel/Makefile @@ -71,6 +71,13 @@ MAKE_BATMAN_ADV_ARGS += \ TARGET_CFLAGS += -ffunction-sections -fdata-sections TARGET_LDFLAGS += -Wl,--gc-sections
+# 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. + +TARGET_CFLAGS += -flto +TARGET_LDFLAGS += -fuse-linker-plugin + MAKE_BATCTL_ENV += \ CPPFLAGS="$(TARGET_CPPFLAGS)" \ CFLAGS="$(TARGET_CFLAGS)" \