aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerome Lambourg <lambourg@adacore.com>2017-06-27 08:54:53 +0000
committerOlivier Hainque <hainque@gcc.gnu.org>2017-06-27 08:54:53 +0000
commita93e7e14139f2639da66227294cef81fb58855b4 (patch)
treeea72a8d8973094166a3f0f4cd6d17d0e6f720425
parentc103185290d8e69b03ab40678093514821615abd (diff)
downloadgcc-a93e7e14139f2639da66227294cef81fb58855b4.zip
gcc-a93e7e14139f2639da66227294cef81fb58855b4.tar.gz
gcc-a93e7e14139f2639da66227294cef81fb58855b4.tar.bz2
vxworks.h (VXWORKS_LIBS_RTP): Alternative definition for 64bit configurations.
2017-06-27 Jerome Lambourg <lambourg@adacore.com> * config/vxworks.h (VXWORKS_LIBS_RTP): Alternative definition for 64bit configurations. (PTR_DIFF_TYPE): Alternative definition for TARGET_LP64. (SIZE_TYPE): Likewise. * config/vxworks.c (vxworks_emutls_var_fields): Use long_unsigned_type_node instead of unsigned_type_node as the offset field type, which is "pointer" mode in emutls.c. From-SVN: r249681
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/config/vxworks.c4
-rw-r--r--gcc/config/vxworks.h8
3 files changed, 19 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 128e8f7..3f27541 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2017-06-27 Jerome Lambourg <lambourg@adacore.com>
+
+ * config/vxworks.h (VXWORKS_LIBS_RTP): Alternative definition for
+ 64bit configurations.
+ (PTR_DIFF_TYPE): Alternative definition for TARGET_LP64.
+ (SIZE_TYPE): Likewise.
+ * config/vxworks.c (vxworks_emutls_var_fields): Use
+ long_unsigned_type_node instead of unsigned_type_node as the offset
+ field type, which is "pointer" mode in emutls.c.
+
2017-06-27 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/81209
diff --git a/gcc/config/vxworks.c b/gcc/config/vxworks.c
index 547176b..8f1c78d 100644
--- a/gcc/config/vxworks.c
+++ b/gcc/config/vxworks.c
@@ -80,8 +80,10 @@ vxworks_emutls_var_fields (tree type, tree *name)
DECL_CHAIN (field) = next_field;
next_field = field;
+ /* The offset field is declared as an unsigned int with pointer mode. */
field = build_decl (BUILTINS_LOCATION, FIELD_DECL,
- get_identifier ("offset"), unsigned_type_node);
+ get_identifier ("offset"), long_unsigned_type_node);
+
DECL_CONTEXT (field) = type;
DECL_CHAIN (field) = next_field;
diff --git a/gcc/config/vxworks.h b/gcc/config/vxworks.h
index 11d811c..9afd332 100644
--- a/gcc/config/vxworks.h
+++ b/gcc/config/vxworks.h
@@ -70,7 +70,11 @@ along with GCC; see the file COPYING3. If not see
/* The references to __init and __fini will be satisfied by
libc_internal.a. */
+#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
/* 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
@@ -147,10 +151,10 @@ extern void vxworks_asm_out_destructor (rtx symbol, int priority);
#define VXWORKS_GOTT_INDEX "__GOTT_INDEX__"
#undef PTRDIFF_TYPE
-#define PTRDIFF_TYPE "int"
+#define PTRDIFF_TYPE (TARGET_LP64 ? "long int" : "int")
#undef SIZE_TYPE
-#define SIZE_TYPE "unsigned int"
+#define SIZE_TYPE (TARGET_LP64 ? "long unsigned int" : "unsigned int")
#undef TARGET_LIBC_HAS_FUNCTION
#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function