diff options
author | Olivier Hainque <hainque@adacore.com> | 2022-01-10 11:26:30 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@adacore.com> | 2022-01-16 09:22:14 +0000 |
commit | 00cc412660fe4d64c0b04da9ae20b1ad6ef92bb0 (patch) | |
tree | 12882274e7c20f56e9aff45813435aec192fc567 /fixincludes/fixincl.x | |
parent | 1c2575586c47f56a2e75f734af42371579516f0c (diff) | |
download | gcc-00cc412660fe4d64c0b04da9ae20b1ad6ef92bb0.zip gcc-00cc412660fe4d64c0b04da9ae20b1ad6ef92bb0.tar.gz gcc-00cc412660fe4d64c0b04da9ae20b1ad6ef92bb0.tar.bz2 |
Add VxWorks fixincludes hack, C99 FP classification
Arrange to provide missing defs for C99 FP classification functions
and constants queried by libstdc++ configure checks (C99 support for C++98)
2021-01-10 Olivier Hainque <hainque@adacore.com>
* inclhack.def (vxworks_math_h_fp_c99): New hack.
* tests/base/math.h: Update.
* fixincl.x: Regenerate.
Diffstat (limited to 'fixincludes/fixincl.x')
-rw-r--r-- | fixincludes/fixincl.x | 82 |
1 files changed, 77 insertions, 5 deletions
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 87175fe..a83fa2f 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed January 6, 2022 at 11:59:22 AM by AutoGen 5.18.16 + * It has been AutoGen-ed January 15, 2022 at 10:53:02 PM by AutoGen 5.18.16 * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Jan 6 11:59:22 UTC 2022 +/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Jan 15 22:53:02 UTC 2022 * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 263 fixup descriptions. + * This file contains 264 fixup descriptions. * * See README for more information. * @@ -10214,6 +10214,72 @@ static const char* apzVxworks_Ioctl_MacroPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Vxworks_Math_H_Fp_C99 fix + */ +tSCC zVxworks_Math_H_Fp_C99Name[] = + "vxworks_math_h_fp_c99"; + +/* + * File name selection pattern + */ +tSCC zVxworks_Math_H_Fp_C99List[] = + "math.h\0"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzVxworks_Math_H_Fp_C99Machs[] = { + "*-*-vxworks*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zVxworks_Math_H_Fp_C99Select0[] = + "#define HUGE_VAL[ \t]*_ARCH.*"; + +/* + * content bypass pattern - skip fix if pattern found + */ +tSCC zVxworks_Math_H_Fp_C99Bypass0[] = + "#define[ \t]+FP_INFINITE"; + +#define VXWORKS_MATH_H_FP_C99_TEST_CT 2 +static tTestDesc aVxworks_Math_H_Fp_C99Tests[] = { + { TT_NEGREP, zVxworks_Math_H_Fp_C99Bypass0, (regex_t*)NULL }, + { TT_EGREP, zVxworks_Math_H_Fp_C99Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Vxworks_Math_H_Fp_C99 + */ +static const char* apzVxworks_Math_H_Fp_C99Patch[] = { + "format", + "\n\ +%0\n\n\ +#if _C99\n\n\ +#define FP_INFINITE 1\n\ +#define FP_NAN 2\n\ +#define FP_NORMAL (-1)\n\ +#define FP_SUBNORMAL (-2)\n\ +#define FP_ZERO 0\n\n\ +#define fpclassify(x) \\\n\ + __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, \\\n\ +\t\t FP_SUBNORMAL, FP_ZERO, (x))\n\n\ +#define signbit(x) __builtin_signbit(x)\n\ +#define isfinite(x) __builtin_isfinite(x)\n\ +#define isnormal(x) __builtin_isnormal(x)\n\ +#define isnan(x) __builtin_isnan(x)\n\ +#define isinf(x) __builtin_isinf(x)\n\n\ +#define isgreater(x, y) __builtin_isgreater((x),(y))\n\ +#define isgreaterequal(x, y) __builtin_isgreaterequal((x),(y))\n\ +#define isless(x, y) __builtin_isless((x),(y))\n\ +#define islessequal(x, y) __builtin_islessequal((x),(y))\n\ +#define islessgreater(x, y) __builtin_islessgreater((x),(y))\n\ +#define isunordered(x, y) __builtin_isunordered((x),(y))\n\n\ +#endif /* _C99 */\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Vxworks_Posix_Mkdir fix */ tSCC zVxworks_Posix_MkdirName[] = @@ -10690,9 +10756,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 301 +#define REGEX_COUNT 303 #define MACH_LIST_SIZE_LIMIT 187 -#define FIX_COUNT 263 +#define FIX_COUNT 264 /* * Enumerate the fixes @@ -10949,6 +11015,7 @@ typedef enum { VOID_NULL_FIXIDX, VXWORKS_GCC_PROBLEM_FIXIDX, VXWORKS_IOCTL_MACRO_FIXIDX, + VXWORKS_MATH_H_FP_C99_FIXIDX, VXWORKS_POSIX_MKDIR_FIXIDX, VXWORKS_NEEDS_VXTYPES_FIXIDX, VXWORKS_NEEDS_VXWORKS_FIXIDX, @@ -12219,6 +12286,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { VXWORKS_IOCTL_MACRO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aVxworks_Ioctl_MacroTests, apzVxworks_Ioctl_MacroPatch, 0 }, + { zVxworks_Math_H_Fp_C99Name, zVxworks_Math_H_Fp_C99List, + apzVxworks_Math_H_Fp_C99Machs, + VXWORKS_MATH_H_FP_C99_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aVxworks_Math_H_Fp_C99Tests, apzVxworks_Math_H_Fp_C99Patch, 0 }, + { zVxworks_Posix_MkdirName, zVxworks_Posix_MkdirList, apzVxworks_Posix_MkdirMachs, VXWORKS_POSIX_MKDIR_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, |