]> gcc.gnu.org Git - gcc.git/commitdiff
vxworks.h (VXWORKS_ADDITIONAL_CPP_SPEC): Remove -D options.
authorRichard Sandiford <richard@codesourcery.com>
Wed, 21 Mar 2007 12:21:33 +0000 (12:21 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Wed, 21 Mar 2007 12:21:33 +0000 (12:21 +0000)
gcc/
* config/vxworks.h (VXWORKS_ADDITIONAL_CPP_SPEC): Remove -D options.
(VXWORKS_OS_CPP_BUILTINS): Define.
* config/i386/vxworks.h (VXWORKS_CPU_DEFINE): Fold into...
(TARGET_OS_CPP_BUILTINS): ...here.  Use VXWORKS_OS_CPP_BUILTINS.

From-SVN: r123108

gcc/ChangeLog
gcc/config/i386/vxworks.h
gcc/config/vxworks.h

index f6edacf979b444116f1b76e1cd2a3da87ee4ced3..5d93c7d6c518323d9ec48cd0a5e068bba2329990 100644 (file)
@@ -1,3 +1,10 @@
+2007-03-21  Richard Sandiford  <richard@codesourcery.com>
+
+       * config/vxworks.h (VXWORKS_ADDITIONAL_CPP_SPEC): Remove -D options.
+       (VXWORKS_OS_CPP_BUILTINS): Define.
+       * config/i386/vxworks.h (VXWORKS_CPU_DEFINE): Fold into...
+       (TARGET_OS_CPP_BUILTINS): ...here.  Use VXWORKS_OS_CPP_BUILTINS.
+
 2007-03-21  Richard Sandiford  <richard@codesourcery.com>
 
        * rtl.h (constant_pool_reference_p): Delete.
index dd4164ec96f7ef24b6efb0ea023327c8e0d88ee0..9862cf23ff297750d4c17ad10eb3356fa76a2d71 100644 (file)
@@ -27,9 +27,10 @@ Boston, MA 02110-1301, USA.  */
 #undef  ASM_SPEC
 #define ASM_SPEC "%{v:-v} %{Qy:} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}"
 
-#define VXWORKS_CPU_DEFINE()                           \
+#define TARGET_OS_CPP_BUILTINS()                       \
   do                                                   \
     {                                                  \
+      VXWORKS_OS_CPP_BUILTINS ();                      \
       if (TARGET_386)                                  \
         builtin_define ("CPU=I80386");                 \
       else if (TARGET_486)                             \
@@ -49,18 +50,7 @@ Boston, MA 02110-1301, USA.  */
           builtin_define ("CPU=PENTIUM4");             \
           builtin_define ("CPU_VARIANT=PENTIUM4");     \
         }                                              \
-    }                                                          \
-  while (0)
-
-#define TARGET_OS_CPP_BUILTINS()               \
-  do                                           \
-    {                                          \
-      builtin_define ("__vxworks");            \
-      builtin_define ("__VXWORKS__");          \
-      builtin_assert ("system=unix");          \
-                                               \
-      VXWORKS_CPU_DEFINE();                    \
-    }                                          \
+    }                                                  \
   while (0)
 
 #undef  CPP_SPEC
index 10d727f4f8bd53df169bf7cba35905e4c57c7502..25f74d992d9a3ba9097dc98a0413da9f47e19073 100644 (file)
@@ -35,12 +35,11 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
 /* Since we provide a default -isystem, expand -isystem on the command
    line early.  */
 #undef VXWORKS_ADDITIONAL_CPP_SPEC
-#define VXWORKS_ADDITIONAL_CPP_SPEC "                                  \
- %{!nostdinc:%{isystem*}}                                              \
- %{mrtp: -D__RTP__=1                                                   \
-        %{!nostdinc:-idirafter %:getenv(WIND_USR /h)}}                 \
- %{!mrtp:-D_WRS_KERNEL=1                                               \
-        %{!nostdinc:-idirafter %:getenv(WIND_BASE /target/h)}}"
+#define VXWORKS_ADDITIONAL_CPP_SPEC            \
+ "%{!nostdinc:                                 \
+    %{isystem*} -idirafter                     \
+    %{mrtp: %:getenv(WIND_USR /h)              \
+      ;:    %:getenv(WIND_BASE /target/h)}}"
 
 /* The references to __init and __fini will be satisfied by
    libc_internal.a.  */
@@ -105,4 +104,18 @@ extern void vxworks_asm_out_destructor (rtx symbol, int priority);
 #undef VXWORKS_GOTT_INDEX
 #define VXWORKS_GOTT_INDEX "__GOTT_INDEX__"
 
+/* A VxWorks implementation of TARGET_OS_CPP_BUILTINS.  */
+#define VXWORKS_OS_CPP_BUILTINS()                                      \
+  do                                                                   \
+    {                                                                  \
+      builtin_define ("__vxworks");                                    \
+      builtin_define ("__VXWORKS__");                                  \
+      builtin_assert ("system=unix");                                  \
+      if (TARGET_VXWORKS_RTP)                                          \
+       builtin_define ("__RTP__");                                     \
+      else                                                             \
+       builtin_define ("_WRS_KERNEL");                                 \
+    }                                                                  \
+  while (0)
+
 #define VXWORKS_KIND VXWORKS_KIND_NORMAL
This page took 0.109289 seconds and 5 git commands to generate.