From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Magenheimer, Dan (HP Labs Fort Collins)" Subject: RE: (no subject) Date: Mon, 19 Sep 2005 13:52:36 -0700 Message-ID: <516F50407E01324991DD6D07B0531AD5695D7C@cacexc12.americas.cpqcorp.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Content-class: urn:content-classes:message List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Christian Limpach Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org > > > You have to export LINUX_ARCH to the script. We don't want to > > > unconditionally polute the environment of all the commands we > > > run, so you'll have to add it to all the calls to mkbuildtree. > >=20 > > I'm not sure I follow... I don't know exactly how make or bash > > work wrt to exporting... I didn't explicitly export LINUX_ARCH > > but it seems to be known by mkbuildtree and all the mk.linux's > > anyway. (I successfully built for x86 and ia64 with the > > patch.) > >=20 > > Or are you suggesting I *not* define it in buildconfigs/Rules.mk > > so as to avoid polluting the environment? >=20 > Rules.mk is fine. What I meant is that LINUX_ARCH won't get > passed to mkbuildtree unless you add it to its environment. > I confirmed this now by adding this to mkbuildtree: > echo ${LINUX_ARCH} >>/tmp/xxxxxxxx > LINUX_ARCH is empty and thus your hook script won't run. Maybe > you have LINUX_ARCH set in your shell environment where you ran > make? Odd... No, it's not in my shell environment. However, when I run make to build for ia64 I run it as: 'make LINUX_ARCH=3Dia64 ...' and I'm guessing make must export it to subshells. If I add the 'echo', I do get ia64 in /tmp/xxxxxx and the ia64 hook scripts do get run. But if I build (for xen/x86) with just 'make', nothing gets echoed to the file and, as you pointed out, no hook script gets run. But that's the default behavior we want, correct? I suppose it would be nice if on ia64 just 'make' did the right thing, e.g. set LINUX_ARCH=3Dia64 without the need to specify it on the command line. In that case, adding it to all the calls to mkbuildtree is necessary. How do I set LINUX_ARCH in Rules.mk so that it is set to 'xen' if x86 (or x86_64) and the architecture it is running on (e.g. ia64) otherwise? So I think the patch is OK as is... I've built successfully for both x86 and ia64... but I can still change it and resubmit if you prefer the other way. Thanks, Dan