Quantcast
Channel: Active questions tagged linux-kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 12322

how to change kernel optimization level?

$
0
0

I use kgdb for kernel debugging and I have a problem with printing values.

I wanted to get information about parameters of function. (ex (gdb) p *page) But all I got was optimized out

I found that it happens due to compiler optimization. And they says changing kernel optimization level to Og would help.

But I don't know how to change it.

I changed toplevel Makefile like below.

703 ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
704 KBUILD_CFLAGS   += -Os
705 else
706 KBUILD_CFLAGS   += -Og                                                                                                                                                                                          
707 endif

But, I got error during make.

scripts/Makefile.build:497: recipe for target 'fs/cifs' failed

Viewing all articles
Browse latest Browse all 12322

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>