2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 <2020> 2021 2022 2023 2024 | Index | 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: makefile include order |
From: | "Johnson, Andrew N. via Core-talk" <core-talk at aps.anl.gov> |
To: | Ben Franksen <benjamin.franksen at helmholtz-berlin.de> |
Cc: | EPICS core-talk <core-talk at aps.anl.gov> |
Date: | Fri, 19 Jun 2020 22:38:27 +0000 |
Hi Ben,
On Jun 19, 2020, at 3:05 AM, Ben Franksen via Core-talk <core-talk at aps.anl.gov> wrote:
This is the relevant part of configure/CONFIG, with some unrelated lines removed:
Where does the CONFIG_SITE.Common.linuxCommon file appear in the above include order? It comes from CONFIG.Common.linuxCommon, and that gets included from CONFIG.Common.linux-x86_64 so it’s from the CONFIG.Common.$(T_A) line.
The CONFIG.gnuCommon file was designed to be pulled in early, which you can tell because it sets lots of variables using = instead of +=. The configure/CONFIG.CrossCommon file actually includes it, so that happens before any TA-specific line above (but
only when doing is a cross-build, which this case isn’t so the CONFIG.CrossCommon file is irrelevant here).
There are actually quite a few CONFIG files under configure/ which include the CONFIG.gnuCommon file, here’s the full list:
Most of those are CONFIG.$(EPICS_HOST_ARCH).$(T_A) files, so they will be included after the CONFIG.Common.$(T_A) file and thus settings in the CONFIG.gnuCommon file will override any from the CONFIG_SITE.Common.linuxCommon file.
The reasons for the above are (of course) historical. Back in the days before VxWorks 5 Wind River used the native SunOS Sun-3 C compiler to build code for m68k targets, since the Sun-3 machines were also based on m68k. When Sun’s Sparc CPUs arrived and
they also wanted to add other CPU families they they had to find an alternative compiler, and they adopted GCC (I just found the sources for gcc-1.37.1 in our old VxWorks 5.0.1 tree). Thus the EPICS build system started out using GCC for cross-builds only.
I could reorganize the include order, but (to Michael’s immense frustration I’m sure) I am reluctant to break the out-of-tree target architectures that I know many sites use, and switching things around would be highly likely to do that.
- Andrew
--
Complexity comes for free, simplicity you have to work for.
|