Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 29433 - gcc-3.2.3-r1 - kernel compile with -Os breaks XFS recovery
Summary: gcc-3.2.3-r1 - kernel compile with -Os breaks XFS recovery
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-23 08:16 UTC by Cory Visi (RETIRED)
Modified: 2003-11-17 05:19 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cory Visi (RETIRED) gentoo-dev 2003-09-23 08:16:57 UTC
I am using gcc 3.2.3-r1. If I compile my kernel with -Os instead of -O2, XFS 
recovery breaks (no matter how severe the file system damage). The issue is 
consistently reproducable. XFS recovery never works. The XFS development team 
has assured me that I should be able to compile their code with -Os. I have 
not tested this with gcc 3.3.1.
Comment 1 Joshua Kinard gentoo-dev 2003-09-23 17:31:21 UTC
Generally, one should not touch kernel compiliations commands.  -O2 has been certified to work perfectly with the kernel.  -Os uses -O2, but eliminates certaion options that increase code size, so it is possble this is disabling a segment of code in XFS Recovery that relies on an option specified by -O2 but not -Os. -Os also enables specific optimizations that reduce code size.

Unless you're compiling for an embedded environment, I'd advise leaving the -O2 parameter intact to the kernel, and instead reccommend stripping the kernel of any .comment and .note sections via the strip command as follows:

strip -R .comment -R .note <uncompressed kernel image>
Comment 2 Joshua Kinard gentoo-dev 2003-10-02 08:17:15 UTC
Resolving as INVALID as there really isn't anything that can be done with
this bug.  It is likely a generic gcc bug or kernel issue that may or may
not be related to Gentoo, but there is not enough information to determine
the case.  As per Comment #1, it is recommended to try stripping the kernel
if you are concerned about code-size.  The one kernel I have tried building
with -Os didn't even boot.  
Comment 3 Cory Visi (RETIRED) gentoo-dev 2003-11-17 05:19:20 UTC
I'd just like to point out that Gentoo used the -Os flag in its kernels as late as 2.4.19. It was part of the "gentoo" diff included in the patchset.