On 2014-02-24 19:13, Mike Duigou wrote:
On Feb 24 2014, at 06:09 , Magnus Ihse Bursie <magnus.ihse.bur...@oracle.com> 
wrote:


* I'd also have a preference for moving the "compiler supports -Og" check 
outside the actual flag setting. Maybe you can do the checking first and set a variable 
indicating the availablility of this flag, e.g. GCC_SUPPORTS_OG_FLAG, and then just check 
on that. The point here is that it's hard as it is to see the pattern between different 
optimization levels and compilers, but the more the code resembles a simple structured 
assignment matrix, the easier it is to see it. With checking code like this in the midst, 
it's easier to get lost.
Understood. Perhaps do the GCC_SUPPORTS_OG_FLAG in compiler setup?
I think that would be good, yes. In my view, toolchain.m4 is responsible for determining information about the actual compilers; type, version, bugs and capabilities.

flags.m4 should setup proper flags, based on the results of the analysis in toolchain.m4.

/Magnus

Reply via email to