EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Base R3.14.11-pre1 available for testing
From: Andrew Johnson <[email protected]>
To: [email protected]
Cc: "Abbott, MG \(Michael\)" <[email protected]>
Date: Fri, 31 Jul 2009 13:09:48 -0500
Hi Michael,

On Thursday 30 July 2009 06:02:50 Abbott, MG (Michael) wrote:
>
> This patch is rather important.  The line removed by this patch has a
> very strange effect: it adds makefile rules of the form
>
> 	$(action).$(arch): $(action).$(EPICS_HOST_ARCH)
>
> specifically, it adds the rule
>
> 	install.linux-arm: install.linux-x86
>
> to my build. 

This rule was added because when using the -j option to enable parallel builds 
we have to make sure that any host programs have finished compiling before we 
can start compiling objects for the targets, since we might have to run those 
host programs when building the target code.  Unfortunately in the current 
versions of GNUmake it is not possible to detect that the -j option has been 
supplied (unlike most other make options which *can* be detected).  If we 
could detect the -j option we would be able to make that rule conditional, 
but we can't.  Even if we could though, your application wouldn't be able to 
take advantage of the make -j option, so this isn't really be a proper 
solution anyway.

> The effect of this rule is that in order to build my 
> linux-arm IOC, I have to first build a linux-x86 version of the IOC, and
> more generally, all cross-compiled IOCs depend on having a native IOC
> build succeed first.  This isn't going to work.

Each EPICS architecture declares whether it can build Host or Ioc targets or 
both by setting VALID_BUILDS in its base/configure/CONFIG.Common.<arch> file.  
Host targets are those named in the Makefile variables PROD_HOST and similar, 
while Ioc targets are those named in in PROD_IOC etc.

You can limit what gets built for specific OS classes by using PROD_IOC_Linux, 
but that doesn't help you since both your host and target are in that same OS 
class.

If your application can't be built on linux-x86 then one solution would be to 
create a new linux-x86-host architecture which defines VALID_BUILDS=Host 
only, and use that for hosting cross-builds for your linux-arm applications.

However if it's only a few applications it will be much simpler to override 
VALID_BUILDS in those applications; in each one you would create a new file 
configure/CONFIG_SITE.Common.linux-x86 that sets VALID_BUILDS=Host and hence 
stops the build system from trying to build any Ioc code on linux-x86 inside 
that application.

You will of course need to make sure that your Makefiles properly set the 
PROD_IOC and LIBRARY_IOC variables rather than PROD and LIBRARY.  You can 
still build linux-x86 code if needed by using PROD or PROD_HOST instead.

This change will also mean that you no longer have specify 'make linux-arm' 
every time (which I guess is what you've been doing), you can just 
run 'make'.

> Patching CONFIG.Common.linux-arm.  This patch is arguable, but I'm not
> sure that such target specific architecture flags belong in EPICS base.
> The line removed by this patch crept into 3.14.10, and breaks the Libera
> build.

This change was contributed by Heinrich du Toit who is no longer working with 
EPICS anyway.  I have reverted it.


Thanks for testing this.

- Andrew
-- 
The best FOSS code is written to be read by other humans -- Harold Welte

Replies:
RE: Base R3.14.11-pre1 available for testing Abbott, MG (Michael)
References:
RE: Base R3.14.11-pre1 available for testing Abbott, MG (Michael)

Navigate by Date:
Prev: RE: Base R3.14.11-pre1 available for testing Abbott, MG (Michael)
Next: RE: Base R3.14.11-pre1 available for testing Abbott, MG (Michael)
Index: 2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Base R3.14.11-pre1 available for testing Abbott, MG (Michael)
Next: RE: Base R3.14.11-pre1 available for testing Abbott, MG (Michael)
Index: 2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·