]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Introduce notion of VXWORKS_PERSONALITY
authorOlivier Hainque <hainque@adacore.com>
Mon, 29 Oct 2018 15:07:33 +0000 (15:07 +0000)
committerOlivier Hainque <hainque@gcc.gnu.org>
Mon, 29 Oct 2018 15:07:33 +0000 (15:07 +0000)
2018-10-29  Olivier Hainque  <hainque@adacore.com>

* config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
ports configuration macro, defaults to "gnu".
(VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.

From-SVN: r265594

gcc/ChangeLog
gcc/config/vxworks.h

index 14eee689ce2e8e02456dfdee4953d17af4c0431b..86cb859cc7bf9dee3666ffa7592d14b9c623b588 100644 (file)
@@ -1,3 +1,10 @@
+2018-10-29  Olivier Hainque  <hainque@adacore.com>
+
+       * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
+       ports configuration macro, defaults to "gnu".
+       (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
+       TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
+
 2018-10-29  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/87790
index 3ed706e92b3dcfc84a1c2e693b0beda6fb29c8c3..5f87920cece147011d35ecf75bd05cc6bb01fa61 100644 (file)
@@ -175,6 +175,13 @@ extern void vxworks_asm_out_destructor (rtx symbol, int priority);
 #define TARGET_POSIX_IO
 
 /* A VxWorks implementation of TARGET_OS_CPP_BUILTINS.  */
+
+/* The VxWorks personality we rely on, controlling which sections of system
+   headers files we trigger.  This might be redefined on targets where the
+   base VxWorks environment doesn't come with a GNU toolchain.  */
+
+#define VXWORKS_PERSONALITY "gnu"
+
 #define VXWORKS_OS_CPP_BUILTINS()                                      \
   do                                                                   \
     {                                                                  \
@@ -185,8 +192,8 @@ extern void vxworks_asm_out_destructor (rtx symbol, int priority);
        builtin_define ("__RTP__");                                     \
       else                                                             \
        builtin_define ("_WRS_KERNEL");                                 \
-      builtin_define ("_VX_TOOL_FAMILY=gnu");                          \
-      builtin_define ("_VX_TOOL=gnu");                                 \
+      builtin_define ("TOOL_FAMILY=" VXWORKS_PERSONALITY);             \
+      builtin_define ("TOOL=" VXWORKS_PERSONALITY);                    \
       if (TARGET_VXWORKS7)                                             \
         {                                                              \
            builtin_define ("_VSB_CONFIG_FILE=<config/vsbConfig.h>");   \
@@ -208,6 +215,7 @@ extern void vxworks_asm_out_destructor (rtx symbol, int priority);
 
 /* We provide our own version of __clear_cache in libgcc, using a separate C
    file to facilitate #inclusion of VxWorks header files.  */
+#undef CLEAR_INSN_CACHE
 #define CLEAR_INSN_CACHE 1
 
 /* Default dwarf control values, for non-gdb debuggers that come with