Allow self configured definition of _WRS_VXWORKS_MAJOR
authorOlivier Hainque <hainque@adacore.com>
Tue, 13 Oct 2020 09:53:30 +0000 (09:53 +0000)
committerOlivier Hainque <hainque@adacore.com>
Fri, 16 Oct 2020 15:33:35 +0000 (15:33 +0000)
commit57dd4e7bb754db3f2ccdffd031d8f252d0a6d3bb
treea99c40d59417bee04a1a1adb87d4f3e0cf641a90
parent90042c43a92c452a5f9f3afbfcdad511ea09a54f
Allow self configured definition of _WRS_VXWORKS_MAJOR

This conditions the use of system headers to fetch a
_WRS_VXWORKS_MAJOR macro on the non definition of that
macro. This allows builds where a specific value is
predefined, e.g. with a self spec, useful in environments
where the system headers don't actually define that macro
(e.g. vxworks 5 or 653).

In addition, _WRS_VXWORKS_MINOR is only provided by the
system headers when really meaningful, e.g. from 6.4 to 6.9.

We just pick a conservative default to 0 for all the cases
where it is not exposed by the system headers or otherwise.

2020-10-15  Olivier Hainque  <hainque@adacore.com>

gcc/
* config/vxworks/_vxworks-versions.h: Only include
version.h if _WRS_VXWORKS_MAJOR is not defined.
Provide a default _WRS_VXWORKS_MINOR (0).
gcc/config/vxworks/_vxworks-versions.h