Skip to contentSkip to conversation

Howto create image with -O0 optimization

DISCUSSION Andreas Mueller 2 participants 3 messages Aug 9, 2011 – Aug 10, 2011

lore
Share & tools
lore
#0 lore raw

Hi

I am debugging thunar to find the reason for segfault and modified the recipe to be compiled without optimization -O0. Now I need to step into shared libraries too but since they are compiled with optimization it causes confusing step seqences.

So: How do I force -O0 optimization for whole images?

Andreas

#1 lore raw
Quoted 9 lines · Andreas Mueller

Hi

I am debugging thunar to find the reason for segfault and modified the recipe to be compiled without optimization -O0. Now I need to step into shared libraries too but since they are compiled with optimization it causes confusing step seqences.

So: How do I force -O0 optimization for whole images?

couple of ways. Set DEBUG_BUILD = "1" in your local.conf and recompile this will build stuff with -O1 which is better for debugging then -O2

otherwise you can override SELECTED_OPTIMIZATION = "whatever you want" in local.conf

Quoted 7 lines

Andreas

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#2 lore raw
Quoted 8 lines · Khem Raj
Quoted 7 lines · Andreas Mueller

Hi

I am debugging thunar to find the reason for segfault and modified the recipe to be compiled without optimization -O0. Now I need to step into shared libraries too but since they are compiled with optimization it causes confusing step seqences.

Quoted 8 lines
Quoted 1 line

So: How do I force -O0 optimization for whole images?

couple of ways. Set DEBUG_BUILD = "1" in your local.conf and recompile this will build stuff with -O1 which is better for debugging then -O2

otherwise you can override SELECTED_OPTIMIZATION = "whatever you want" in local.conf

Thanks Khem. With your hook I learned that:

o Optimization-magic is found in bitbake.conf shipped by oe-core
o eglibc cannot be compiled with -O0 ( complains that it needs optimization )

So I now do a rebuild with DEBUG_BUILD = "1" in local.conf.

A bit off-topic: Is there a wiki for newbies like me telling howto setup environment for application/library debugging?

Cheers

Andreas