The _vxworks-versions.h runtime file helps us control
the compilation of some library components depending on
the OS version extracted out of a system header.

The system header name is "version.h", and gcc has a
"version.h" file of its own.

gcc's version.h is now generated and the current
#include <version.h> from _vxworks-versions.h gets the gcc
instance instead of the OS one, resulting in build failures
from

  #if !defined(_WRS_VXWORKS_MAJOR)
  #error "_WRS_VXWORKS_MAJOR undefined"
  #endif


This change introduces a twist in the way
_vxworks-versions.h #includes version.h, using a relative
path with components that will match in the OS include
dirs only.

The actual relative path is conditioned on _VSB_CONFIG_FILE
to accommodate a change in the include dirs organisation between
VxWorks 6 and 7.

With this, our gcc-12 based builds now pass for both
powerpc-vx6 and a few cpu families with vxworks7, and a
a sanity check build with mainline also passes for
ppc64-vxworks7.

Will commit to mainline shortly,

Cheers,

Olivier

Attachment: 0001-Specialize-paths-to-version.h-in-_vxworks-versions.h.patch
Description: Binary data


Reply via email to