From: Darren Hart <dvhart@linux.intel.com>
To: Adrian Alonso <aalonso@secretlab.ca>
Cc: poky@pokylinux.org, Ilya Yanok <yanok@emcraft.com>
Subject: Re: [PATCH 3/3] u-boot: compile with -O2 on PowerPC
Date: Wed, 09 Feb 2011 10:40:00 -0800 [thread overview]
Message-ID: <4D52DF80.4070702@linux.intel.com> (raw)
In-Reply-To: <AANLkTik6R6EwY2_565cn8uTxeCe910MbUg3eJdsOtTJ1@mail.gmail.com>
On 02/09/2011 10:05 AM, Adrian Alonso wrote:
> I observe that with current gcc for powerpc uboot only builds with
> OPTFLAGS=-O2, unsetting or using other OPT level the build fails
> with undefined symbols.
>
> I override the OPTFLAGS in the dedicated recipe for uboot under
> meta-xilinx BSP
> but for powerpc targets in main meta layer Ilya approach does the work.
I see - shouldn't be reviewing patches with a head cold. I wonder if the
-O2 would work with ARM as well. If so, we could just set OPTFLAGS to
-O2 instead of '' for all architectures. I'd much prefer that if
possible, I'll test on ARM.
--
Darren
>
> On Wed, Feb 9, 2011 at 11:42 AM, Darren Hart <dvhart@linux.intel.com
> <mailto:dvhart@linux.intel.com>> wrote:
>
> On 02/08/2011 12:26 PM, Ilya Yanok wrote:
>
> gcc on PowerPC is currently compiled with -Os optimization
> disabled so
> we have to use -O2 on PowerPC instead.
>
> Signed-off-by: Ilya Yanok<yanok@emcraft.com
> <mailto:yanok@emcraft.com>>
> ---
> meta/recipes-bsp/uboot/u-boot.inc | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-bsp/uboot/u-boot.inc
> b/meta/recipes-bsp/uboot/u-boot.inc
> index 6492016..7694c77 100644
> --- a/meta/recipes-bsp/uboot/u-boot.inc
> +++ b/meta/recipes-bsp/uboot/u-boot.inc
> @@ -22,7 +22,12 @@ do_compile () {
> unset CFLAGS
> unset CPPFLAGS
> oe_runmake ${UBOOT_MACHINE}
> - oe_runmake all
> + # -Os is disabled on PowerPC
> + if [ ${TARGET_ARCH} == "powerpc" ] ; then
> + oe_runmake OPTFLAGS=-O2 all
> + else
> + oe_runmake all
> + fi
>
>
>
> 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=''"
>
> 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.
>
> --
> Darren Hart
> Intel Open Source Technology Center
> Yocto Project - Linux Kernel
>
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org <mailto:poky@yoctoproject.org>
> https://lists.yoctoproject.org/listinfo/poky
>
>
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
next prev parent reply other threads:[~2011-02-09 18:40 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-08 20:26 [PATCH 1/3] linux: add LIC_FILES_CHKSUM Ilya Yanok
2011-02-08 20:26 ` [PATCH 2/3] u-boot: " Ilya Yanok
2011-02-09 17:38 ` Darren Hart
2011-02-09 17:42 ` Gary Thomas
2011-02-09 23:02 ` Ilya Yanok
2011-02-09 22:58 ` Ilya Yanok
2011-02-09 23:04 ` Darren Hart
2011-02-09 23:25 ` Ilya Yanok
2011-02-09 23:38 ` Darren Hart
2011-02-09 23:43 ` Ilya Yanok
2011-02-10 0:06 ` Darren Hart
2011-02-10 0:42 ` Richard Purdie
2011-02-08 20:26 ` [PATCH 3/3] u-boot: compile with -O2 on PowerPC Ilya Yanok
2011-02-09 17:42 ` Darren Hart
2011-02-09 18:05 ` Adrian Alonso
2011-02-09 18:40 ` Darren Hart [this message]
2011-02-09 18:15 ` Koen Kooi
2011-02-09 18:27 ` Wolfgang Denk
2011-02-09 23:21 ` Ilya Yanok
2011-02-09 23:34 ` Darren Hart
2011-02-09 23:48 ` Ilya Yanok
2011-02-09 11:26 ` [PATCH 1/3] linux: add LIC_FILES_CHKSUM Richard Purdie
2011-02-09 17:33 ` Darren Hart
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=4D52DF80.4070702@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=aalonso@secretlab.ca \
--cc=poky@pokylinux.org \
--cc=yanok@emcraft.com \
/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