[Top][All Lists]

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

Re: flag issue in AC_PROG_CXX for Sun Studio

From: Thomas Dickey
Subject: Re: flag issue in AC_PROG_CXX for Sun Studio
Date: Thu, 30 Jul 2009 16:32:15 -0400 (EDT)

On Thu, 30 Jul 2009, Bob Friesenhahn wrote:

On Thu, 30 Jul 2009, Monty Taylor wrote:

The ever helpful setting of -g into CXXFLAGS by AC_PROG_CXX is incorrect
on Sun Studio (IMHO). Currently, the test checks for Sun Studio compiler
and, if so, injects -g. The problem is, -g on Sun Studio means "include
symbols _AND_ disable inlining" The appropriate flag that's similar to
-g on GCC is -g0. (Thanks Sun Studio, for being weird)

I suspect that in this case GCC is being weird since GCC differs from other compilers. However, I agree that -g0 much better for the Sun compiler when used with optimization allowed/enabled (-xO3 is Sun compiler default), and it is what I use in my own optimized debug builds.

the original ("stated") reason for setting the flags in that way was that gcc's optimization was bug-free, while this was not (supposedly) true of other compilers.

(that's more/less the response I got from David MacKenzie long ago - I've
found no reason to agree with that opinion).

Thomas E. Dickey

reply via email to

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