From: Ian Leonard Date: Tue, 8 Aug 2017 07:09:21 +0000 (-0700) Subject: ffmpeg: enable lto build for arm and x86_64 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=adc293d3d961118f2211a7cbd7251b4cd43eb7c3;p=openwrt-packages.git ffmpeg: enable lto build for arm and x86_64 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 --- diff --git a/multimedia/ffmpeg/Makefile b/multimedia/ffmpeg/Makefile index 4f58b717b..9dda6a73f 100644 --- a/multimedia/ffmpeg/Makefile +++ b/multimedia/ffmpeg/Makefile @@ -404,6 +404,8 @@ endif # 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 @@ -419,6 +421,10 @@ ifneq ($(findstring arm,$(CONFIG_ARCH)),) endif +ifeq ($(ARCH),x86_64) + FFMPEG_CONFIGURE+= --enable-lto +endif + ifneq ($(CONFIG_YASM),y) FFMPEG_CONFIGURE+= --disable-yasm