summaryrefslogtreecommitdiff
path: root/gcc/config/vxworks.h
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-21 12:21:33 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-21 12:21:33 +0000
commitf868f9f1d5a9980043c9884c8f472b7cb2f8d710 (patch)
tree8d4dbb60d52000de334d5163a47afc73bf275f37 /gcc/config/vxworks.h
parente1701a717730bd5b23414106cb3838677d828192 (diff)
downloadgcc-f868f9f1d5a9980043c9884c8f472b7cb2f8d710.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123108 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/vxworks.h')
-rw-r--r--gcc/config/vxworks.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/gcc/config/vxworks.h b/gcc/config/vxworks.h
index 10d727f4f8b..25f74d992d9 100644
--- a/gcc/config/vxworks.h
+++ b/gcc/config/vxworks.h
@@ -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