All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: "Lu, Lianhao" <lianhao.lu@intel.com>
Cc: "poky@yoctoproject.org" <poky@yoctoproject.org>
Subject: Re: [PATCH 1/1] meta-environment: Added package of meta-environment-${TARGET_ARCH} for environment files.
Date: Mon, 20 Dec 2010 17:29:15 +0000	[thread overview]
Message-ID: <1292866155.25087.4819.camel@rex> (raw)
In-Reply-To: <C10D3FB0CD45994C8A51FEC1227CE22F1D26A61B52@shsmsx502.ccr.corp.intel.com>

On Fri, 2010-12-17 at 10:30 +0800, Lu, Lianhao wrote:
> Hi Richard,
> 
> Richard Purdie wrote on 2010-12-16:
> > Hi Lianhao,
> > 
> > On Thu, 2010-12-16 at 09:40 +0800, Lianhao Lu wrote:
> >> [BUGID #565] Fixing bug #565, added package of
> >> meta-environment-${TARGET_ARCH} for environment files used by
> >> cross-canadian toolchain.
> >> 
> >> Also corrected the situation of empty config site file for target.
> >> 
> >> Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
> >> ---
> >>  meta/classes/toolchain-scripts.bbclass         |   32 ++++++++++
> >>  meta/recipes-core/meta/meta-environment.bb     |   75
> >>  ++++++++++++++++++++++++
> >>  meta/recipes-core/tasks/task-cross-canadian.bb |    1 + 3 files
> >>  changed, 108 insertions(+), 0 deletions(-)  create mode
> >> 100644 meta/recipes-core/meta/meta-environment.bb
> > 
> > This recipe looks complex and seems to include a lot of cross-canadian.bbclass.
> > 
> > Would it be possible to inherit that class instead and try and keep
> > the recipe simpler? You can always drop the "meta" inherit. I'm
> > worried about the amount of code duplication here.
> > 
> 
> The reason I didn't inherit the cross-canadian.bbclass in
> meta-environment.bb is that by doing this, there would be a problem in
> the siteinfo.bbclass which is used to generate the autoconf site
> config file for the target. It uses the variables of HOST_ARCH and
> HOST_OS which is replaced by SDK_ARCH and SDK_OS respectively in
> cross-canadian.bbclass. If we inherit the cross-canadian, we need to
> duplicate the code in siteinfo.bbclass to use TARGET_ARCH(OS) instead
> of the HOST_ARCH(OS). So we duplicate either for siteinfo.bbclass or
> for cross-canadian.bbclass. Any comment?

I see your problem. Normally I'd not suggest something like this but
there is a way we can solve the problem. You can put this at the top of
the file before HOST_ARCH and HOST_OS are changed:

TARGET_SITE_CONFIG := "${CONFIG_SITE}"

Then the data you need should be preserved in TARGET_SITE_CONFIG.

Cheers,

Richard



      reply	other threads:[~2010-12-20 17:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-16  1:47 [PATCH 0/1] [BUGID #565] fixing. Added package of meta-environment-${TARGET_ARCH} Lianhao Lu
2010-12-16  1:40 ` [PATCH 1/1] meta-environment: Added package of meta-environment-${TARGET_ARCH} for environment files Lianhao Lu
2010-12-16 15:49   ` Richard Purdie
2010-12-17  2:30     ` Lu, Lianhao
2010-12-20 17:29       ` Richard Purdie [this message]

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=1292866155.25087.4819.camel@rex \
    --to=richard.purdie@linuxfoundation.org \
    --cc=lianhao.lu@intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.