[MPlayer-dev-eng] [PATCH] Fix crash when using win32 codecs on mac osx / intel

Guillaume Poirier gpoirier at mplayerhq.hu
Mon Aug 27 16:54:29 CEST 2007


Hi,

Ulion wrote:
> 2007/8/27, Diego Biurrun <diego at biurrun.de>:
>> The main problem is that -mstackrealign was introduced in gcc 4.2, so
>> we cannot use it unconditionally.  I will revert your patch for now, if
>> you can come up with a more general solution, that would be welcome.
>>
>> Diego
> 
> Ok. How about this attached patch using configure detect gcc flag?
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> Index: configure
> ===================================================================
> --- configure	(revision 24244)
> +++ configure	(working copy)
> @@ -1504,6 +1504,28 @@
>    }
>  fi
>  
> +# Check whether compiler support -mstackrealign or -fstackrealign flag.
> +echocheck "cflag stackrealign"
> +cat > $TMPC << EOF
> +__attribute__((noinline)) static int foo3(int i1, int i2, int i3) {
> +  return i3;
> +}
> +int main() {
> +  return foo3(1,2,3)==3 ? 0 : 1;
> +}
> +EOF
> +_cflag_stackrealign=
> +if test "$cc_vendor" = "gnu" ; then
> +  # Gcc earlier version on apple has flag -mstackrealign for intel x86 platform.
> +  # Or gcc version above 4.2 has flag -fstackrealign.


I'm curious: how did you managed to get GCC 4.2 on OSX? Tiger only
ships 4.0.1! Are you using Leopard, or did you pull Apple's GCC 4.2
from SVN and compiled it yourself?

Guillaume



More information about the MPlayer-dev-eng mailing list