On Sep 1, 2013, at 12:35 PM, Klemen Košir wrote:

> I'm using -Os since I'll be installing it on a USB drive.


That shouldn't be the definitive reason for using -Os. If you  
understand what Os does, it wouldn't matter where you are installing  
the binaries. It has to do with which system you will be running the  
system with. The whole idea for optimization is to reduce code size.  
You'll find out that O3 will usually give you the same size of binary  
as Os. O2 a little less. O1 a little less. and no optimizations or -O0  
will give you the largest binary.

-Os has obvious value if one is compiling for a space-constrained  
environment like a small device. But it turns out that, in some  
situations, optimizing for space can also produce faster code. In a  
sense, we are all running space-constrained systems, in that the  
performance of our CPUs depends heavily on how well those CPUs are  
using their cache space. Space-optimized code can make better use of  
scarce instruction cache space, and, as a result, perform better  
overall.

Basically, you aren't worried about drive space. It's cache space,  
that this is all pertaining to.

If you are going to use O3 or Os with binutils build system:

pass --disable-werror to the configure line.

Anyway, the error you have encountered has been around in binutils for  
a long time since the gcc 4.1.1 days or earlier, and early binutils  
builds when people use -Os or -O3.
There have been multiple posts at the lfs-support and lfs-dev mailing  
lists about it.

Don't take optimizations lightly and know exactly what they do and  
make sure that you are using them for the right reason. Not sure about  
installing it on a USB drive is the proper reason for using Os.

Sincerely,

WIlliam Harrington
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to