aboutsummaryrefslogtreecommitdiff
path: root/fixincludes/inclhack.def
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@adacore.com>2021-12-16 13:50:25 +0000
committerOlivier Hainque <hainque@adacore.com>2022-01-06 12:04:13 +0000
commit75b8a726171bcb2e06d70e6179e9926a7ffd73cc (patch)
tree6f8b787fb36d2736c271aa26729c5f23392af798 /fixincludes/inclhack.def
parent80ad67e2af0620d58d57d0406dc22693cf5b8ca9 (diff)
downloadgcc-75b8a726171bcb2e06d70e6179e9926a7ffd73cc.zip
gcc-75b8a726171bcb2e06d70e6179e9926a7ffd73cc.tar.gz
gcc-75b8a726171bcb2e06d70e6179e9926a7ffd73cc.tar.bz2
Add VxWworks fixincludes hack, don't expect yvals.h from gcc
yvals.h on VxWorks expects the toolchain to provide its own version of the header, which we don't do. Arrange to fallback on the common system definitions instead. 2021-12-16 Olivier Hainque <hainque@adacore.com> fixincludes/ * inclhack.def (vxworks_next_yvals): New hack. * tests/base/yvals.h: New expected test result. * fixincl.x: Regenerate.
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r--fixincludes/inclhack.def22
1 files changed, 22 insertions, 0 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 8f056ad..4643678 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -5211,6 +5211,28 @@ fix = {
};
/*
+ * yvals.h on VxWorks-6 expects the toolchain to provide its own
+ * version of the header, which we don't do. Arrange to fallback
+ * on the system definition.
+ */
+fix = {
+ hackname = vxworks_next_yvals;
+ mach = "*-*-vxworks*";
+ files = yvals.h;
+ select = "#include_next <yvals.h>";
+ c_fix = format;
+ c_fix_arg = "#if 0 /* GCC does not provide yvals.h. */\n%1";
+ c_fix_arg = "#if .*\n"
+ "/\\* .*\n"
+ "(#include_next <yvals.h>\n)";
+
+ test_text = "#if (defined(__cplusplus) && defined(__GNUC__))\n"
+ "/* GCC C++ has it's own yvals.h */\n"
+ "#include_next <yvals.h>\n"
+ "#else\n";
+};
+
+/*
* Make it so VxWorks does not include gcc/regs.h accidentally
*/
fix = {