[FFmpeg-devel] [PATCH] add cflags filtering rules for suncc
Måns Rullgård
mans
Mon Nov 2 19:16:21 CET 2009
Michael Kostylev <michael.kostylev at gmail.com> writes:
>>> --- ./configure.orig
>>> +++ ./configure
>>> @@ -1619,6 +1619,37 @@
>>> cc_version="AV_STRINGIFY(__SUNPRO_C)"
>>> DEPEND_CMD='$(DEPCC) $(DEPFLAGS) $< | sed -e "1s,^.*: ,$@: ," -e "\$$!s,\$$, \\\," -e "1!s,^.*: , ," > $(@:.o=.d)'
>>> DEPFLAGS='$(CPPFLAGS) $(CFLAGS) -xM1'
>>> + filter_cflags=suncc_flags
>>> + suncc_flags(){
>>> + for flag; do
>>> + case $flag in
>>> + -march=*|-mcpu=*)
>>> + case "${flag#*=}" in
>>> + native) echo -xtarget=native ;;
>>
>> We don't pass "native" directly to the compiler so it doesn't need to
>> be handled here. Including it for completeness doesn't hurt though.
>
>>> + v9) echo -xarch=sparc ;;
>>
>> Isn't it better to use -xtarget here? That option takes more detailed
>> chip names and sets -xarch appropriately.
>
> It takes a system name, e.g.
> ultra, ultra2, ultra2i, ultra1/140,
> ultra1/170, ultra1/200, ultra2/1170,
> ultra2/1200, ultra2/1300, ultra2/2170,
> ultra2/2200, ultra2/2300, ultra2e, ultra2i
> and sets -xchip (-mtune for gcc), -xcache and -xarch.
> How can we guess which system is implied?
The x86 ones certainly map better to the names we use, being specific
implementations, not general ISA levels. Use whatever gives the most
accurate match for each name that might be passed to configure --cpu.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list