> On 11 Jul 2024, at 17:54, Richard Purdie via lists.openembedded.org 
> <[email protected]> wrote:
> 
> -DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}"
> +DEBUG_LEVELFLAG ?= "-g"
> +DEBUG_FLAGS ?= "${DEBUG_LEVELFLAG} -feliminate-unused-debug-types 
> ${DEBUG_PREFIX_MAP}”

Considering -feliminate-unused-debug-types is the default according to the GCC 
docs, why don’t we remove DEBUG_FLAGS entirely to remove a level of 
indirection?  It’s not a huge amount of copy-paste as we can set 

FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_PREFIX_MAP} ${DEBUG_LEVELFLAG}”
DEBUG_OPTIMIZATION = "-Og -pipe ${DEBUG_PREFIX_MAP} ${DEBUG_LEVELFLAG}”

(also, why is -pipe an optimisation flag?)

I was also thinking a less invasive solution would be to do this in llvm.bb:

DEBUG_FLAGS:append = "${@d.getVar(oe.utils.vartrue('DEBUG_BUILD', '', ‘-g0', 
d))}”

Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#201790): 
https://lists.openembedded.org/g/openembedded-core/message/201790
Mute This Topic: https://lists.openembedded.org/mt/107166892/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to