Poky Project Discussions
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: Adrian Alonso <aalonso@secretlab.ca>
Cc: "poky@yoctoproject.org" <poky@yoctoproject.org>
Subject: Re: [PATCH 05/25] u-boot: disable -Os option not supported by gcc
Date: Thu, 20 Jan 2011 10:53:20 -0800	[thread overview]
Message-ID: <4D3884A0.8030602@linux.intel.com> (raw)
In-Reply-To: <1295296178-18590-5-git-send-email-aalonso@secretlab.ca>

On 01/17/2011 12:29 PM, Adrian Alonso wrote:
> * Disable -Os optspace option not supported by gcc use insted
>    -O2
> * Bump PR
>


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.

--
Darren

> Signed-off-by: Adrian Alonso<aalonso@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@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@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


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


  reply	other threads:[~2011-01-20 18:53 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-17 20:29 [PATCH 01/25] xilinx-kernel: bbclass to handle linux kernel hw/sw integration Adrian Alonso
2011-01-17 20:29 ` [PATCH 02/25] xilinx-boot: bbclass to handle u-boot " Adrian Alonso
2011-01-17 20:29 ` [PATCH 03/25] gcc: crosssdk unset TARGET_FPU Adrian Alonso
2011-01-17 23:55   ` Ilya Yanok
2011-01-18  0:59     ` Adrian Alonso
2011-01-18  1:45       ` Ilya Yanok
2011-01-20  2:11       ` Ilya Yanok
2011-01-20 17:35         ` Saul Wold
2011-01-20 17:53           ` Adrian Alonso
2011-01-21  0:43             ` Ilya Yanok
2011-01-21  0:47           ` [PATCH] native,nativesdk,crosssdk: reset TARGET_FPU Ilya Yanok
2011-01-17 20:29 ` [PATCH 04/25] u-boot: update version use xilinx-boot bbclass Adrian Alonso
2011-01-17 20:29 ` [PATCH 05/25] u-boot: disable -Os option not supported by gcc Adrian Alonso
2011-01-20 18:53   ` Darren Hart [this message]
2011-01-20 18:55     ` Darren Hart
2011-01-20 21:41       ` Adrian Alonso
2011-01-20 23:05     ` Wolfgang Denk
2011-01-20 23:24       ` Richard Purdie
2011-01-22 14:48         ` Wolfgang Denk
2011-01-23  0:11           ` Richard Purdie
2011-01-25  9:09             ` Wolfgang Denk
2011-01-25 22:49               ` Richard Purdie
2011-01-17 20:29 ` [PATCH 06/25] virtex4: fix machine name in u-boot preferred version Adrian Alonso
2011-01-17 20:29 ` [PATCH 07/25] virtex5: " Adrian Alonso
2011-01-17 20:29 ` [PATCH 08/25] xilinx-boot: add ml405 in default target configuration Adrian Alonso
2011-01-17 20:29 ` [PATCH 09/25] u-boot-xilinx: ml405 uartlite support Adrian Alonso
2011-01-17 20:29 ` [PATCH 10/25] xilinx-boot: split configure function Adrian Alonso
2011-01-17 20:29 ` [PATCH 11/25] xilinx-boot: add do_mk_xparam function Adrian Alonso
2011-01-17 20:29 ` [PATCH 12/25] u-boot-xilinx: ml507 uartlite support Adrian Alonso
2011-01-17 20:29 ` [PATCH 13/25] u-boot-xilinx: remove hardcoded include path Adrian Alonso
2011-01-17 20:29 ` [PATCH 14/25] linux-xilinx: update kernel version 2.6.37 rc4 Adrian Alonso
2011-01-17 20:29 ` [PATCH 15/25] linux-xilinx: remove hardcoded include path Adrian Alonso
2011-01-17 20:29 ` [PATCH 16/25] linux-xilinx: add license files checksum Adrian Alonso
2011-01-17 20:29 ` [PATCH 17/25] device-table: add tty uartlite static dev nodes Adrian Alonso
2011-01-17 20:29 ` [PATCH 18/25] u-boot-xilinx: add license files checksum Adrian Alonso
2011-01-17 20:29 ` [PATCH 19/25] tune-ppc405: append ppc440 in PACKAGE_EXTRA_ARCHS Adrian Alonso
2011-01-17 20:29 ` [PATCH 20/25] tune-ppc440: append ppc405 " Adrian Alonso
2011-01-17 20:29 ` [PATCH 21/25] virtex4: update default serial console Adrian Alonso
2011-01-17 20:29 ` [PATCH 22/25] virtex5: " Adrian Alonso
2011-01-17 20:29 ` [PATCH 23/25] defconfig: virtex4 config for linux 2.6.37.rc4 Adrian Alonso
2011-01-17 20:29 ` [PATCH 24/25] defconfig: virtex5 " Adrian Alonso
2011-01-17 20:29 ` [PATCH 25/25] openssl: powerpc gnueabi toolchain support Adrian Alonso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D3884A0.8030602@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=aalonso@secretlab.ca \
    --cc=poky@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox