diff options
author | Andrew Pinski <pinskia@physics.uc.edu> | 2004-09-16 06:49:59 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2004-09-15 23:49:59 -0700 |
commit | 3dd53121bd70fdcc8eb33cb4639eb9272c2b930f (patch) | |
tree | eea8e6b301cfcc78ad08dad2ffb1c0dc3348acdd /gcc/c-incpath.c | |
parent | 511bbc8f91882da77dfb2026bbed3ee94df4f731 (diff) | |
download | gcc-3dd53121bd70fdcc8eb33cb4639eb9272c2b930f.zip gcc-3dd53121bd70fdcc8eb33cb4639eb9272c2b930f.tar.gz gcc-3dd53121bd70fdcc8eb33cb4639eb9272c2b930f.tar.bz2 |
re PR libobjc/11572 (GNU libobjc no longer compiled on Darwin)
2004-09-15 Andrew Pinski <pinskia@physics.uc.edu>
PR target/11572
* c-incpath.h (target_c_incpath_s): Add extra_pre_includes.
Add two parameters to extra_includes.
(C_INCPATH_INIT): Remove.
* c-incpath.c (register_include_chains): Call extra_pre_includes
before adding the standard include directory.
Update call to extra_includes.
(!defined TARGET_EXTRA_INCLUDES): Update
hook_void_charptr_charptr_int and add !define
TARGET_EXTRA_PRE_INCLUDES.
(!define TARGET_EXTRA_INCLUDES): Define as
hook_void_charptr_charptr_int.
(!define TARGET_EXTRA_PRE_INCLUDES): Likewise.
(target_c_incpath): Always declare.
* fixinclude.c (defined TARGET_EXTRA_INCLUDES): Declare a
empty function.
(define TARGET_EXTRA_PRE_INCLUDES): Likewise.
* config/darwin.h: (darwin_register_frameworks): Update for
the two new parameters.
(darwin_register_objc_includes): Add prototype.
(TARGET_EXTRA_PRE_INCLUDES): Define.
* config/darwin-c.c (darwin_register_objc_includes): New function.
(darwin_register_frameworks): Update for the two new parameters.
(target_c_incpath): Remove.
* config/t-darwin (darwin-c.o): Add $(PREPROCESSOR_DEFINES) to
the compile line.
* doc/tm.texi (TARGET_EXTRA_INCLUDES): Document the two new
parameters.
(TARGET_EXTRA_PRE_INCLUDES): Document.
* gcc.c (spec_function): Add replace-outfile.
(replace_outfile_spec_function): New function.
* config/darwin.h (LINK_SPEC): Add replace
-lobjc with -lobjc-gnu if -fgnu-runtime is
supplied.
* invoke.texi (replace-outfile): Document.
From-SVN: r87588
Diffstat (limited to 'gcc/c-incpath.c')
-rw-r--r-- | gcc/c-incpath.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/gcc/c-incpath.c b/gcc/c-incpath.c index 1a985f9..4fd1b13 100644 --- a/gcc/c-incpath.c +++ b/gcc/c-incpath.c @@ -372,21 +372,34 @@ register_include_chains (cpp_reader *pfile, const char *sysroot, include chain. */ add_env_var_paths ("CPATH", BRACKET); add_env_var_paths (lang_env_vars[idx], SYSTEM); + + target_c_incpath.extra_pre_includes (sysroot, iprefix, stdinc); /* Finally chain on the standard directories. */ if (stdinc) add_standard_paths (sysroot, iprefix, cxx_stdinc); - target_c_incpath.extra_includes (stdinc); + target_c_incpath.extra_includes (sysroot, iprefix, stdinc); merge_include_chains (pfile, verbose); cpp_set_include_chains (pfile, heads[QUOTE], heads[BRACKET], quote_ignores_source_dir); } +#if !(defined TARGET_EXTRA_INCLUDES) || !(defined TARGET_EXTRA_PRE_INCLUDES) +static void hook_void_charptr_charptr_int (const char *sysroot ATTRIBUTE_UNUSED, + const char *iprefix ATTRIBUTE_UNUSED, + int stdinc ATTRIBUTE_UNUSED) +{ +} +#endif #ifndef TARGET_EXTRA_INCLUDES -static void hook_void_int(int u ATTRIBUTE_UNUSED) { } - -struct target_c_incpath_s target_c_incpath = { hook_void_int }; +#define TARGET_EXTRA_INCLUDES hook_void_charptr_charptr_int #endif +#ifndef TARGET_EXTRA_PRE_INCLUDES +#define TARGET_EXTRA_PRE_INCLUDES hook_void_charptr_charptr_int +#endif + +struct target_c_incpath_s target_c_incpath = { TARGET_EXTRA_PRE_INCLUDES, TARGET_EXTRA_INCLUDES }; + |