ffmpeg: fix build for xtensa
authorBaruch Siach <baruch@tkos.co.il>
Wed, 25 Dec 2013 09:24:18 +0000 (11:24 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 25 Dec 2013 11:28:20 +0000 (12:28 +0100)
The ffmpeg package generates libraries that are too large for the xtensa
default placement of literals in a dedicated section. Use
-mtext-section-literal to place literals in the text section.

Fixes
http://autobuild.buildroot.net/results/606/60670d35f16c3b8fe19debf7f8e40a046a579520/

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/ffmpeg/ffmpeg.mk

index 6685110a5ae9c5aaa1e85a392055ec5409d35b8c..f1fc9202d6f72807c49487e4f719ca5f924f40cd 100644 (file)
@@ -21,6 +21,14 @@ FFMPEG_CONF_OPT = \
        --disable-avfilter      \
        $(if $(BR2_HAVE_DOCUMENTATION),,--disable-doc)
 
+FFMPEG_CFLAGS = $(TARGET_CFLAGS)
+
+ifeq ($(BR2_xtensa),y)
+FFMPEG_CFLAGS += -mtext-section-literals
+endif
+
+FFMPEG_CONF_ENV = CFLAGS="$(FFMPEG_CFLAGS)"
+
 ifeq ($(BR2_PACKAGE_FFMPEG_GPL),y)
 FFMPEG_CONF_OPT += --enable-gpl
 else