[poky] [PATCH 05/25] u-boot: disable -Os option not supported by gcc

Wolfgang Denk wd at denx.de
Thu Jan 20 15:05:37 PST 2011


Dear Darren Hart,

In message <4D3884A0.8030602 at linux.intel.com> you wrote:
>
> I ran into this in the recent u-boot_git.bb recipe I added. Rather than 
> create a patch to the Makefile, I found it simpler to adding OPTFLAGS to 
> the EXTRA_OEMAKE variable in the recipe:
> 
> EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS=''"
> 
> This negates the -Os in the Makefile.

What exactly is the reason that -Os is not supported?


Note that -Os makes is intentional in U-Boot, and omitting it may
cause problems on a number of systems.

-O2 will create significantly larger code which does not fit into
flash sectors on some systems; on other systems, the code will not
fit any more in the size limitations given by the NAND loader.

In other works, -O2 breaks a number of systems.

I discourage doing this.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
For every complex problem, there is a solution that is simple,  neat,
and wrong.                                               - Mark Twain



More information about the poky mailing list