[openssl-dev] [openssl.org #3792] OpenSSL debug build lacks -Og

Andy Polyakov via RT rt at openssl.org
Mon May 25 15:26:30 UTC 2015


> This is for OpenSSL 1.0.2.
> 
> -Og was added to GCC to allow one to use optimizations that don't
> disturb a debug session. As I understand it, it acts like like -O1 (to
> perform some basic analysis) without losing symbol information (i.e.,
> "optimized out" under the debugger). See
> https://gcc.gnu.org/onlinedocs/gcc-4.9.2/gcc/Optimize-Options.html#Optimize-Options.
> 
> -g3 includes the maximum debug information, including symbolic defines.
> 
> The debug build configuration setting for GCC uses -O0 and it lacks -g3:
> 
>     "gcc" => {
>         cc               => "gcc",
>         cflags           => "",
>         debug_cflags     => "-O0 -g",
>         release_cflags   => "-O3",
>         thread_cflag     => "(unknown)",
>         bn_ops           => "BN_LLONG",
>     },
> 
> For debug builds, perhaps it would be a good idea to use -g3, and -Og
> when available from GCC.

You have to accept that availability of any particular option doesn't
qualify for its immediate inclusion to config. Configs are rather least
common denominators for everybody than whatever you can find on your
command prompt today. It's more appropriate to argue in favour of having
option to override defaults with additional flags at config phase, e.g.
./config -Og. Currently config lines take precedence, but it can be
changed if it's argued for. For reference, I myself is for prioritizing
user-supplied options.




More information about the openssl-dev mailing list