[MPlayer-dev-eng] [PATCH] Suppress unsupported options when building with clang
Rowan James
rowanj at phere.net
Tue Aug 3 09:40:25 CEST 2010
On 01/08/2010, at 9:01 AM, Diego Biurrun wrote:
> .. extra good karma for cutting down on line length ..
>
> On Mon, Jul 26, 2010 at 06:49:45PM +1000, Rowan James wrote:
>>
>> --- configure (revision 31826)
>> +++ configure (working copy)
>> @@ -1505,7 +1505,10 @@
>>
>> if darwin; then
>> - extra_cflags="-mdynamic-no-pic -falign-loops=16 -shared-libgcc $extra_cflags"
>> + extra_cflags="-mdynamic-no-pic $extra_cflags"
>> + if test "$(basename $_cc)" != "clang" ; then
>> + extra_cflags="-falign-loops=16 -shared-libgcc $extra_cflags"
>> + fi
>
> I haven't investigated in detail yet, but this does not look like the
> default way to identify gcc.
It's not (that would be == "gnu", as in the other hunk) - but I don't know if anyone builds with the Intel compiler suite for Mac (or CodeWarrior, or other), and if they do, if the flags are valid and/or desired for that configuration, so I went with the path-of-least-unknown-change.
There's not much in a quick archives search suggesting the more rare compilers are even being used for mplayer (much less maintained on OS X...) since 2006; so I'm not really sure which way to go with this.
>
>> @@ -2539,6 +2542,8 @@
>> elif test "$cc_vendor" = "sun" ; then
>> CFLAGS="-O2 $_march $_mcpu $_pipe -xc99 -xregs=frameptr"
>> + elif test "$cc_vendor" = "clang"; then
>> + CFLAGS="-O2 $_march $_pipe"
>> elif test "$cc_vendor" != "gnu" ; then
>> CFLAGS="-O2 $_march $_mcpu $_pipe"
>
> This hunk is good anyway, applied.
Awesome, thanks!
More information about the MPlayer-dev-eng
mailing list