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 <antonlacon@gmail.com>
This commit is contained in:
Ian Leonard 2017-08-08 00:09:21 -07:00
parent 3998494f28
commit adc293d3d9
1 changed files with 6 additions and 0 deletions

View File

@ -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