VxWorks has it's own regs.h that conflicts with GCC's regs.h, so just make any replace any references to regs.h in VxWorks with references to arch/../regs.h, which includes the VxWorks header, not GCC's header.
Changes: * fixincludes/inclhack.def: Added vxworks_regs fix --- fixincludes/inclhack.def | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
>From 2aa0effcb0e5b617e099a8390ce97677ba27a49a Mon Sep 17 00:00:00 2001 From: rbmj <r...@verizon.net> Date: Mon, 4 Jun 2012 14:07:32 -0400 Subject: [PATCH 5/7] Add fix to prevent accidental inclusion of regs.h on VxWorks. VxWorks has it's own regs.h that conflicts with GCC's regs.h, so just make any replace any references to regs.h in VxWorks with references to arch/../regs.h, which includes the VxWorks header, not GCC's header. Changes: * fixincludes/inclhack.def: Added vxworks_regs fix --- fixincludes/inclhack.def | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 54a8b8d..a258f10 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -4473,6 +4473,20 @@ fix = { "# define\t__INCstath <sys/stat.h>"; }; +/* + * Make it so VxWorks does not include gcc/regs.h accidentally + */ +fix = { + hackname = vxworks_regs; + mach = "*-*-vxworks*"; + + select = "#[\t ]*include[\t ]+<regs.h>"; + c_fix = format; + c_fix_arg = "#include <arch/../regs.h>"; + + test_text = "#include <regs.h>\n"; +}; + /* * Another bad dependency in VxWorks 5.2 <time.h>. -- 1.7.5.4