[FFmpeg-devel] [PATCH] add initial suncc support

Michael Kostylev michael.kostylev
Wed Oct 28 13:44:04 CET 2009


On Wed Oct 28 12:48:07 2009
Diego Biurrun wrote:

>> as in subject
>> 
>> --- ./configure.orig
>> +++ ./configure
>> @@ -1594,6 +1594,11 @@
>>      cc_version=__VERSION__
>>      CC_DEPFLAGS='-MMD'
>>      AS_DEPFLAGS='-MMD'
>> +elif $cc -V 2>&1 | grep -q Sun; then
>> +    cc_type=suncc
>> +    cc_version="AV_STRINGIFY(__SUNPRO_C)"
>> +    DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\\\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
>> +    DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -xM1'
> 
> I think the DEPEND_CMD sed expression should be factorized out to
> accomodate other compilers better.  That's not really your job, however,
> and could well be done separately.
> 
> Oh, what do you mean by "initial support"? 

Suncc ignores or doesn't accept some standard gcc options, so we must
provide the alternatives:

defaults:
 fomit_frame_pointer=-fomit-frame-pointer
 std_c99=-std=c99
 Wall=-Wall
 ...

suncc:
 fomit_frame_pointer=-xregs=no%frameptr
 std_c99=-xc99=all
 Wall=-erroff=%none
...

host_cflags="-O3 -g $Wall"
check_cflags $std_c99
check_cflags $fomit_frame_pointer
...

This should be done separately.

> Is this sufficient to compile with suncc?  If not, what is missing?

I hope the next revision will be green. ;)

Michael



More information about the ffmpeg-devel mailing list