autoconf
[Top][All Lists]
Advanced

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

Re: Testing for unknown flags in different compilers


From: David A. Wheeler
Subject: Re: Testing for unknown flags in different compilers
Date: Thu, 20 Feb 2014 10:12:37 -0500 (EST)

Thomas Jahns:
> Also this is going to cause all sorts problems for compilers that use -W for
> something else entirely, for example on PowerPC xlc has
> -W<program>,<options_list>
> so simply adding some arbitrary -Wsomecharactersequence might easily cause
> catastrophic results later on.

I think that's the whole point of the macro; instead of just adding arbitrary 
flags,
it tests to make sure there are *not* catastrophic effects, but instead, that
the flag is recognized.

> I suggest your macro at least try to make sure
> your compiler is GNU CC before modifying CFLAGS in any way.

I like GNU CC, but I think that would be a mistake.
There are other compilers out there!!

Autoconf should make it easy to automatically work with the
varying compilers (including automatically enabling whatever warning
flags they support, and allowing developers to control them more finely
for their particular project in a relatively compiler-agnostic way).

--- David A. Wheeler



reply via email to

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