Building Kernel with -O0

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Keith A. Prickett
Date: Thursday, September 4, 2008 - 10:50 am

I was looking at some changes to the 2.6.26.y kernel in "compiler-gcc.h"
and had some questions.
( http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.26.y.git;a=commitdiff;h=ae3... )

I was attempting to cross-compile Linux for a Marvell core with
Optimizations turned off and ran across an error due to the
__attribute__((always_inline)) attribute.

It looks like the default behavior used to always have this feature on,
but Ingo committed some changes that allows this behavior to be turned
off (With the correct Kconfig file changes).

I'm VERY new to Linux but was wondering if there was a way (config
option) to turn this inline attribute off in previous versions of the
kernel besides these new macros.  It seems building with optimization
level 0 should be a natural thing for kernel driver developers to do for
debugging purposes.

In summary: I want to compile with optimizations off and the compile is
failing now when I try this.  How can this be resolved?


For reference:
- Stable Kernel 2.6.26
- I'm using arm-marvell-eabi-gcc 4.1.1
- Compiling for ARM architecture
- Neither CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING nor
CONFIG_OPTIMIZE_INLINING are on (or even options in the ARM
architecture)
- The error I receive is:
 "sorry, unimplemented: inlining failed in call to '<inline function>':
function body not available"


Thanks in advance,
--
Keith Prickett
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Building Kernel with -O0, Keith A. Prickett, (Thu Sep 4, 10:50 am)
Re: Building Kernel with -O0, Adrian Bunk, (Tue Sep 9, 9:04 am)
Re: Building Kernel with -O0, Keith A. Prickett, (Tue Sep 9, 10:10 am)
Re: Building Kernel with -O0, linux-os (Dick Johnson), (Tue Sep 9, 11:55 am)
Re: Building Kernel with -O0, Andi Kleen, (Tue Sep 9, 12:24 pm)
Re: Building Kernel with -O0, Adrian Bunk, (Tue Sep 9, 12:43 pm)
Re: Building Kernel with -O0, Andi Kleen, (Tue Sep 9, 1:05 pm)
Re: Building Kernel with -O0, David Howells, (Tue Sep 9, 3:24 pm)
Re: Building Kernel with -O0, Adrian Bunk, (Thu Sep 25, 6:31 am)
Re: Building Kernel with -O0, David Howells, (Thu Sep 25, 6:51 am)