summaryrefslogtreecommitdiffstats
path: root/fixincludes
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
parentifcvt: Check for asm goto at the end of then_bb/else_bb in ifcvt [PR103908] (diff)
downloadgcc-75b8a726171bcb2e06d70e6179e9926a7ffd73cc.tar.gz
gcc-75b8a726171bcb2e06d70e6179e9926a7ffd73cc.tar.bz2
gcc-75b8a726171bcb2e06d70e6179e9926a7ffd73cc.tar.xz
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')
-rw-r--r--fixincludes/fixincl.x58
-rw-r--r--fixincludes/inclhack.def22
-rw-r--r--fixincludes/tests/base/yvals.h17
3 files changed, 92 insertions, 5 deletions
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index 16b15c045d0..87175fe0205 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -2,11 +2,11 @@
2 * 2 *
3 * DO NOT EDIT THIS FILE (fixincl.x) 3 * DO NOT EDIT THIS FILE (fixincl.x)
4 * 4 *
5 * It has been AutoGen-ed January 4, 2022 at 10:24:34 AM by AutoGen 5.18.16 5 * It has been AutoGen-ed January 6, 2022 at 11:59:22 AM by AutoGen 5.18.16
6 * From the definitions inclhack.def 6 * From the definitions inclhack.def
7 * and the template file fixincl 7 * and the template file fixincl
8 */ 8 */
9/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Jan 4 10:24:34 UTC 2022 9/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Jan 6 11:59:22 UTC 2022
10 * 10 *
11 * You must regenerate it. Use the ./genfixes script. 11 * You must regenerate it. Use the ./genfixes script.
12 * 12 *
@@ -15,7 +15,7 @@
15 * certain ANSI-incompatible system header files which are fixed to work 15 * certain ANSI-incompatible system header files which are fixed to work
16 * correctly with ANSI C and placed in a directory that GNU C will search. 16 * correctly with ANSI C and placed in a directory that GNU C will search.
17 * 17 *
18 * This file contains 262 fixup descriptions. 18 * This file contains 263 fixup descriptions.
19 * 19 *
20 * See README for more information. 20 * See README for more information.
21 * 21 *
@@ -10327,6 +10327,48 @@ static const char* apzVxworks_Needs_VxworksPatch[] = { sed_cmd_z,
10327 10327
10328/* * * * * * * * * * * * * * * * * * * * * * * * * * 10328/* * * * * * * * * * * * * * * * * * * * * * * * * *
10329 * 10329 *
10330 * Description of Vxworks_Next_Yvals fix
10331 */
10332tSCC zVxworks_Next_YvalsName[] =
10333 "vxworks_next_yvals";
10334
10335/*
10336 * File name selection pattern
10337 */
10338tSCC zVxworks_Next_YvalsList[] =
10339 "yvals.h\0";
10340/*
10341 * Machine/OS name selection pattern
10342 */
10343tSCC* apzVxworks_Next_YvalsMachs[] = {
10344 "*-*-vxworks*",
10345 (const char*)NULL };
10346
10347/*
10348 * content selection pattern - do fix if pattern found
10349 */
10350tSCC zVxworks_Next_YvalsSelect0[] =
10351 "#include_next <yvals.h>";
10352
10353#define VXWORKS_NEXT_YVALS_TEST_CT 1
10354static tTestDesc aVxworks_Next_YvalsTests[] = {
10355 { TT_EGREP, zVxworks_Next_YvalsSelect0, (regex_t*)NULL }, };
10356
10357/*
10358 * Fix Command Arguments for Vxworks_Next_Yvals
10359 */
10360static const char* apzVxworks_Next_YvalsPatch[] = {
10361 "format",
10362 "#if 0 /* GCC does not provide yvals.h. */\n\
10363%1",
10364 "#if .*\n\
10365/\\* .*\n\
10366(#include_next <yvals.h>\n\
10367)",
10368 (char*)NULL };
10369
10370/* * * * * * * * * * * * * * * * * * * * * * * * * *
10371 *
10330 * Description of Vxworks_Regs fix 10372 * Description of Vxworks_Regs fix
10331 */ 10373 */
10332tSCC zVxworks_RegsName[] = 10374tSCC zVxworks_RegsName[] =
@@ -10648,9 +10690,9 @@ static const char* apzX11_SprintfPatch[] = {
10648 * 10690 *
10649 * List of all fixes 10691 * List of all fixes
10650 */ 10692 */
10651#define REGEX_COUNT 300 10693#define REGEX_COUNT 301
10652#define MACH_LIST_SIZE_LIMIT 187 10694#define MACH_LIST_SIZE_LIMIT 187
10653#define FIX_COUNT 262 10695#define FIX_COUNT 263
10654 10696
10655/* 10697/*
10656 * Enumerate the fixes 10698 * Enumerate the fixes
@@ -10910,6 +10952,7 @@ typedef enum {
10910 VXWORKS_POSIX_MKDIR_FIXIDX, 10952 VXWORKS_POSIX_MKDIR_FIXIDX,
10911 VXWORKS_NEEDS_VXTYPES_FIXIDX, 10953 VXWORKS_NEEDS_VXTYPES_FIXIDX,
10912 VXWORKS_NEEDS_VXWORKS_FIXIDX, 10954 VXWORKS_NEEDS_VXWORKS_FIXIDX,
10955 VXWORKS_NEXT_YVALS_FIXIDX,
10913 VXWORKS_REGS_FIXIDX, 10956 VXWORKS_REGS_FIXIDX,
10914 VXWORKS_TIME_FIXIDX, 10957 VXWORKS_TIME_FIXIDX,
10915 VXWORKS_WRITE_CONST_FIXIDX, 10958 VXWORKS_WRITE_CONST_FIXIDX,
@@ -12191,6 +12234,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
12191 VXWORKS_NEEDS_VXWORKS_TEST_CT, FD_MACH_ONLY, 12234 VXWORKS_NEEDS_VXWORKS_TEST_CT, FD_MACH_ONLY,
12192 aVxworks_Needs_VxworksTests, apzVxworks_Needs_VxworksPatch, 0 }, 12235 aVxworks_Needs_VxworksTests, apzVxworks_Needs_VxworksPatch, 0 },
12193 12236
12237 { zVxworks_Next_YvalsName, zVxworks_Next_YvalsList,
12238 apzVxworks_Next_YvalsMachs,
12239 VXWORKS_NEXT_YVALS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
12240 aVxworks_Next_YvalsTests, apzVxworks_Next_YvalsPatch, 0 },
12241
12194 { zVxworks_RegsName, zVxworks_RegsList, 12242 { zVxworks_RegsName, zVxworks_RegsList,
12195 apzVxworks_RegsMachs, 12243 apzVxworks_RegsMachs,
12196 VXWORKS_REGS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, 12244 VXWORKS_REGS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 8f056adef68..4643678026d 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -5211,6 +5211,28 @@ fix = {
5211}; 5211};
5212 5212
5213/* 5213/*
5214 * yvals.h on VxWorks-6 expects the toolchain to provide its own
5215 * version of the header, which we don't do. Arrange to fallback
5216 * on the system definition.
5217 */
5218fix = {
5219 hackname = vxworks_next_yvals;
5220 mach = "*-*-vxworks*";
5221 files = yvals.h;
5222 select = "#include_next <yvals.h>";
5223 c_fix = format;
5224 c_fix_arg = "#if 0 /* GCC does not provide yvals.h. */\n%1";
5225 c_fix_arg = "#if .*\n"
5226 "/\\* .*\n"
5227 "(#include_next <yvals.h>\n)";
5228
5229 test_text = "#if (defined(__cplusplus) && defined(__GNUC__))\n"
5230 "/* GCC C++ has it's own yvals.h */\n"
5231 "#include_next <yvals.h>\n"
5232 "#else\n";
5233};
5234
5235/*
5214 * Make it so VxWorks does not include gcc/regs.h accidentally 5236 * Make it so VxWorks does not include gcc/regs.h accidentally
5215 */ 5237 */
5216fix = { 5238fix = {
diff --git a/fixincludes/tests/base/yvals.h b/fixincludes/tests/base/yvals.h
new file mode 100644
index 00000000000..ea384d9cf9e
--- /dev/null
+++ b/fixincludes/tests/base/yvals.h
@@ -0,0 +1,17 @@
1/* DO NOT EDIT THIS FILE.
2
3 It has been auto-edited by fixincludes from:
4
5 "fixinc/tests/inc/yvals.h"
6
7 This had to be done to correct non-standard usages in the
8 original, manufacturer supplied header file. */
9
10
11
12#if defined( VXWORKS_NEXT_YVALS_CHECK )
13#if 0 /* GCC does not provide yvals.h. */
14#include_next <yvals.h>
15#else
16
17#endif /* VXWORKS_NEXT_YVALS_CHECK */