Re: kernel compiling

Alexei Babich <[email protected]>
Newsgroups gmane.linux.ports.arm.general
Organization Rezonans plc.
Message-ID <[email protected]>
> the standard way to compile the kernel with debug symbols is selecting
> the corresponding option in the kernel configuration:
> 
> Kernel hacking  --->
>   ...
>   [*] Kernel debugging
>   ...
>   [*] Compile the kernel with debug info
> 
This is known, but the the additional debugging information is not enough as compilation is needed without optimization (what the option -O0 is for). In your decision, I see the calls as following:
---
arm-unknown-linux-gnu-gcc -Wp,-MD,arch/arm/kernel/.asm-offsets.s.d  -nostdinc -isystem /mnt/data/clfs2/cross-tools/lib/gcc/arm-unknown-linux-gnu/4.3.1/include -Iinclude  -I/tmp/linux/arch/arm/include -include include/linux/autoconf.h -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-pxa/include -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -O2 -marm -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mabi=aapcs-linux -mno-thumb-interwork -D__LINUX_ARM_ARCH__=5 -march=armv5te -mtune=xscale -Wa,-mcpu=xscale -msoft-float -Uarm -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -g -Wdeclaration-after-statement -Wno-pointer-sign -fwrapv  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(asm_offsets)"  -D"K
 BUILD_MODNAME=KBUILD_STR(asm_offsets)"  -fverbose-asm -S -o arch/arm/kernel/asm-offsets.s arch/arm/kernel/asm-offsets.c
---
Please notice -O2 option here.

So, how the building can be performed without optimization?

-- 
Regards,
Alexei Babich, circuit design engineer, Rezonans plc., Chelyabinsk, Russia
http://www.rez.ru
Jabber ID: [email protected]

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.