[LFS Trac] #2662: gcc 4.5.0 -Os does not generate correct code

LFS Trac trac at linuxfromscratch.org
Fri May 14 14:54:00 PDT 2010

#2662: gcc 4.5.0 -Os does not generate correct code
 Reporter:  bdubbs@…                     |       Owner:  lfs-book@…                   
     Type:  defect                       |      Status:  new                          
 Priority:  high                         |   Milestone:  6.7                          
Component:  Book                         |     Version:  SVN                          
 Severity:  major                        |    Keywords:                               
 I'm moving this from #2628 because it is a gcc issue.

 I went though an svn build of the latest gcc-4.5 (svn revision (revision
 159398) and the kernel segfaults when optimizing for size:


 Without this flag, the kernel boots fine.  The issue may be limited to

 With my configuration, the kernel is about 3.6M when optimized and about
 4.1M without.

 For a more detailed description of my experimentation, see

 In the meantime there are a couple of options we have for lfs-svn:

  1. Revert gcc to the latest gcc-4.4.x
  2. Put a warning in the book not to optimize for size.  AFAIK, the only
 package that does that by default is the kernel.
  3. Do nothing and wait for gcc to release a fix.

Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/2662>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.

More information about the lfs-book mailing list