On Thu, 2024-07-11 at 19:05 +0000, Ross Burton wrote:
>
>
> > 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?
I think we were an early adopter of that one. If it is a default now we
can drop it.
> 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}”
It is the prefix map I worry about as some recipes do different things
with DEBUG_FLAGS. Its probably a better long term change but probably
more to debug to make it work.
> (also, why is -pipe an optimisation flag?)
It was controversial back then and was done as a speed improvement.
There is probably more refactoring that could be done here.
>
> 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))}”
I was trying to keep this as a distro level opt in/out rather than force that
decision
on everyone...
Cheers,
Richard
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#201793):
https://lists.openembedded.org/g/openembedded-core/message/201793
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]]
-=-=-=-=-=-=-=-=-=-=-=-