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

Adrian Alonso aalonso at secretlab.ca
Mon Jan 17 12:29:18 PST 2011


* Disable -Os optspace option not supported by gcc use insted
  -O2
* Bump PR

Signed-off-by: Adrian Alonso <aalonso at secretlab.ca>
---
 .../uboot/files/uboot-do-not-use-Os-option.patch   |   30 ++++++++++++++++++++
 recipes-bsp/uboot/u-boot-xilinx_git.bb             |    8 ++++-
 2 files changed, 36 insertions(+), 2 deletions(-)
 create mode 100644 recipes-bsp/uboot/files/uboot-do-not-use-Os-option.patch

diff --git a/recipes-bsp/uboot/files/uboot-do-not-use-Os-option.patch b/recipes-bsp/uboot/files/uboot-do-not-use-Os-option.patch
new file mode 100644
index 0000000..c4153e4
--- /dev/null
+++ b/recipes-bsp/uboot/files/uboot-do-not-use-Os-option.patch
@@ -0,0 +1,30 @@
+From 8a4e1e92becc3994907f18919e9ee8b51b0f377a Mon Sep 17 00:00:00 2001
+From: Adrian Alonso <aalonso at secretlab.ca>
+Date: Mon, 6 Dec 2010 22:59:20 -0600
+Subject: [PATCH 1/2] uboot: do not use Os option
+
+* Fix error: Do not use -Os option if --enable-target-optspace
+  is not set.
+* Gcc optospace options is disabled for powerpc machines
+* Use -O2 optimization level instead
+
+Signed-off-by: Adrian Alonso <aalonso at secretlab.ca>
+---
+ config.mk |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/config.mk b/config.mk
+index a63e9cd..ba629d1 100644
+--- a/config.mk
++++ b/config.mk
+@@ -138,7 +138,7 @@ ARFLAGS = crv
+ endif
+ RELFLAGS= $(PLATFORM_RELFLAGS)
+ DBGFLAGS= -g # -DDEBUG
+-OPTFLAGS= -Os #-fomit-frame-pointer
++OPTFLAGS= -O2 #-fomit-frame-pointer
+ ifndef LDSCRIPT
+ #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug
+ ifeq ($(CONFIG_NAND_U_BOOT),y)
+--
+1.7.2.3
diff --git a/recipes-bsp/uboot/u-boot-xilinx_git.bb b/recipes-bsp/uboot/u-boot-xilinx_git.bb
index 50d99e3..3b35ae5 100644
--- a/recipes-bsp/uboot/u-boot-xilinx_git.bb
+++ b/recipes-bsp/uboot/u-boot-xilinx_git.bb
@@ -1,9 +1,13 @@
 require ../meta/recipes-bsp/uboot/u-boot.inc
-PR = "r2"
+PR = "r3"
+THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
+FILESPATH =. "${@base_set_filespath(["${THISDIR}/files"], d)}:"
 
 BRANCH="master"
 TAG="e094f2479ea339d7f48b6826f06f0be4984d9a98"
-SRC_URI = "git://git.xilinx.com/u-boot-xlnx.git;branch=${BRANCH};protocol=git"
+SRC_URI = "git://git.xilinx.com/u-boot-xlnx.git;branch=${BRANCH};protocol=git \
+           file://uboot-do-not-use-Os-option.patch \
+          "
 SRCREV = "${TAG}"
 
 inherit xilinx-boot
-- 
1.7.3.4




More information about the poky mailing list