diff options
author | Pat Bernardi <bernardi@adacore.com> | 2019-11-14 15:45:50 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@gcc.gnu.org> | 2019-11-14 15:45:50 +0000 |
commit | ebcdba9c9f71e548e7506ecc8cb13139614b392e (patch) | |
tree | fbcc4ee4ddc05d881eea07e45b4be0eb24f675ca /gcc/config/vxworks.h | |
parent | 60838d634634a70d65a126166c944b159ac7649c (diff) | |
download | gcc-ebcdba9c9f71e548e7506ecc8cb13139614b392e.zip gcc-ebcdba9c9f71e548e7506ecc8cb13139614b392e.tar.gz gcc-ebcdba9c9f71e548e7506ecc8cb13139614b392e.tar.bz2 |
Common ground work for vxworks7 ports updates
2019-11-06 Pat Bernardi <bernardi@adacore.com>
Jerome Lambourg <lambourg@adacore.com>
Olivier Hainque <hainque@adacore.com>
gcc/
* config.gcc: Add comment to introduce the TARGET_VXWORKS
commong macro definitions, conveying VXWORKS7 or 64bit general
variations. Add a block to set gcc_cv_initfini_array
unconditionally to "yes" for VxWorks7.
config/vx-common.h (VXWORKS_CC1_SPEC): New macro, empty string
by default. Update some comments.
config/vxworks.h (VXWORKS_EXTRA_LIBS_RTP): New macro, empty by
default, to be added the end of VXWORKS_LIBS_RTP.
(VXWORKS_LIBS_RTP): Replace hardcoded part by VXWORKS_BASE_LIBS_RTP
and append VXWORKS_EXTRA_LIBS_RTP, both of which specific ports may
redefine.
(VXWORKS_NET_LIBS_RTP): Account for VxWorks7 specificities.
(VXWORKS_CC1_SPEC): Common base definition, with VxWorks7 variation
to account for the now available TLS abilities.
(TARGET_LIBC_HAS_FUNCTION): Account for VxWorks7 abilities.
(VXWORKS_HAVE_TLS): Likewise.
Co-Authored-By: Jerome Lambourg <lambourg@adacore.com>
Co-Authored-By: Olivier Hainque <hainque@adacore.com>
From-SVN: r278247
Diffstat (limited to 'gcc/config/vxworks.h')
-rw-r--r-- | gcc/config/vxworks.h | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/gcc/config/vxworks.h b/gcc/config/vxworks.h index 0f604f1b..8c93a30 100644 --- a/gcc/config/vxworks.h +++ b/gcc/config/vxworks.h @@ -78,10 +78,23 @@ along with GCC; see the file COPYING3. If not see #define VXWORKS_SYSCALL_LIBS_RTP +#if TARGET_VXWORKS7 +#define VXWORKS_NET_LIBS_RTP "-lnet" +#else #define VXWORKS_NET_LIBS_RTP "-lnet -ldsi" +#endif + +#define VXWORKS_BASE_LIBS_RTP "-lc -lgcc -lc_internal" + +#define VXWORKS_EXTRA_LIBS_RTP #define VXWORKS_LIBS_RTP \ - VXWORKS_SYSCALL_LIBS_RTP " " VXWORKS_NET_LIBS_RTP " -lc -lgcc -lc_internal" + VXWORKS_SYSCALL_LIBS_RTP " " VXWORKS_NET_LIBS_RTP " " \ + VXWORKS_BASE_LIBS_RTP " " VXWORKS_EXTRA_LIBS_RTP + +/* TLS configuration. VxWorks 7 now always has proper TLS support. + Earlier versions did not, not even for RTPS. */ +#define VXWORKS_HAVE_TLS TARGET_VXWORKS7 /* 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 @@ -134,10 +147,15 @@ along with GCC; see the file COPYING3. If not see #define VXWORKS_STARTFILE_SPEC "%{mrtp:%{!shared:-l:crt0.o}}" #define VXWORKS_ENDFILE_SPEC "" -/* Do VxWorks-specific parts of TARGET_OPTION_OVERRIDE. */ - -#define VXWORKS_HAVE_TLS (TARGET_VXWORKS7 && TARGET_VXWORKS_RTP) +#undef VXWORKS_CC1_SPEC +#if TARGET_VXWORKS7 +#define VXWORKS_CC1_SPEC \ + "%(cc1_cpu) %{!mrtp:%{!ftls-model=*:-ftls-model=local-exec}}" +#else +#define VXWORKS_CC1_SPEC "" +#endif +/* Do VxWorks-specific parts of TARGET_OPTION_OVERRIDE. */ #undef VXWORKS_OVERRIDE_OPTIONS #define VXWORKS_OVERRIDE_OPTIONS vxworks_override_options () extern void vxworks_override_options (void); @@ -179,8 +197,11 @@ extern void vxworks_asm_out_destructor (rtx symbol, int priority); #undef SIZE_TYPE #define SIZE_TYPE (TARGET_VXWORKS64 ? "long unsigned int" : "unsigned int") +/* Assumptions on the target libc. VxWorks 7, post SR600, provides a C11 + runtime without sincos support. */ #undef TARGET_LIBC_HAS_FUNCTION -#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function +#define TARGET_LIBC_HAS_FUNCTION \ + (TARGET_VXWORKS7 ? default_libc_has_function : no_c99_libc_has_function) /* Both kernels and RTPs have the facilities required by this macro. */ #define TARGET_POSIX_IO |