[poky] [PATCH 3/3] u-boot: compile with -O2 on PowerPC

Darren Hart dvhart at linux.intel.com
Wed Feb 9 15:34:54 PST 2011


On 02/09/2011 03:21 PM, Ilya Yanok wrote:
> Hi Darren,
>
> 09.02.2011 20:42, Darren Hart wrote:
>> This is already disabled in u-boot.inc with the following line:
>>
>> # GCC 4.5.1 builds unusable binaries using -Os, remove it from OPTFLAGS
>> EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS=''"
>
> Yes, sorry, I've useed not up-to-date version of metadata and missed
> this fix. But it has to be '-O2' still.

Understood, -O2 is in master now for all arches.

>
>> Resetting OPTFLAGS to '' removes the -Os from the variable in the
>> Makefile. This isn't just a PowerPC problem, it also manifested on ARM,
>> I believe it is a GCC 4.5.1 issue.
>
> Well, the difference here is that on PowerPC we have -Os option disabled
> completely. Wolfgang tried to summarize know gcc bugs and seems like -Os
> bugs on ARM and PowerPC have different nature (it looks like bugs on ARM
> are already fixed while on the ones PowerPC are not).
> Then I think it's a bad idea to remove -Os everywhere: U-Boot really
> wants to be built with -Os optimization so we might want to change
> optimization level to -O2 only for targets where it's absolutely
> required. Actually I was able to build and successfully run U-Boot on
> beagleboard with -Os so it doesn't look like it's completely broken on ARM.

Interesting - is this using the current recipe in poky? It was building 
for the beagleboard that I hit the bug which caused me to clear -Os from 
the EXTRA_OEMAKE arguments.


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



More information about the poky mailing list