diff options
author | drow <drow@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-13 17:23:56 +0000 |
---|---|---|
committer | drow <drow@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-02-13 17:23:56 +0000 |
commit | 17acc97af91fbd116659301b0b7d4965ecc1631d (patch) | |
tree | 3d7379a3ec405d4e0f84ede65961991b09195727 /gcc/cppdefault.c | |
parent | cc7204981b1375f62c9afc89e983f0e59c41a28c (diff) | |
download | gcc-17acc97af91fbd116659301b0b7d4965ecc1631d.tar.gz |
* Makefile.in (PREPROCESSOR_DEFINES): Add
@TARGET_SYSTEM_ROOT_DEFINE@.
* configure.in (PREFIX_INCLUDE_DIR): Don't define if $with_sysroot
is specified or if building a cross compiler.
(TARGET_SYSTEM_ROOT_DEFINE): Add TARGET_SYSTEM_ROOT_RELOCATABLE
if the sysroot is under $exec_prefix.
* configure: Regenerated.
* cppdefault.h: Use native include paths if TARGET_SYSTEM_ROOT is
defined.
(struct default_include): Add add_sysroot field.
(cpp_SYSROOT): Declare.
* cppdefault.c (cpp_include_defaults): Fill in add_sysroot
field.
(cpp_SYSROOT): New variable.
* cppinit.c (cpp_create_reader): Initialize
CPP_OPTION (pfile, sysroot).
(init_standard_includes): Handle add_sysroot. Do not
add unrelocated copies of relocated directories.
(COMMAND_LINE_OPTIONS): Add -isysroot.
(cpp_handle_option): Handle -isysroot.
* cpplib.h (struct cpp_options): Add sysroot member.
* gcc.c (The Specs Language): Update description of %I.
(target_system_root_changed): New variable.
(process_command): Conditionalize make_relative_prefix call
on !VMS and TARGET_SYSTEM_ROOT_RELOCATABLE. Set
target_system_root_changed.
(do_spec_1): Add -isysroot to %I.
* doc/invoke.texi (Spec Files): Update description of %I.
* doc/install.texi (--with-sysroot): Update comment about
relocation.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62853 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppdefault.c')
-rw-r--r-- | gcc/cppdefault.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/gcc/cppdefault.c b/gcc/cppdefault.c index 40d8d908f8b..da4ddb5411c 100644 --- a/gcc/cppdefault.c +++ b/gcc/cppdefault.c @@ -35,44 +35,44 @@ const struct default_include cpp_include_defaults[] = { #ifdef GPLUSPLUS_INCLUDE_DIR /* Pick up GNU C++ generic include files. */ - { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1 }, + { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, 0 }, #endif #ifdef GPLUSPLUS_TOOL_INCLUDE_DIR /* Pick up GNU C++ target-dependent include files. */ - { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1 }, + { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, 0 }, #endif #ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR /* Pick up GNU C++ backward and deprecated include files. */ - { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1 }, + { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, 0 }, #endif #ifdef LOCAL_INCLUDE_DIR /* /usr/local/include comes before the fixincluded header files. */ - { LOCAL_INCLUDE_DIR, 0, 0, 1 }, + { LOCAL_INCLUDE_DIR, 0, 0, 1, 1 }, #endif #ifdef PREFIX_INCLUDE_DIR - { PREFIX_INCLUDE_DIR, 0, 0, 1 }, + { PREFIX_INCLUDE_DIR, 0, 0, 1, 0 }, #endif #ifdef GCC_INCLUDE_DIR /* This is the dir for fixincludes and for gcc's private headers. */ - { GCC_INCLUDE_DIR, "GCC", 0, 0 }, + { GCC_INCLUDE_DIR, "GCC", 0, 0, 0 }, #endif #ifdef CROSS_INCLUDE_DIR /* One place the target system's headers might be. */ - { CROSS_INCLUDE_DIR, "GCC", 0, 0 }, + { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0 }, #endif #ifdef TOOL_INCLUDE_DIR /* Another place the target system's headers might be. */ - { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1 }, + { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0 }, #endif #ifdef SYSTEM_INCLUDE_DIR /* Some systems have an extra dir of include files. */ - { SYSTEM_INCLUDE_DIR, 0, 0, 0 }, + { SYSTEM_INCLUDE_DIR, 0, 0, 0, 1 }, #endif #ifdef STANDARD_INCLUDE_DIR /* /usr/include comes dead last. */ - { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0 }, + { STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 1 }, #endif - { 0, 0, 0, 0 } + { 0, 0, 0, 0, 0 } }; #endif /* no INCLUDE_DEFAULTS */ @@ -83,3 +83,9 @@ const size_t cpp_GCC_INCLUDE_DIR_len = sizeof GCC_INCLUDE_DIR - 8; const char cpp_GCC_INCLUDE_DIR[] = ""; const size_t cpp_GCC_INCLUDE_DIR_len = 0; #endif + +#ifdef TARGET_SYSTEM_ROOT +const char *cpp_SYSROOT = TARGET_SYSTEM_ROOT; +#else +const char *cpp_SYSROOT = ""; +#endif |