> -----Original Message-----
> From: Dmytriyenko, Denys
> Sent: Thursday, June 19, 2014 11:18 AM
> To: Cooper Jr., Franklin
> Cc: [email protected]
> Subject: Re: [meta-arago] [PATCH v2] toolchain-*.inc: Replace variable
> overrides with bb.utils function
> 
> On Wed, Jun 18, 2014 at 10:01:51AM -0500, Franklin S. Cooper Jr wrote:
> > * Conf files are unable to use variable overrides instead bitbake utility
> >   functions are needed to mimic the functionality.
> > * Currently the DEFAULTTUNE variable isn't being set properly for non
> Cortex A8
> >   devices which causes uses when using an architecture override for non
> Cortex
> >   A8 devices.
> > * This issue was first discovered due to the inability to build valgrind for
> >   am43x and via testing determined that this affected any non Cortex A8
> machine/SOC_FAMILY
> >   within meta-ti.
> 
> Ok, so skipping the DEFAULTTUNE override issues for now, why would it affect
> valgrind and it's COMPATIBLE_HOST setting?
[Franklin] Well this is a long story :). I ended up having to put debug 
statements in bitbake (lib/bb/data_smart.py)
The list of valid overrides for this recipe didn't include armv7a. This was due 
to TUNE_FEATURES being set to TUNE_FEATURES_tune_${DEFAULTTUNE} which is 
defined in oe-core/meta/conf/bitbake.conf. Due to this bug this statement is 
now set to 'TUNE_FEATURES_tune_cortexa8thf-neon'. This variable is defined in 
tune-cortexa8.inc which is not used for non CortexA8 machines. Therefore, 
bitbake is unable to expand this variable since it has never been defined. The 
value from that variable is what bitbake uses to add the ARM architecture 
override so without the expanded value armv7a isn't part of the override list.

Valgrind sets the COMPATIBLE_HOST to:
COMPATIBLE_HOST = '(i.86|x86_64|powerpc|powerpc64).*-linux'
COMPATIBLE_HOST_armv7a = 'arm.*-linux'

So that architecture override is essential. Also changing 'arm.*-linux' -> to 
''arm.*-linux*' doesn't make a difference.
> 
> 
> > Signed-off-by: Franklin S. Cooper Jr <[email protected]>
> > ---
> > Version 2 changes:
> > Remove all the extra spaces
> >
> >  .../conf/distro/include/toolchain-gcc.inc          |    7 ++++---
> >  .../conf/distro/include/toolchain-linaro.inc       |    9 +++++----
> >  2 files changed, 9 insertions(+), 7 deletions(-)
> >
> > diff --git a/meta-arago-distro/conf/distro/include/toolchain-gcc.inc b/meta-
> arago-distro/conf/distro/include/toolchain-gcc.inc
> > index f7c8032..8388d13 100644
> > --- a/meta-arago-distro/conf/distro/include/toolchain-gcc.inc
> > +++ b/meta-arago-distro/conf/distro/include/toolchain-gcc.inc
> > @@ -3,9 +3,10 @@ TCMODE = "default"
> >  TCLIBC = "eglibc"
> >
> >  DEFAULTTUNE = "cortexa8thf-neon"
> > -DEFAULTTUNE_omap-a15 = "cortexa15thf-neon"
> > -DEFAULTTUNE_keystone = "cortexa15thf-neon"
> > -DEFAULTTUNE_omap4 = "cortexa9thf-neon"
> > +DEFAULTTUNE := "${@bb.utils.contains('SOC_FAMILY','ti43x','cortexa9thf-
> neon','${DEFAULTTUNE}',d)}"
> > +DEFAULTTUNE := "${@bb.utils.contains('SOC_FAMILY','omap-
> a15','cortexa15thf-neon','${DEFAULTTUNE}',d)}"
> > +DEFAULTTUNE :=
> "${@bb.utils.contains('SOC_FAMILY','keystone','cortexa15thf-
> neon','${DEFAULTTUNE}',d)}"
> > +DEFAULTTUNE := "${@bb.utils.contains('SOC_FAMILY','omap4','cortexa9thf-
> neon','${DEFAULTTUNE}',d)}"
> >
> >  # Match some of the external vars
> >  TOOLCHAIN_SYS := "${TARGET_SYS}"
> > diff --git a/meta-arago-distro/conf/distro/include/toolchain-linaro.inc
> b/meta-arago-distro/conf/distro/include/toolchain-linaro.inc
> > index 95269a7..0418359 100644
> > --- a/meta-arago-distro/conf/distro/include/toolchain-linaro.inc
> > +++ b/meta-arago-distro/conf/distro/include/toolchain-linaro.inc
> > @@ -3,11 +3,12 @@ TCMODE = "external-linaro"
> >  TCLIBC = "external-linaro-toolchain"
> >
> >  ELT_TARGET_SYS = "arm-linux-gnueabihf"
> > +
> >  DEFAULTTUNE = "cortexa8thf-neon"
> > -DEFAULTTUNE_omap-a15 = "cortexa15thf-neon"
> > -DEFAULTTUNE_keystone = "cortexa15thf-neon"
> > -DEFAULTTUNE_omap4 = "cortexa9thf-neon"
> > -DEFAULTTUNE_ti43x = "cortexa9thf-neon"
> > +DEFAULTTUNE := "${@bb.utils.contains('SOC_FAMILY','ti43x','cortexa9thf-
> neon','${DEFAULTTUNE}',d)}"
> > +DEFAULTTUNE := "${@bb.utils.contains('SOC_FAMILY','omap-
> a15','cortexa15thf-neon','${DEFAULTTUNE}',d)}"
> > +DEFAULTTUNE :=
> "${@bb.utils.contains('SOC_FAMILY','keystone','cortexa15thf-
> neon','${DEFAULTTUNE}',d)}"
> > +DEFAULTTUNE := "${@bb.utils.contains('SOC_FAMILY','omap4','cortexa9thf-
> neon','${DEFAULTTUNE}',d)}"
> >
> >  PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-intermediate =
> "external-linaro-toolchain"
> >
> > --
> > 1.7.0.4
> >
> > _______________________________________________
> > meta-arago mailing list
> > [email protected]
> > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

Reply via email to