[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compiler version checks

From: Eric Blake
Subject: Re: compiler version checks
Date: Thu, 30 Apr 2009 06:38:00 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20090302 Thunderbird/ Mnenhy/

Hash: SHA1

According to Ralf Wildenhues on 4/28/2009 12:02 AM:
>> Rather than have four consecutive copies of _AC_DO_LIMIT, wouldn't
>> something more compact like this (untested) snippet work?
>> for ac_option in --version -v -V -qversion ; do
>>   _AC_DO_LIMIT([$ac_compiler $ac_option >&AS_MESSAGE_LOG_FD])
>> done
> Sure.  Unfortunately, it wouldn't work to check the exit status of
> the command, as some don't reliably fail with an unknown argument.

Agreed, so no blind use of break within the loop, and no way to reduce the
number of forks in general.  On the other hand, maybe it is worth adding
an exception that if the first iteration, using --version, detects gcc,
then we don't need the other iterations (it is okay to make life on free
systems optimal, as long as it doesn't preclude life on other systems);
but special-casing gcc does not have to be part of this patch.  Overall,
in case I wasn't clear earlier, I like the intent of this patch, so please
commit once you've converted all of four of the original linear compiler
checks into loops.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


reply via email to

[Prev in Thread] Current Thread [Next in Thread]