Hi Olivier et al

I'm having quite a bit of trouble getting gcc 10 to build for our
vxworks 5 (5.5.1) target. The first thing I hit is

#if !defined(_WRS_VXWORKS_MAJOR)
#error "VxWorks version macros needed but not defined"
#endif

Our version.h doesn't define that macro (however, there's a
_WRS_VXWORKS_5_X defined in vxWorks.h). Amusingly, a few of the system
headers do mention _WRS_VXWORKS_MAJOR, e.g.

getOptLib.h:#include "vxWorks.h" /* for _WRS_VXWORKS_MAJOR, if defined. */

and everywhere in the headers that use that macro, they are careful to
do "#if defined (_WRS_VXWORKS_MAJOR) && (_WRS_VXWORKS_MAJOR >= 6)".

For now, I've just monkey-patched _vxworks-versions.h to get the build
past that - I suppose what I should do is to patch our version.h
system header instead to provide those two macros.

But most of the gthread stuff simply doesn't build against our
headers. These five patches, and a bogus definition of WIND_USR
environment variable (-mrtp doesn't make sense for us, but
vx_crtbegin-rtp.o still gets built and that fails if WIND_USR doesn't
exist) get the build a little further - I then fail to build
libstdc++, but I'd like some feedback on whether vxworks 5 is even
supposed to be (still) supported before digging further.


Rasmus Villemoes (5):
  libgcc: vxwors: stub out VX_ENTER_TLS_DTOR for vxworks 5
  gthr-vxworks.h: fix leftover _VXW_PRE_69
  gthr-vxworks.c: add include of taskLib.h
  libgcc: vxworks: don't set __GTHREAD_HAS_COND for vxworks 5.x
  libgcc: vxworks: don't set __GTHREAD_CXX0X for vxworks 5.x

 libgcc/config/gthr-vxworks-cond.c   |  4 ++++
 libgcc/config/gthr-vxworks-thread.c |  4 ++++
 libgcc/config/gthr-vxworks-tls.c    |  5 +++++
 libgcc/config/gthr-vxworks.c        |  1 +
 libgcc/config/gthr-vxworks.h        | 10 +++++++---
 5 files changed, 21 insertions(+), 3 deletions(-)

-- 
2.23.0

Reply via email to