[FFmpeg-devel] Hacks on FATE

Michael Kostylev michael.kostylev
Sun Oct 25 13:38:50 CET 2009


On Sat Oct 24 16:46:30 2009
M?ns Rullg?rd wrote:

>>>>>>>>>> Some of the FATE configurations are using decidedly non-standard
>>>>>>>>>> configure options.  Some even apply PATCHES to the code.  This is not
>>>>>>>>>> the way we want it to be.
>>>>>>>>>> 
>>>>>>>>>> [...]
>>>>>>>>> 
>>>>>>>>> There is a new FATE machine with new hacks: OpenSolaris on x86_64.
>>>>>>>>> 
>>>>>>>>> http://fate.multimedia.cx/index.php?machine=24
>>>>>>>>> http://fate.multimedia.cx/index.php?build_record=115807
>>>>>>>>> 
>>>>>>>>> configure --arch=amd64 --cc='ccache gcc-4.4 -m64' --extra-cflags=-Wa,--divide
>>>>>>>>> --extra-libs=/usr/lib/64/values-xpg6.o --disable-debug --enable-shared
>>>>>>>>> --enable-gpl --enable-postproc --enable-avfilter --enable-avfilter-lavf
>>>>>>>>> --enable-zlib && /usr/gnu/bin/sed -i -e 's/^\(SHFLAGS\)=\(.*\)/\1=-mimpure-text \2/' config.mak
>>>>>>>> 
>>>>>>>> Another question: What is this '-mimpure-text' hack about?
>>>>>>>
>>>>>>> http://gcc.gnu.org/onlinedocs/gcc-4.4.1/gcc/SPARC-Options.html
>>>>>>> /mimpure-text
>>>>>>>
>>>>>>> I don't know what is the reason for the `-z text' diversion,
>>>>>>> even the Sun ld doesn't use `-z text' by default.
>>>>>> 
>>>>>> So we should add it in configure.
>>>>>
>>>>> Ok.
>>>>>
>>>>> Michael
>>>>>
>>>>> --- ./configure.orig
>>>>> +++ ./configure
>>>>> @@ -1871,6 +1871,7 @@
>>>>>      sunos)
>>>>>          FFSERVERLDFLAGS=""
>>>>>          SHFLAGS='-shared -Wl,-h,$$(@F)'
>>>>> +        enabled x86 && check_ldflags -mimpure-text && SHFLAGS="-mimpure-text $SHFLAGS"
>>>>>          network_extralibs="-lsocket -lnsl"
>>>>>          add_cppflags -D__EXTENSIONS__
>>>>>          ;;
>>>> 
>>>> Is there any chance that flag might not be available?
>>>> check_ldflags automatically adds the flags to LDFLAGS, which is used
>>>> everywhere, so if you do that, adding it to SHFLAGS is not necessary.
>>>> It might break something else though.
>>> 
>>> Oh, yes, -mimpure-text in LDFLAGS would break static build.

Nope, that was something else, but I think it doesn't matter now.

>>> So, if no one
>>> cares about SunStudio, the solution is simple.
>>
>> Attached.
>>
>> Michael
>>
>> --- ./configure.orig
>> +++ ./configure
>> @@ -1880,6 +1880,7 @@
>>      sunos)
>>          FFSERVERLDFLAGS=""
>>          SHFLAGS='-shared -Wl,-h,$$(@F)'
>> +        enabled x86 && SHFLAGS="-mimpure-text $SHFLAGS"
>>          network_extralibs="-lsocket -lnsl"
>>          add_cppflags -D__EXTENSIONS__
>>          ;;
> 
> Does this not work with sunstudio?  We should try to support all
> compilers.

It would produce
cc: Warning: illegal option -mimpure-text

in addition to a bunch of
cc: Warning: illegal option -d=c99
cc: Warning: illegal option -fomit-frame-pointer
cc: Warning: illegal option -fno-math-errno
cc: Warning: illegal option -fno-signed-zeros

Michael



More information about the ffmpeg-devel mailing list