[FFmpeg-devel] [PATCH] When checking for compiler flags, check if warnings are reported.
Thu Oct 2 14:15:32 CEST 2008
Diego 'Flameeyes' Petten? wrote:
> M?ns Rullg?rd <mans at mansr.com> writes:
>> Diego 'Flameeyes' Petten? wrote:
>>> log "$@"
>>> - "$@" >> $logfile 2>&1
>>> + rm -f $TMPRES
>>> + ( "$@" 2>&1 && touch $TMPRES; ) | tee $TMPLOG >> $logfile
>>> + test -f $TMPRES
>> I don't like the look of this. I'm sure there's a better way, but I
>> have to think about it.
> Yes I sincerely don't find it the nicest approach, but again I have no
> better way to handle this just yet; if you can find one I'd be very
> pleased ;)
>> Just set LC_ALL=C at the start of configure instead. I've been meaning
>> to do that anyway.
> Probably a very good idea.
Feel free to send a patch.
>>> log check_cflags "$@"
>>> - check_cc "$@" <<EOF && add_cflags "$@"
>>> + check_cc "$@" <<EOF || return
>>> int x;
>>> + grep -qi "warning" $TMPLOG && return
>>> + grep -qi "illegal option" $TMPLOG && return
>>> + grep -qi "unrecognized" $TMPLOG && return
>>> + add_cflags "$@"
>> This has two problems. Firstly, the return value from the function is
> Good point, will fix it.
>> Secondly, warnings are expected, or at least accepted, in a few
>> of the tests (I don't recall which ones), so this is overly strict.
> Hmm, on cflags tests you mean? I do expect warnings to be excepted and
> accepted for most check_cc checks, but for flags checking?
> I made sure the warnings are checked for _only_ during flags checking
> because I did expect warnings in other case, but I wouldn't expect extra
> warnings while checking for flags support, sincerely, can you give me
> any example of a warning accepted during flags checking?
You're probably right, there should be no warnings in pure flag checks.
mans at mansr.com
More information about the ffmpeg-devel