ffmpeg: enable lto build for arm and x86_64 4697/head
authorIan Leonard <antonlacon@gmail.com>
Tue, 8 Aug 2017 07:09:21 +0000 (00:09 -0700)
committerIan Leonard <antonlacon@gmail.com>
Fri, 11 Aug 2017 05:30:15 +0000 (22:30 -0700)
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>
multimedia/ffmpeg/Makefile

index 4f58b717b267c44a88cb1bd97a73ef0e9dd2aa89..9dda6a73ffa7b95188997418b9b84d4d3cb63b89 100644 (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