pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mplayer problems with webm files



>On Fri, Jun 28, 2013 at 07:13:00PM +0200, Onno van der Linden wrote:
>> On Fri, Jun 28, 2013 at 06:59:56PM +0200, Thomas Klausner wrote:
>> > On Fri, Jun 28, 2013 at 06:32:54PM +0200, Leonardo Taccari wrote:
>> > > I updated my box (i386) from NetBSD 6.0 to NetBSD 6.1 and from
>> > > pkgsrc-2012Q4 to pkgsrc-2013Q1.
>> > 
>> > Just as a data point, the file works fine on NetBSD-6.99.22/amd64.
>> >  Thomas
>> 
>> pkg/47132 could be the problem here.
>
>Thanks for the pointer. Do you have a patch for your proposal from the PR?
> Thomas

Also sent to gnats-bugs.

Here are two diffs that should fix the
stack alignment issues for mplayer and
ffmpeg on i386. The two alignment options
needed for gcc are available since 4.2.
They're not necessary anymore with 4.6
and later.

The ffmpeg diff disables asm completely
for non-gcc on i386 instead of the
original Darwin and SunOS check.
I'm not sure if that's the right
thing to do though. Maybe the
empty(CC_VERSION:Mgcc*) check should
be removed and if needed additional
checks for non-gcc i386 compilers
should be added.

The mplayer diff uses the --yasm=''
configure option to disable asm for
gcc < 4.2.

Onno

--- /usr/pkgsrc/multimedia/ffmpeg/Makefile.orig 2013-06-29 09:21:58.000000000 
+0200
+++ /usr/pkgsrc/multimedia/ffmpeg/Makefile      2013-06-29 12:06:36.000000000 
+0200
@@ -17,11 +17,6 @@
 
 .include "../../mk/bsd.prefs.mk"
 
-.if !empty(MACHINE_PLATFORM:MDarwin-*-i386) \
- || !empty(MACHINE_PLATFORM:MSunOS-*-i386)
-CONFIGURE_ARGS+=       --disable-asm
-.endif
-
 .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
 CONFIGURE_ARGS+=       --enable-cross-compile
 CONFIGURE_ARGS+=       --target-os=${LOWER_OPSYS:Q}
@@ -42,6 +37,19 @@
 
 .include "../../mk/compiler.mk"
 
+# disable asm on i386 for non-gcc and gcc < 4.2
+# no alignment options needed for gcc >= 4.6 on i386
+
+.if ${MACHINE_ARCH} == "i386"
+.if !empty(CC_VERSION:Mgcc-4.[2345]*)
+CFLAGS+=-mstackrealign -mpreferred-stack-boundary=4
+.elif !empty(CC_VERSION:Mgcc-[123]*) \
+   || !empty(CC_VERSION:Mgcc-4.[01]*) \
+   || empty(CC_VERSION:Mgcc*)
+CONFIGURE_ARGS+=       --disable-asm
+.endif
+.endif
+
 .if !empty(PKGSRC_COMPILER:Mclang)
 CFLAGS+=       -no-integrated-as
 .endif


--- /usr/pkgsrc/multimedia/mplayer-share/Makefile.cflags.orig   2013-06-29 
13:45:14.000000000 +0200
+++ /usr/pkgsrc/multimedia/mplayer-share/Makefile.cflags        2013-06-29 
15:02:47.000000000 +0200
@@ -13,6 +13,16 @@
 
 .    include "../../mk/compiler.mk"
 
+# alignment flags for builtin ffmpeg
+# --yasm='' disables asm altogether for gcc < 4.2
+
+.    if !empty(CC_VERSION:Mgcc-4.[2345]*)
+CFLAGS+=-mstackrealign -mpreferred-stack-boundary=4
+.    elif !empty(CC_VERSION:Mgcc-[123]*) || \
+          !empty(CC_VERSION:Mgcc-4.[01]*) 
+CONFIGURE_ARGS+=        --yasm=''
+.    endif
+
 .    if !empty(CC_VERSION:Mgcc-4*)
 CFLAGS+=       -O3 -ffast-math -fomit-frame-pointer -mtune=pentiumpro
 .    else

----- End forwarded message -----


Home | Main Index | Thread Index | Old Index