aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@gcc.gnu.org>2017-07-04 08:41:39 +0000
committerOlivier Hainque <hainque@gcc.gnu.org>2017-07-04 08:41:39 +0000
commit88f4e7668cc3c73302cc81c15037a2d75d1e8327 (patch)
tree57bc0d6ed7b4b05f5ffabd04057a81a1049672fd /gcc
parent7a1238d110b4f70634148cd0745a61e5bdbaa9e5 (diff)
downloadgcc-88f4e7668cc3c73302cc81c15037a2d75d1e8327.zip
gcc-88f4e7668cc3c73302cc81c15037a2d75d1e8327.tar.gz
gcc-88f4e7668cc3c73302cc81c15037a2d75d1e8327.tar.bz2
vxworks.h (PTRDIFF_TYPE, SIZE_TYPE): Restore unconditional basic definitions.
2017-07-04 Olivier Hainque <hainque@adacore.com> * config/vxworks.h (PTRDIFF_TYPE, SIZE_TYPE): Restore unconditional basic definitions. (VXWORKS_LIBS_RTP): Likewise, prefixed by VXWORKS_SYSCALL_LIBS_RTP, empty by default. * config/i386/vxworks.h (PTRDIFF_TYPE, SIZE_TYPE): Redefine, accounting for 64bit ABIs using cpu specific macros available for this purpose. (VXWORKS_SYSCALL_LIBS_RTP): Likewise. From-SVN: r249950
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/i386/vxworks.h11
-rw-r--r--gcc/config/vxworks.h16
2 files changed, 19 insertions, 8 deletions
diff --git a/gcc/config/i386/vxworks.h b/gcc/config/i386/vxworks.h
index 24e4807..6095f72 100644
--- a/gcc/config/i386/vxworks.h
+++ b/gcc/config/i386/vxworks.h
@@ -35,6 +35,17 @@ along with GCC; see the file COPYING3. If not see
#define DBX_REGISTER_NUMBER(n) \
(TARGET_64BIT ? dbx64_register_map[n] : svr4_dbx_register_map[n])
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE (TARGET_LP64 ? "long int" : "int")
+
+#undef SIZE_TYPE
+#define SIZE_TYPE (TARGET_LP64 ? "long unsigned int" : "unsigned int")
+
+#if TARGET_64BIT_DEFAULT
+#undef VXWORKS_SYSCALL_LIBS_RTP
+#define VXWORKS_SYSCALL_LIBS_RTP "-lsyscall"
+#endif
+
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
diff --git a/gcc/config/vxworks.h b/gcc/config/vxworks.h
index e78ea28..62149d4 100644
--- a/gcc/config/vxworks.h
+++ b/gcc/config/vxworks.h
@@ -68,13 +68,13 @@ along with GCC; see the file COPYING3. If not see
#endif
/* The references to __init and __fini will be satisfied by
- libc_internal.a. */
+ libc_internal.a, and some versions of VxWorks rely on explicit
+ extra libraries for system calls. */
-#if TARGET_64BIT_DEFAULT
-#define VXWORKS_LIBS_RTP "-lsyscall -lc -lgcc -lc_internal -lnet -ldsi"
-#else
-#define VXWORKS_LIBS_RTP "-lc -lgcc -lc_internal -lnet -ldsi"
-#endif
+#define VXWORKS_SYSCALL_LIBS_RTP
+
+#define VXWORKS_LIBS_RTP \
+ VXWORKS_SYSCALL_LIBS_RTP " -lc -lgcc -lc_internal -lnet -ldsi"
/* On Vx6 and previous, the libraries to pick up depends on the architecture,
so cannot be defined for all archs at once. On Vx7, a VSB is always needed
@@ -160,10 +160,10 @@ extern void vxworks_asm_out_destructor (rtx symbol, int priority);
#define VXWORKS_GOTT_INDEX "__GOTT_INDEX__"
#undef PTRDIFF_TYPE
-#define PTRDIFF_TYPE (TARGET_LP64 ? "long int" : "int")
+#define PTRDIFF_TYPE "int"
#undef SIZE_TYPE
-#define SIZE_TYPE (TARGET_LP64 ? "long unsigned int" : "unsigned int")
+#define SIZE_TYPE "unsigned int"
#undef TARGET_LIBC_HAS_FUNCTION
#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function