Subject: |
[Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME |
From: |
mdavidsaver via Core-talk <[email protected]> |
To: |
[email protected] |
Date: |
Wed, 28 Aug 2019 17:49:28 -0000 |
> a difference
This smells like UB. From the C/C++ prospective, both are strong
symbols. Of course there is a practical difference of .bss vs. .data
sections. It's news to me that any linker can be relied upon to
silently merge two strong symbols if one is in .bss . Seems like this
should be an error.
--
You received this bug notification because you are a member of EPICS
Core Developers, which is subscribed to EPICS Base.
Matching subscriptions: epics-core-list-subscription
https://bugs.launchpad.net/bugs/1841692
Title:
Non-VME RTEMS targets should define pdevLibVME
Status in EPICS Base:
In Progress
Status in EPICS Base 7.0 series:
In Progress
Bug description:
Support modules that build IOCs with drivers that call devLib routines
can't be compiled on non-VME RTEMS targets such as RTEMS-pc386 since
the linker fails to find the symbol pdevLibVME. The build *only* fails
for RTEMS targets though, other non-VME targets such as Windows or
darwin will quite happily compile and link the IOC code. This makes
the authors of support modules have to jump through hoops to ensure
they don't build IOCs for targets that will fail, or to just let the
build fail (many sites don't build for RTEMS anyway).
The RTEMS implementation of devLibVMEOSD.c uses pre-processor
conditionals to only define the devLibVME *pdevLibVME pointer inside
#if defined(__PPC__) || defined(__mcf528x__)
We could make life much easier for module authors by adding this:
diff --git a/modules/libcom/src/osi/os/RTEMS/devLibVMEOSD.c b/modules/libcom/src/osi/os/RTEMS/devLibVMEOSD.c
index 0a96bad..b8f79e7 100644
--- a/modules/libcom/src/osi/os/RTEMS/devLibVMEOSD.c
+++ b/modules/libcom/src/osi/os/RTEMS/devLibVMEOSD.c
@@ -350,7 +350,12 @@ static void unsolicitedHandlerEPICS(int vectorNumber)
);
}
-#endif /* defined(__PPC__) && defined(mpc750) */
+#else /* !defined(__PPC__) && !defined(__mcf528x__) */
+
+/* No known VME interface here, provide a dummy */
+devLibVME *pdevLibVME;
+
+#endif /* defined(__PPC__) || defined(__mcf528x__) */
/*
* Some vxWorks convenience routines
With that change (which is identical to the osi/os/default version),
the non-VME RTEMS targets will build exactly the same as the
workstation OS targets; an IOC that calls devLib will now compile,
although it obviously won't actually work if booted.
Any objections?
To manage notifications about this bug go to:
https://bugs.launchpad.net/epics-base/+bug/1841692/+subscriptions
- References:
- [Bug 1841692] [NEW] Non-VME RTEMS targets should define pdevLibVME Andrew Johnson via Core-talk
- Navigate by Date:
- Prev:
[Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME Andrew Johnson via Core-talk
- Next:
[Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME Andrew Johnson via Core-talk
- Index:
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:
[Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME Andrew Johnson via Core-talk
- Next:
[Bug 1841692] Re: Non-VME RTEMS targets should define pdevLibVME Andrew Johnson via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
<2019>
2020
2021
2022
2023
2024
|