package/mplayer: disable inline asm on i386
authorBernd Kuhls <bernd.kuhls@t-online.de>
Sun, 9 Apr 2017 13:00:03 +0000 (15:00 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 9 Apr 2017 13:45:27 +0000 (15:45 +0200)
A similar fix was committed to ffmpeg in the past:
https://git.buildroot.net/buildroot/commit/package/ffmpeg?id=bfb8df2ad9b164b421d25294c6882c8b61dc59a5
which will be reverted with another patch.

Mplayer contains ffmpeg 3.0, with current ffmpeg 3.2.4 the bug is gone,
the difference between both revisions is too big in order to find a
real fix for the problem.

Special cflags, added by
https://git.buildroot.net/buildroot/commit/package/multimedia/mplayer?id=fd38100e1189d19cad87a64c52df2c773eb47e40
are no longer needed now so remove them as well.

Testing these defconfigs did not produce compile errors with current
ffmpeg but with mplayer:

BR2_i386=y
BR2_x86_i586=y
BR2_GCC_VERSION_4_8_X=y

BR2_i386=y
BR2_x86_i586=y
BR2_GCC_VERSION_5_X=y

BR2_i386=y
BR2_x86_i586=y
BR2_GCC_VERSION_6_X=y

BR2_i386=y
BR2_x86_i486=y
BR2_GCC_VERSION_5_X=y

BR2_i386=y
BR2_x86_i686=y
BR2_GCC_VERSION_5_X=y

BR2_i386=y
BR2_x86_pentium_mmx=y
BR2_GCC_VERSION_5_X=y

BR2_i386=y
BR2_x86_corei7=y
BR2_GCC_VERSION_5_X=y

Fixes
http://autobuild.buildroot.net/results/030/03066dd8937ef4c75d62f237fd195df92b247ee2//
and many others.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/mplayer/mplayer.mk

index 6b3009abc5e85dbc5a7b217c5b025d32622faedd..14ab8aceed5e859d94105e95bdc70db12712a902 100644 (file)
@@ -285,10 +285,13 @@ MPLAYER_CFLAGS += -mfpu=neon
 endif
 endif
 
+define MPLAYER_DISABLE_INLINE_ASM
+       $(SED) 's,#define HAVE_INLINE_ASM 1,#define HAVE_INLINE_ASM 0,g' \
+               $(@D)/config.h
+endef
+
 ifeq ($(BR2_i386),y)
-# inline asm breaks with "can't find a register in class 'GENERAL_REGS'"
-# inless we free up ebp
-MPLAYER_CFLAGS += -fomit-frame-pointer
+MPLAYER_POST_CONFIGURE_HOOKS += MPLAYER_DISABLE_INLINE_ASM
 endif
 
 ifeq ($(BR2_X86_CPU_HAS_MMX),y)