diff options
author | Devang Patel <dpatel@apple.com> | 2004-11-24 09:47:32 -0800 |
---|---|---|
committer | Devang Patel <dpatel@gcc.gnu.org> | 2004-11-24 09:47:32 -0800 |
commit | 479ec1d1e046ba967cb712b7421dcb299733f4aa (patch) | |
tree | ea366309ad8043d0c8ca90046334475e8522bf10 /gcc/config/darwin-c.c | |
parent | b0896d72f0bad01f440692c69003962200806e31 (diff) | |
download | gcc-479ec1d1e046ba967cb712b7421dcb299733f4aa.zip gcc-479ec1d1e046ba967cb712b7421dcb299733f4aa.tar.gz gcc-479ec1d1e046ba967cb712b7421dcb299733f4aa.tar.bz2 |
gcc.h (DEFAULT_WORD_SWITCH_TAKES_ARG): Add isysroot.
PR/18555
* gcc.h (DEFAULT_WORD_SWITCH_TAKES_ARG): Add isysroot.
* config/darwin-c.c (darwin_register_frameworks): Use sysroot.
testsuite
* gcc.dg/cpp/isysroot-1.c: New test.
* gcc.dg/cpp/usr/include/stdio.h: New file.
* gcc.dg/cpp/isysroot-2.c: New test.
* gcc.dg/cpp/System/Library/Framework/Carbon.framework/Headers/Carbon.h:
New file.
From-SVN: r91178
Diffstat (limited to 'gcc/config/darwin-c.c')
-rw-r--r-- | gcc/config/darwin-c.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c index 167b795..feb26f1 100644 --- a/gcc/config/darwin-c.c +++ b/gcc/config/darwin-c.c @@ -468,7 +468,7 @@ darwin_register_objc_includes (const char *sysroot, const char *iprefix, frameworks had been registered. */ void -darwin_register_frameworks (const char *sysroot ATTRIBUTE_UNUSED, +darwin_register_frameworks (const char *sysroot, const char *iprefix ATTRIBUTE_UNUSED, int stdinc) { if (stdinc) @@ -478,8 +478,13 @@ darwin_register_frameworks (const char *sysroot ATTRIBUTE_UNUSED, /* Setup default search path for frameworks. */ for (i=0; i<sizeof (framework_defaults)/sizeof(const char *); ++i) { + char *str; + if (sysroot) + str = concat (sysroot, xstrdup (framework_defaults [i]), NULL); + else + str = xstrdup (framework_defaults[i]); /* System Framework headers are cxx aware. */ - add_system_framework_path (xstrdup (framework_defaults[i])); + add_system_framework_path (str); } } |