summaryrefslogtreecommitdiff
path: root/gcc/config/vxworks.h
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-22 23:49:15 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-22 23:49:15 +0000
commit0305c755745c1d24fb688d9b5bb540c4232417b7 (patch)
treedcb598c670d33f19a370e00849a60a24d74c701c /gcc/config/vxworks.h
parent22aed4ed8eb981f2e8c2bea17c20e373a321a2be (diff)
downloadgcc-0305c755745c1d24fb688d9b5bb540c4232417b7.tar.gz
* gcc.c (getenv_spec_function): New function.
(static_spec_functions): Add it. * config/vxworks.h (VXWORKS_TARGET_DIR): Remove. (VXWORKS_ADDITIONAL_CPP_SPEC): Use getenv to find the VxWorks header files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122240 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/vxworks.h')
-rw-r--r--gcc/config/vxworks.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/config/vxworks.h b/gcc/config/vxworks.h
index 70345e24608..2d07b621969 100644
--- a/gcc/config/vxworks.h
+++ b/gcc/config/vxworks.h
@@ -26,8 +26,11 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
like a traditional Unix, with more external files. Most of our specs
must be aware of the difference. */
-/* The directory containing the VxWorks target headers. */
-#define VXWORKS_TARGET_DIR "/home/tornado/base6/target"
+/* We look for the VxWorks header files using the environment
+ variables that are set in VxWorks to indicate the location of the
+ system header files. We use -idirafter so that the GCC's own
+ header-file directories (containing <stddef.h>, etc.) come before
+ the VxWorks system header directories. */
/* Since we provide a default -isystem, expand -isystem on the command
line early. */
@@ -35,9 +38,9 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#define VXWORKS_ADDITIONAL_CPP_SPEC " \
%{!nostdinc:%{isystem*}} \
%{mrtp: -D__RTP__=1 \
- %{!nostdinc:-isystem " VXWORKS_TARGET_DIR "/usr/h}} \
+ %{!nostdinc:-idirafter %:getenv(WIND_USR /h)}} \
%{!mrtp:-D_WRS_KERNEL=1 \
- %{!nostdinc:-isystem " VXWORKS_TARGET_DIR "/h}}"
+ %{!nostdinc:-idirafter %:getenv(WIND_BASE /target/h)}}"
/* The references to __init and __fini will be satisfied by
libc_internal.a. */