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

noloader@gmail.com via RT rt at openssl.org
Fri Apr 10 10:29:33 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.




More information about the openssl-dev mailing list