This toggles on Link-Time Optimization for arm and x86-64.
Compile tested on arm/bcm47xx, arm/mvebu, arm/imx6 and x86-64/generic
(Also compile tested on mips/ar71xx where it failed so this change is currently for specific arches.)
Size savings for libffmpeg were 2-3% when measured with libffmpeg-full and libffmpeg-mini.
Signed-off-by: Ian Leonard <antonlacon@gmail.com>
# selectively disable optimizations according to arch/cpu type
ifneq ($(findstring arm,$(CONFIG_ARCH)),)
+ FFMPEG_CONFIGURE+= --enable-lto
+
ifneq ($(findstring vfp,$(CONFIG_TARGET_OPTIMIZATION)),)
FFMPEG_CONFIGURE+= --enable-vfp
else
endif
+ifeq ($(ARCH),x86_64)
+ FFMPEG_CONFIGURE+= --enable-lto
+endif
+
ifneq ($(CONFIG_YASM),y)
FFMPEG_CONFIGURE+= --disable-yasm