Re: Building Kernel with -O0

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andi Kleen <andi@...>
Cc: Keith A. Prickett <keithp@...>, <linux-kernel@...>
Date: Tuesday, September 9, 2008 - 3:43 pm

On Tue, Sep 09, 2008 at 09:24:58PM +0200, Andi Kleen wrote:
                                                     ^^^^^^^
buildtime


The reason why it works for Keith at all seems to be that even with -O0 
gcc already does this kind of optimizations.

Check e.g. the assembler generated for the following
(userspace) program with -O0:

<--  snip  -->

int foobar;

int main()
{ 
	if (1) return 0;

	foobar = 12345;

	return 42;
}

<--  snip  -->


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

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