Skip to contentSkip to conversation

prevent -O0 for glibc builds?

DISCUSSION Robert Schuster 6 participants 7 messages Jul 10, 2008 – Jul 11, 2008

lore
Share & tools
lore
#0 lore raw

Hi,
recently I set the (debug) optimization flags to "-g -O0" (= really no-optimization and full debug infos) and got an error from the glibc builds because glibc's configury told me that it cannot be compiled with no optimization.

Would it be possible that the glibc recipes replace -O0 with something else and print a note about this instead of failing? The reason is that the current behavior prevents me from compiling a whole image without optimization.

The reason I want -O0 in the first place is that while debugging an executable gdb told me that certain variables where optimized out.

Regards
Robert

#1 lore raw
Quoted 6 lines · Robert Schuster

Hi,
recently I set the (debug) optimization flags to "-g -O0" (= really no-optimization and full debug infos) and got an error from the glibc builds because glibc's configury told me that it cannot be compiled with no optimization.

Quoted 7 lines

Would it be possible that the glibc recipes replace -O0 with something else and print a note about this instead of failing? The reason is that the current behavior prevents me from compiling a whole image without optimization.

The reason I want -O0 in the first place is that while debugging an executable gdb told me that certain variables where optimized out.

I think you'd be better off just setting SELECTED_OPTIMIZATION_glibc = "-O -g" or some such.

p.

#2 lore raw
In reply to Robert Schuster
Quoted 6 lines · Robert Schuster

Hi,
recently I set the (debug) optimization flags to "-g -O0" (= really no-optimization and full debug infos) and got an error from the glibc builds because glibc's configury told me that it cannot be compiled with no optimization.

Quoted 7 lines

Would it be possible that the glibc recipes replace -O0 with something else and print a note about this instead of failing? The reason is that the current behavior prevents me from compiling a whole image without optimization.

The reason I want -O0 in the first place is that while debugging an executable gdb told me that certain variables where optimized out.

glibc expects some optimizations like inlining for loader's early startup code because it can not make function calls as the PLT has not yet been relocated.

Thx

-Khem

Quoted 10 lines

Regards
Robert

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

#3 lore raw

bitbake man page typo

bitbake.1 (working copy) renamed from bitbake.1 (revision 48512) +0 -0
Index: bitbake.1
===================================================================
@@ -64,7 +64,7 @@

Specify task to execute. Note that this only executes the specified task for the providee and the packages it depends on, i.e. 'compile' does not implicitly call stage for the dependencies (IOW: use only if you know what you are doing). -Depending on the base.bbclass a listtaks tasks is defined and will show +Depending on the base.bbclass a listtasks tasks is defined and will show available tasks.
.TP
.B \-rFILE, \-\-read=FILE

#4 lore raw

Re: bitbake man page typo

Quoted 12 lines · Rich Pixley

Index: bitbake.1
===================================================================

bitbake.1 (working copy) renamed from bitbake.1 (revision 48512) +0 -0
@@ -64,7 +64,7 @@
 Specify task to execute. Note that this only executes the specified 

task for
the providee and the packages it depends on, i.e. 'compile' does not
implicitly
call stage for the dependencies (IOW: use only if you know what you are
doing).

bitbake.1 (working copy)

Quoted 5 lines
bitbake.1 (working copy) renamed from bitbake.1 (revision 48512) +1 -1
-Depending on the base.bbclass a listtaks tasks is defined and will show
+Depending on the base.bbclass a listtasks tasks is defined and will show
 available tasks.
 .TP
 .B \-rFILE, \-\-read=FILE

Still there is one more left. It should be 'listtasks task' I think.

Khem

#5 lore raw

Compiling a custom kernel module

In reply to Rich Pixley

Hey guys,
I am very new to Open Embedded so please bare with me if I make it too
obvious :). We are using a gumstix embedded system with open embedded (and the angstrom release that gumstix provides). We would like to use the kernel module cp2101 with a usb device. The default cp2101 module won't work, since we have to edit the USB Device ID in the source code. I'm having a hard time figuring out:

1.  How do I 'enable' the cp2101 module in the kernel?
2.  How do I rebuild the kernel, once the source code is edited?
3.  How to I ensure that the module is part of the final build, so that I can 

do a 'modprove cp2101' on the gumstix and have it load successfully?

I have found a few references, including emails on this email list, but nothing that explains it in a clear and concise manner (yet, at least).

Thank you in advance,
Blaine

#6 lore raw

Re: Compiling a custom kernel module

Quoted 3 lines · Blaine Booher

Hey guys,
I am very new to Open Embedded so please bare with me if I make it too
obvious :).

Welcome :-)

Quoted 6 lines

We are using a gumstix embedded system with open embedded (and the angstrom release that gumstix provides). We would like to use the kernel module cp2101 with a usb device. The default cp2101 module won't work, since we have to edit the USB Device ID in the source code. I'm having a hard time figuring out:
1. How do I 'enable' the cp2101 module in the kernel?

Copy an updated defconfig to:
packages/linux/gumstix-kernel-2.6.21/gumstix-connex/defconfig

Note, figure out what kernel you are building first, the above is just a guess.

Quoted 1 line

2. How do I rebuild the kernel, once the source code is edited?

bitbake -c rebuild virtual/kernel (rebuilds the kernel)

For development, I usually keep a kernel tree separate from the OE kernel, and then just copy the defconfig and patches to the OE build when I get everything correct.

Alternatively, you can:

bitbake -c devshell virtual/kernel

and do your development there in a development shell. Once you get everything finished, create patch files/defconfig and copy to the OE recipe.

Quoted 2 lines

3. How to I ensure that the module is part of the final build, so that I can do a 'modprove cp2101' on the gumstix and have it load successfully?

look at the name of the *.ipk file generated by OE build system. Then create a custom image file and add the ipk file name to the IMAGE_INSTALL variable.

The following article has some examples:

http://bec-systems.com/web/content/view/79/9/

Cliff

Signature · 3 lines
=======================
Cliff Brake
http://bec-systems.com