aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fixincludes/ChangeLog5
-rw-r--r--fixincludes/fixincl.x132
-rw-r--r--fixincludes/inclhack.def116
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config.gcc2
-rw-r--r--gcc/config/vxworks-stdint.h53
6 files changed, 72 insertions, 242 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 4f729db..ffd1718 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-12 Doug Rupp <rupp@adacore.com>
+
+ * inclhack.def (AAB_vxworks_stdint): Remove hack.
+ * fixincl.x: Regenerate.
+
2017-02-25 John David Anglin <danglin@gcc.gnu.org>
PR target/68739
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index c5be74f..8d8be9c 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -1,12 +1,12 @@
/* -*- buffer-read-only: t -*- vi: set ro:
- *
+ *
* DO NOT EDIT THIS FILE (fixincl.x)
- *
- * It has been AutoGen-ed Saturday February 25, 2017 at 03:25:44 PM EST
+ *
+ * It has been AutoGen-ed June 8, 2017 at 10:50:04 AM by AutoGen 5.18.4
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Sat 25 Feb 2017 15:25:44 EST
+/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Jun 8 10:50:04 CEST 2017
*
* 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 248 fixup descriptions.
+ * This file contains 247 fixup descriptions.
*
* See README for more information.
*
@@ -581,120 +581,6 @@ static const char* apzAab_Vxworks_Regs_VxtypesPatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
- * Description of Aab_Vxworks_Stdint fix
- */
-tSCC zAab_Vxworks_StdintName[] =
- "AAB_vxworks_stdint";
-
-/*
- * File name selection pattern
- */
-tSCC zAab_Vxworks_StdintList[] =
- "stdint.h\0";
-/*
- * Machine/OS name selection pattern
- */
-tSCC* apzAab_Vxworks_StdintMachs[] = {
- "*-*-vxworks*",
- (const char*)NULL };
-#define AAB_VXWORKS_STDINT_TEST_CT 0
-#define aAab_Vxworks_StdintTests (tTestDesc*)NULL
-
-/*
- * Fix Command Arguments for Aab_Vxworks_Stdint
- */
-static const char* apzAab_Vxworks_StdintPatch[] = {
-"#ifndef _STDINT_H\n\
-#define _STDINT_H\n\
-/* get int*_t, uint*_t */\n\
-#include <types/vxTypes.h>\n\n\
-/* get legacy vxworks types for compatibility */\n\
-#include <types/vxTypesOld.h>\n\n\
-typedef long intptr_t;\n\
-typedef unsigned long uintptr_t;\n\n\
-typedef int64_t intmax_t;\n\
-typedef uint64_t uintmax_t;\n\n\
-typedef int8_t int_least8_t;\n\
-typedef int16_t int_least16_t;\n\
-typedef int32_t int_least32_t;\n\
-typedef int64_t int_least64_t;\n\n\
-typedef uint8_t uint_least8_t;\n\
-typedef uint16_t uint_least16_t;\n\
-typedef uint32_t uint_least32_t;\n\
-typedef uint64_t uint_least64_t;\n\n\
-typedef int8_t int_fast8_t;\n\
-typedef int int_fast16_t;\n\
-typedef int32_t int_fast32_t;\n\
-typedef int64_t int_fast64_t;\n\n\
-typedef uint8_t uint_fast8_t;\n\
-typedef unsigned int uint_fast16_t;\n\
-typedef uint32_t uint_fast32_t;\n\
-typedef uint64_t uint_fast64_t;\n\n\
-/* Ranges */\n\
-#define UINT8_MAX (~(uint8_t)0)\n\
-#define UINT8_MIN 0\n\
-#define UINT16_MAX (~(uint16_t)0)\n\
-#define UINT16_MIN 0\n\
-#define UINT32_MAX (~(uint32_t)0)\n\
-#define UINT32_MIN 0\n\
-#define UINT64_MAX (~(uint64_t)0)\n\
-#define UINT64_MIN 0\n\n\
-#define UINTPTR_MAX (~(uintptr_t)0)\n\
-#define UINTPTR_MIN 0\n\n\
-/* Need to do int_fast16_t as well, as type\n\
- size may be architecture dependent */\n\
-#define UINT_FAST16_MAX (~(uint_fast16_t)0)\n\
-#define UINT_FAST16_MAX 0\n\n\
-#define INT8_MAX (UINT8_MAX>>1)\n\
-#define INT8_MIN (INT8_MAX+1)\n\
-#define INT16_MAX (UINT16_MAX>>1)\n\
-#define INT16_MIN (INT16_MAX+1)\n\
-#define INT32_MAX (UINT32_MAX>>1)\n\
-#define INT32_MIN (INT32_MAX+1)\n\
-#define INT64_MAX (UINT64_MAX>>1)\n\
-#define INT64_MIN (INT64_MAX+1)\n\n\
-#define INTPTR_MAX (UINTPTR_MAX>>1)\n\
-#define INTPTR_MIN (INTPTR_MAX+1)\t\n\n\
-#define INT_FAST16_MAX (UINT_FAST16_MAX>>1)\n\
-#define INT_FAST16_MIN (INT_FAST16_MAX+1)\n\n\
-/* now define equiv. constants */\n\
-#define UINT_FAST8_MAX UINT8_MAX\n\
-#define UINT_FAST8_MIN UINT_FAST8_MIN\n\
-#define INT_FAST8_MAX INT8_MAX\n\
-#define INT_FAST8_MIN INT8_MIN\n\
-#define UINT_FAST32_MAX UINT32_MAX\n\
-#define UINT_FAST32_MIN UINT32_MIN\n\
-#define INT_FAST32_MAX INT32_MAX\n\
-#define INT_FAST32_MIN INT32_MIN\n\
-#define UINT_FAST64_MAX UINT64_MAX\n\
-#define UINT_FAST64_MIN UINT64_MIN\n\
-#define INT_FAST64_MAX INT64_MAX\n\
-#define INT_FAST64_MIN INT64_MIN\n\n\
-#define UINT_LEAST8_MAX UINT8_MAX\n\
-#define UINT_LEAST8_MIN UINT8_MIN\n\
-#define INT_LEAST8_MAX INT8_MAX\n\
-#define INT_LEAST8_MIN INT8_MIN\n\
-#define UINT_LEAST16_MAX UINT16_MAX\n\
-#define UINT_LEAST16_MIN UINT16_MIN\n\
-#define INT_LEAST16_MAX INT16_MAX\n\
-#define INT_LEAST16_MIN INT16_MIN\n\
-#define UINT_LEAST32_MAX UINT32_MAX\n\
-#define UINT_LEAST32_MIN UINT32_MIN\n\
-#define INT_LEAST32_MAX INT32_MAX\n\
-#define INT_LEAST32_MIN INT32_MIN\n\
-#define UINT_LEAST64_MAX UINT64_MAX\n\
-#define UINT_LEAST64_MIN UINT64_MIN\n\
-#define INT_LEAST64_MAX INT64_MAX\n\
-#define INT_LEAST64_MIN INT64_MIN\n\n\
-#define UINTMAX_MAX UINT64_MAX\n\
-#define UINTMAX_MIN UINT64_MIN\n\
-#define INTMAX_MAX INT64_MAX\n\
-#define INTMAX_MIN INT64_MIN\n\n\
-#endif",
- (char*)NULL };
-
-/* * * * * * * * * * * * * * * * * * * * * * * * * *
- *
* Description of Aab_Vxworks_Unistd fix
*/
tSCC zAab_Vxworks_UnistdName[] =
@@ -10141,7 +10027,7 @@ static const char* apzX11_SprintfPatch[] = {
*/
#define REGEX_COUNT 285
#define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT 248
+#define FIX_COUNT 247
/*
* Enumerate the fixes
@@ -10157,7 +10043,6 @@ typedef enum {
AAB_SUN_MEMCPY_FIXIDX,
AAB_VXWORKS_ASSERT_FIXIDX,
AAB_VXWORKS_REGS_VXTYPES_FIXIDX,
- AAB_VXWORKS_STDINT_FIXIDX,
AAB_VXWORKS_UNISTD_FIXIDX,
AIX_ASSERT_FIXIDX,
AIX_COMPLEX_FIXIDX,
@@ -10448,11 +10333,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
AAB_VXWORKS_REGS_VXTYPES_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAab_Vxworks_Regs_VxtypesTests, apzAab_Vxworks_Regs_VxtypesPatch, 0 },
- { zAab_Vxworks_StdintName, zAab_Vxworks_StdintList,
- apzAab_Vxworks_StdintMachs,
- AAB_VXWORKS_STDINT_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
- aAab_Vxworks_StdintTests, apzAab_Vxworks_StdintPatch, 0 },
-
{ zAab_Vxworks_UnistdName, zAab_Vxworks_UnistdList,
apzAab_Vxworks_UnistdMachs,
AAB_VXWORKS_UNISTD_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 8a5514f..fd0034f 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -427,122 +427,6 @@ fix = {
};
/*
- * Make VxWorks stdint.h a bit more compliant - add typedefs
- */
-fix = {
- hackname = AAB_vxworks_stdint;
- files = stdint.h;
- mach = "*-*-vxworks*";
-
- replace = <<- _EndOfHeader_
- #ifndef _STDINT_H
- #define _STDINT_H
- /* get int*_t, uint*_t */
- #include <types/vxTypes.h>
-
- /* get legacy vxworks types for compatibility */
- #include <types/vxTypesOld.h>
-
- typedef long intptr_t;
- typedef unsigned long uintptr_t;
-
- typedef int64_t intmax_t;
- typedef uint64_t uintmax_t;
-
- typedef int8_t int_least8_t;
- typedef int16_t int_least16_t;
- typedef int32_t int_least32_t;
- typedef int64_t int_least64_t;
-
- typedef uint8_t uint_least8_t;
- typedef uint16_t uint_least16_t;
- typedef uint32_t uint_least32_t;
- typedef uint64_t uint_least64_t;
-
- typedef int8_t int_fast8_t;
- typedef int int_fast16_t;
- typedef int32_t int_fast32_t;
- typedef int64_t int_fast64_t;
-
- typedef uint8_t uint_fast8_t;
- typedef unsigned int uint_fast16_t;
- typedef uint32_t uint_fast32_t;
- typedef uint64_t uint_fast64_t;
-
- /* Ranges */
- #define UINT8_MAX (~(uint8_t)0)
- #define UINT8_MIN 0
- #define UINT16_MAX (~(uint16_t)0)
- #define UINT16_MIN 0
- #define UINT32_MAX (~(uint32_t)0)
- #define UINT32_MIN 0
- #define UINT64_MAX (~(uint64_t)0)
- #define UINT64_MIN 0
-
- #define UINTPTR_MAX (~(uintptr_t)0)
- #define UINTPTR_MIN 0
-
- /* Need to do int_fast16_t as well, as type
- size may be architecture dependent */
- #define UINT_FAST16_MAX (~(uint_fast16_t)0)
- #define UINT_FAST16_MAX 0
-
- #define INT8_MAX (UINT8_MAX>>1)
- #define INT8_MIN (INT8_MAX+1)
- #define INT16_MAX (UINT16_MAX>>1)
- #define INT16_MIN (INT16_MAX+1)
- #define INT32_MAX (UINT32_MAX>>1)
- #define INT32_MIN (INT32_MAX+1)
- #define INT64_MAX (UINT64_MAX>>1)
- #define INT64_MIN (INT64_MAX+1)
-
- #define INTPTR_MAX (UINTPTR_MAX>>1)
- #define INTPTR_MIN (INTPTR_MAX+1)
-
- #define INT_FAST16_MAX (UINT_FAST16_MAX>>1)
- #define INT_FAST16_MIN (INT_FAST16_MAX+1)
-
- /* now define equiv. constants */
- #define UINT_FAST8_MAX UINT8_MAX
- #define UINT_FAST8_MIN UINT_FAST8_MIN
- #define INT_FAST8_MAX INT8_MAX
- #define INT_FAST8_MIN INT8_MIN
- #define UINT_FAST32_MAX UINT32_MAX
- #define UINT_FAST32_MIN UINT32_MIN
- #define INT_FAST32_MAX INT32_MAX
- #define INT_FAST32_MIN INT32_MIN
- #define UINT_FAST64_MAX UINT64_MAX
- #define UINT_FAST64_MIN UINT64_MIN
- #define INT_FAST64_MAX INT64_MAX
- #define INT_FAST64_MIN INT64_MIN
-
- #define UINT_LEAST8_MAX UINT8_MAX
- #define UINT_LEAST8_MIN UINT8_MIN
- #define INT_LEAST8_MAX INT8_MAX
- #define INT_LEAST8_MIN INT8_MIN
- #define UINT_LEAST16_MAX UINT16_MAX
- #define UINT_LEAST16_MIN UINT16_MIN
- #define INT_LEAST16_MAX INT16_MAX
- #define INT_LEAST16_MIN INT16_MIN
- #define UINT_LEAST32_MAX UINT32_MAX
- #define UINT_LEAST32_MIN UINT32_MIN
- #define INT_LEAST32_MAX INT32_MAX
- #define INT_LEAST32_MIN INT32_MIN
- #define UINT_LEAST64_MAX UINT64_MAX
- #define UINT_LEAST64_MIN UINT64_MIN
- #define INT_LEAST64_MAX INT64_MAX
- #define INT_LEAST64_MIN INT64_MIN
-
- #define UINTMAX_MAX UINT64_MAX
- #define UINTMAX_MIN UINT64_MIN
- #define INTMAX_MAX INT64_MAX
- #define INTMAX_MIN INT64_MIN
-
- #endif
- _EndOfHeader_;
-};
-
-/*
* This hack makes makes unistd.h more POSIX-compliant on VxWorks
*/
fix = {
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0f5444c..6193527 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2017-06-12 Doug Rupp <rupp@adacore.com>
+
+ * config.gcc (*-*-vxworks*): Set use_gcc_stdint to "provide".
+ Append vxworks-stdint.h to the tm_file list.
+ * config/vxworks-stdint.h: New file.
+
2017-06-12 Martin Liska <mliska@suse.cz>
PR tree-optimization/81041
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 44b8dea..8b00e66 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -917,6 +917,8 @@ case ${target} in
xm_defines=POSIX
extra_options="${extra_options} vxworks.opt"
extra_objs="$extra_objs vxworks.o"
+ use_gcc_stdint=provide
+ tm_file="${tm_file} vxworks-stdint.h"
case ${enable_threads} in
no) ;;
"" | yes | vxworks) thread_file='vxworks' ;;
diff --git a/gcc/config/vxworks-stdint.h b/gcc/config/vxworks-stdint.h
new file mode 100644
index 0000000..2595e83
--- /dev/null
+++ b/gcc/config/vxworks-stdint.h
@@ -0,0 +1,53 @@
+/* Definitions for <stdint.h> types on systems using VxWorks.
+ Copyright (C) 2017 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#define SIG_ATOMIC_TYPE "unsigned char"
+
+#define INT8_TYPE "signed char"
+#define INT16_TYPE "short int"
+#define INT32_TYPE "int"
+#define INT64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")
+#define UINT8_TYPE "unsigned char"
+#define UINT16_TYPE "short unsigned int"
+#define UINT32_TYPE "unsigned int"
+#define UINT64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
+#define INT_LEAST8_TYPE "signed char"
+#define INT_LEAST16_TYPE "short int"
+#define INT_LEAST32_TYPE "int"
+#define INT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")
+#define UINT_LEAST8_TYPE "unsigned char"
+#define UINT_LEAST16_TYPE "short unsigned int"
+#define UINT_LEAST32_TYPE "unsigned int"
+#define UINT_LEAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
+#define INT_FAST8_TYPE "signed char"
+#define INT_FAST16_TYPE "int"
+#define INT_FAST32_TYPE "int"
+#define INT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "long long int")
+#define UINT_FAST8_TYPE "unsigned char"
+#define UINT_FAST16_TYPE "unsigned int"
+#define UINT_FAST32_TYPE "unsigned int"
+#define UINT_FAST64_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "long long unsigned int")
+
+#define INTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long int" : "int")
+#define UINTPTR_TYPE (LONG_TYPE_SIZE == 64 ? "long unsigned int" : "unsigned int")