VxWorks' regs.h does include some files that need types defined in vxTypesOld.h, and it does not itself include that header, directly or indirectly. Moreover, vxTypesOld.h ends up pulling in definitions of various cpufamily macros (from types/vxCpu.h) that are also needed directly by regs.h.
However, when compiling some assembly files that #include "regs.h", the typedefs in vxTypesOld.h break the build: /tmp/ccPxG4gA.s: Assembler messages: /tmp/ccPxG4gA.s:1: Error: unrecognized opcode: `typedef' /tmp/ccPxG4gA.s:2: Error: unrecognized opcode: `typedef' etc. The simplest fix is to guard the include of vxTypesOld.h by !defined(_ASMLANGUAGE). This should not affect C code, and existing assembly files that include regs.h must already have arranged for including types/vxCpu.h prior to including regs.h. ==changelog== fixincludes/ * inclhack.def (AAB_vxworks_regs_vxtypes): Guard include of types/vxTypesOld.h by #ifndef _ASMLANGUAGE. * fixincl.x: Regenerate. --- fixincludes/inclhack.def | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index c1f5a13eda4..bac0079b69f 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -426,7 +426,9 @@ fix = { replace = <<- _EndOfHeader_ #ifndef _REGS_H #define _REGS_H + #ifndef _ASMLANGUAGE #include <types/vxTypesOld.h> + #endif #include_next <arch/../regs.h> #endif _EndOfHeader_; -- 2.16.4