ENABLE_SYMBOLS=true does nothing
sbergman at redhat.com
Wed Oct 31 01:50:09 PDT 2012
On 10/30/2012 11:11 PM, David Ostrovsky wrote:
> On 30.10.2012 22:03, Kohei Yoshida wrote:
>> So, this script can add -g to the CXXFLAGS, but unfortunately the
>> symbols get stripped during linking because of -Wl,-S option passed to
>> the linker.
> grep -r LINKERSTRIPDEBUGFLAGS *
> LinkTarget.mk:gb_LinkTarget__get_stripldflags=$(if $(call
> platform/unxgcc.mk:gb_LINKERSTRIPDEBUGFLAGS := -Wl,-S
> But why something like that would be needed anyway? If you don't want
> symbols, don't use -g and If you do have symbols don't strip it!
> I would recommend to follow the rule of least surprise: no one expects
> the symbols to be stripped.
> Would it be an option to remove that magic behaviour or at least turn it
> off per default?
Yes, I was wondering similarly when reading this thread. My guess was
that gb_LINKERSTRIPDEBUGFLAGS was a relic from past attempts at getting
all these settings into a useful state, and that we should just get rid
of it. But looking closer, it only got added recently with Lubos's
"allow LDFLAGS from gbuild to be selective too":
> +# similar for LDFLAGS, use linker optimization flags in non-debug case,
> +# but moreover strip debug from libraries for which debuginfo is not wanted
> +# (some libraries reuse .o files from other libraries, notably unittests)
> +gb_LinkTarget__get_stripldflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),,$(gb_LINKERSTRIPDEBUGFLAGS))
> +gb_LinkTarget__get_debugldflags=$(if $(call gb_LinkTarget__debug_enabled,$(1)),,$(gb_LINKEROPTFLAGS) $(call gb_LinkTarget__get_stripldflags,$(1)))
More information about the LibreOffice