[FFmpeg-devel] [PATCH] When checking for compiler flags, check if warnings are reported.
Diego 'Flameeyes' Pettenò
Thu Oct 2 13:10:47 CEST 2008
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
> Just set LC_ALL=C at the start of configure instead. I've been meaning
> to do that anyway.
Probably a very good idea.
>> 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?
Diego "Flameeyes" Petten?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
More information about the ffmpeg-devel