* [PATCH] bitbake.conf: Use -Og in DEBUG_OPTIMIZATION
@ 2019-02-27 7:04 Khem Raj
2019-02-27 7:19 ` Adrian Bunk
0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2019-02-27 7:04 UTC (permalink / raw)
To: openembedded-core
-Og is for optimized debugging experience.
this makes this consistent across different compilers especially gcc and
clang, -O in clang is equal to -O2 where as in gcc its similar to -O1
so it was not giving consistent debugging experience across compilers
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/conf/bitbake.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index 1c5369ec98..758e89f126 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -610,7 +610,7 @@ DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}"
# Disabled until the option works properly -feliminate-dwarf2-dups
FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}"
-DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe"
+DEBUG_OPTIMIZATION = "-Og -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe"
SELECTED_OPTIMIZATION = "${@d.getVar(oe.utils.vartrue('DEBUG_BUILD', 'DEBUG_OPTIMIZATION', 'FULL_OPTIMIZATION', d))}"
SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION DEBUG_BUILD"
BUILD_OPTIMIZATION = "${@oe.utils.vartrue('DEBUG_BUILD', '-O -g -feliminate-unused-debug-types -fno-omit-frame-pointer', '-O2', d)} -pipe"
--
2.21.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] bitbake.conf: Use -Og in DEBUG_OPTIMIZATION
2019-02-27 7:04 [PATCH] bitbake.conf: Use -Og in DEBUG_OPTIMIZATION Khem Raj
@ 2019-02-27 7:19 ` Adrian Bunk
2019-02-27 19:44 ` Khem Raj
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2019-02-27 7:19 UTC (permalink / raw)
To: Khem Raj; +Cc: openembedded-core
On Tue, Feb 26, 2019 at 11:04:20PM -0800, Khem Raj wrote:
> -Og is for optimized debugging experience.
> this makes this consistent across different compilers especially gcc and
> clang, -O in clang is equal to -O2 where as in gcc its similar to -O1
> so it was not giving consistent debugging experience across compilers
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
> meta/conf/bitbake.conf | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index 1c5369ec98..758e89f126 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -610,7 +610,7 @@ DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}"
>
> # Disabled until the option works properly -feliminate-dwarf2-dups
> FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}"
> -DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe"
> +DEBUG_OPTIMIZATION = "-Og -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe"
> SELECTED_OPTIMIZATION = "${@d.getVar(oe.utils.vartrue('DEBUG_BUILD', 'DEBUG_OPTIMIZATION', 'FULL_OPTIMIZATION', d))}"
> SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION DEBUG_BUILD"
> BUILD_OPTIMIZATION = "${@oe.utils.vartrue('DEBUG_BUILD', '-O -g -feliminate-unused-debug-types -fno-omit-frame-pointer', '-O2', d)} -pipe"
> ^^
Another place that might have to be updated.
And the ref/dev-maunuals also need updating (they document -O as default).
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] bitbake.conf: Use -Og in DEBUG_OPTIMIZATION
2019-02-27 7:19 ` Adrian Bunk
@ 2019-02-27 19:44 ` Khem Raj
0 siblings, 0 replies; 3+ messages in thread
From: Khem Raj @ 2019-02-27 19:44 UTC (permalink / raw)
To: Adrian Bunk; +Cc: Patches and discussions about the oe-core layer
On Tue, Feb 26, 2019 at 11:19 PM Adrian Bunk <bunk@stusta.de> wrote:
>
> On Tue, Feb 26, 2019 at 11:04:20PM -0800, Khem Raj wrote:
> > -Og is for optimized debugging experience.
> > this makes this consistent across different compilers especially gcc and
> > clang, -O in clang is equal to -O2 where as in gcc its similar to -O1
> > so it was not giving consistent debugging experience across compilers
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> > meta/conf/bitbake.conf | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> > index 1c5369ec98..758e89f126 100644
> > --- a/meta/conf/bitbake.conf
> > +++ b/meta/conf/bitbake.conf
> > @@ -610,7 +610,7 @@ DEBUG_FLAGS ?= "-g -feliminate-unused-debug-types ${DEBUG_PREFIX_MAP}"
> >
> > # Disabled until the option works properly -feliminate-dwarf2-dups
> > FULL_OPTIMIZATION = "-O2 -pipe ${DEBUG_FLAGS}"
> > -DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe"
> > +DEBUG_OPTIMIZATION = "-Og -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe"
> > SELECTED_OPTIMIZATION = "${@d.getVar(oe.utils.vartrue('DEBUG_BUILD', 'DEBUG_OPTIMIZATION', 'FULL_OPTIMIZATION', d))}"
> > SELECTED_OPTIMIZATION[vardeps] += "FULL_OPTIMIZATION DEBUG_OPTIMIZATION DEBUG_BUILD"
> > BUILD_OPTIMIZATION = "${@oe.utils.vartrue('DEBUG_BUILD', '-O -g -feliminate-unused-debug-types -fno-omit-frame-pointer', '-O2', d)} -pipe"
> > ^^
>
> Another place that might have to be updated.
I did not do this intentionally, since we do not control gcc on build
host, but rethinking it a bit I think it might be doable, if all hosts
we support use gcc 4.8 or newer
for gcc, which I see is the case of centos7 uses gcc 4.8, so thats
the oldest supported distro we list.
>
> And the ref/dev-maunuals also need updating (they document -O as default).
yes, thats taken care of locally for next rev
>
> cu
> Adrian
>
> --
>
> "Is there not promise of rain?" Ling Tan asked suddenly out
> of the darkness. There had been need of rain for many days.
> "Only a promise," Lao Er said.
> Pearl S. Buck - Dragon Seed
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-27 19:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-27 7:04 [PATCH] bitbake.conf: Use -Og in DEBUG_OPTIMIZATION Khem Raj
2019-02-27 7:19 ` Adrian Bunk
2019-02-27 19:44 ` Khem Raj
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox