[FFmpeg-devel] [PATCH] configure: warn if GCC 4.2 is being used
gajjanag at mit.edu
Mon Aug 24 21:40:47 CEST 2015
On Mon, Aug 24, 2015 at 8:28 AM, Ganesh Ajjanagadde <gajjanag at mit.edu> wrote:
> On Mon, Aug 24, 2015 at 8:20 AM, Nicolas George <george at nsup.org> wrote:
>> Le septidi 7 fructidor, an CCXXIII, Ganesh Ajjanagadde a écrit :
>>> >> + if [ "$first" = true ] && $_cc -dumpversion | grep -q '^4\.2'; then
>>> The (-q) is for suppressing output, only yielding the exit code.
>>> The reason it works is because '^' matches the beginning of a line,
>>> not the beginning after a punctuation character.
>> I did not follow the rest of the thread, but I would suggest to avoid
>> forking external processes whenever possible:
>> case "$($_cc -dumpversion) in
>> 4.2*) ...;;
> Thanks for pointing this out.
> Note there is another instance as well right above (in fact, that is
> where I got the idea).
> There may be more as well.
> I could change both of them (and maybe more) in a separate patch (I
> prefer this),
> or change this one for this patch itself, and fix others separately.
I could not find any other obvious instances of an unnecessary grep.
As such, I have sent out a 2 patch series, first to improve existing check,
and second for the 4.2 warning.
>> Nicolas George
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
More information about the ffmpeg-devel