On 08/23/2011 10:05 PM, Kumar Gala wrote:
> Darren,
> 
> in meta/recipes-bsp/uboot/u-boot.inc:
> 
> # GCC 4.5.1 builds unusable binaries using -Os, remove it from
> OPTFLAGS EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS=''"
> 
> Was this for all u-boot builds, regardless of architecture, or just
> ppc.  Was the build failing or resulting binaries?

My sources differ from yours. We used to drop -Os for all arches, but it caused
issues for powerpc, so we replaced -Os with -O2 there. With the patch below, we
then used -O2 everywhere, regardless of architecture.

According to my sources:

# GCC 4.5.1 builds unusable binaries using -Os, remove it from OPTFLAGS         
 
EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS='-O2'"                  

And according to 'git show 6b76ceed1423480e18844e20fc81f05298bfdd6d':
commit 6b76ceed1423480e18844e20fc81f05298bfdd6d
Author: Darren Hart <[email protected]>
Date:   Wed Feb 9 13:26:46 2011 -0800

    uboot: build with -O2 on all architectures
    
    The -Os option was disabled due to a bug in gcc building bad binaries for 
ARM
    in an earlier commit:
    
    f2dc7fadd8c6b180c3f985873261216d53f47f0d
    
    This caused problems for powerpc which was resolved by replacing -Os with
    -O2 for that architecture:
    
    d0eb6794d964aa5ac938533a222c39bef09fd945
    
    Using -O2 also works for ARM, so there is no need to condition using -O2 on
    powerpc. Remove the condition and use -O2 on all architectures.
    
    Signed-off-by: Darren Hart <[email protected]>
    CC: Ilya Yanok <[email protected]>
    CC: Richard Purdie <[email protected]>

Thanks,

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Reply via email to