]> code.ossystems Code Review - openembedded-core.git/commitdiff
uboot: build with -O2 on all architectures
authorDarren Hart <dvhart@linux.intel.com>
Wed, 9 Feb 2011 21:26:46 +0000 (13:26 -0800)
committerRichard Purdie <rpurdie@linux.intel.com>
Wed, 9 Feb 2011 22:44:52 +0000 (22:44 +0000)
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 <dvhart@linux.intel.com>
CC: Ilya Yanok <yanok@emcraft.com>
CC: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-bsp/uboot/u-boot.inc

index 3a53fbad4d3f80816648679b3b97726b080ba7cf..f60667ee6bba693b59c1f105710fda93d8d6d9f4 100644 (file)
@@ -12,7 +12,7 @@ inherit deploy
 PARALLEL_MAKE=""
 
 # GCC 4.5.1 builds unusable binaries using -Os, remove it from OPTFLAGS
-EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS=''"
+EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX} OPTFLAGS='-O2'"
 
 UBOOT_MACHINE ?= "${MACHINE}_config"
 UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin"
@@ -23,12 +23,7 @@ do_compile () {
        unset CFLAGS
        unset CPPFLAGS
        oe_runmake ${UBOOT_MACHINE}
-       # -Os is disabled on PowerPC
-       if [ ${TARGET_ARCH} == "powerpc" ] ; then
-               oe_runmake OPTFLAGS=-O2 all
-       else
-               oe_runmake all
-       fi
+       oe_runmake all
 }
 
 do_deploy () {