pkgsrc-Bugs archive

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

Re: pkg/47132



The following reply was made to PR pkg/47132; it has been noted by GNATS.

From: Onno van der Linden <o.vd.linden%quicknet.nl@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: 
Subject: Re: pkg/47132
Date: Sat, 29 Jun 2013 15:22:22 +0200

 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
 


Home | Main Index | Thread Index | Old Index