EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Building for more than one host architecture
From: [email protected] (Nick Rees)
To: [email protected]
Date: Wed, 7 Jun 1995 09:59:35 +0200
Tony Carter sent me a response which he accidently didn't send to the
exploder. It is appended (at his request) with my comments...

> From [email protected] Tue Jun  6 21:59 MET 1995
> Date: Tue, 6 Jun 1995 16:00:29 -0400 (EDT)
> From: "Tony Carter, MIT Bates Linac" <[email protected]>
> To: [email protected]
> Subject: Re: Building for more than one host architecture
> 
> Nick Rees writes:
> >
> >    (present workaround deleted)
> >
> >I think the ideal is to have a script in base/tools called HostArch
> >which returns the correct value of HOST_ARCH for the architecture you
> >are running on. Then, in CONFIG_SITE you define
> >
> >HOST_ARCH = $(shell HostArch)
> >
> >and it always works. The following should work (but has not been
> >checked on all architectures) for the current list of supported
> >hosts, but it would have to be adapted for new architectures:
> >  .
> >  .
> >  .
> 
> I like this, it is a clean approach.  However, it leaves some smaller issues
> unresolved.  In my case (and in yours) other variables should be different
> for each architecture.  For instance the line:
> 
> 	BUILD_ARCHS=$(HOST_ARCH) mv167
> 
> would be OK for the SPARC but would bomb on the Alpha since I don't have
> VxWorks on it.  This is a minor problem since it will only start to fail
> after the host arch is built.  But there may be more problematic cases.
> 
> If I take William Lupton's suggestion of having HOST_ARCH point to some
> local file that is specific to the architecture I'm building for and 
> generalize it a little more, I can have CONFIG_SITE be a soft link to
> a local file that is appropriate to the build I need to do.  This is not
> a general solution but it may work for now.
> 
> I am not that familiar with the options you have with gnumake.  Is it
> possible to use conditional statements to break CONFIG_SITE into pieces
> based on the value of HOST_ARCH?  We could then set the variables to the
> values appropriate to each host arch, or some similar approach.
> 
> Tony
>
 
I thought the answer to your point was to move any host dependent
definitions from CONFIG_SITE to CONFIG_SITE.Unix.<arch> (i.e the host
dependent file already exists, and I wouldn't like creating a new
one. It is also global so can be under the same CVS control).

So, in your case, in CONFIG_SITE you would put:

HOST_ARCH = $(shell HostArch)

and possibly (but not necessarily - it could be omitted) a default of

BUILD_ARCH = $(HOST_ARCH)

However, in CONFIG_SITE.Unix.sun4 (or whatever), you would put:

BUILD_ARCH = $(HOST_ARCH) mv167...

or, more perversely, (i.e. I am not sure whether it will work), if you
only wanted to build the IOC tools on this host architecture.

BUILD_ARCH = mv167.

This would override any definition in CONFIG_SITE, because
CONFIG_SITE.Unix.<arch> is processed after CONFIG_SITE but before
RULES_ARCHS, which is the only place it is used.

As to the HostArch script, can Janet (if you read this) take this as a
formal request to have this suggestion incorporated into the next
release. At least two people have voted for it...

Nick



Navigate by Date:
Prev: Re: AO record DOL field fails with a CA link Marty Kraimer
Next: Re: Building for more than one host architecture Tony Carter, MIT Bates Linac
Index: 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Building for more than one host architecture Nick Rees
Next: Re: Building for more than one host architecture Tony Carter, MIT Bates Linac
Index: 1994  <19951996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Aug 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·