diff options
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/darwin-c.c | 9 | ||||
-rw-r--r-- | gcc/gcc.h | 1 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/isysroot-1.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/isysroot-2.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/usr/include/stdio.h | 4 |
8 files changed, 51 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a8abc40..62854cd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2004-11-24 Devang Patel <dpatel@apple.com> + PR/18555 + * gcc.h (DEFAULT_WORD_SWITCH_TAKES_ARG): Add isysroot. + * config/darwin-c.c (darwin_register_frameworks): Use sysroot. + +2004-11-24 Devang Patel <dpatel@apple.com> + * gcc.c (process_command): Supply -v to linker. 2004-11-24 David Edelsohn <edelsohn@gnu.org> 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); } } @@ -49,6 +49,7 @@ struct spec_function || !strcmp (STR, "idirafter") || !strcmp (STR, "iprefix") \ || !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \ || !strcmp (STR, "iquote") || !strcmp (STR, "isystem") \ + || !strcmp (STR, "isysroot") \ || !strcmp (STR, "-param") || !strcmp (STR, "specs") \ || !strcmp (STR, "MF") || !strcmp (STR, "MT") || !strcmp (STR, "MQ")) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 6a98976..cb68c28 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2004-11-24 Devang Patel <dpatel@apple.com> + + PR/18555 + * 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. + 2004-11-24 Giovanni Bajo <giovannibajo@gcc.gnu.org> PR c++/8929 diff --git a/gcc/testsuite/gcc.dg/cpp/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h b/gcc/testsuite/gcc.dg/cpp/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h new file mode 100644 index 0000000..4259c37 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/System/Library/Frameworks/Carbon.framework/Headers/Carbon.h @@ -0,0 +1,4 @@ +/* Used by gcc.dg/cpp/isysroot-2.c to test isysroot. */ +void foo() +{ +} diff --git a/gcc/testsuite/gcc.dg/cpp/isysroot-1.c b/gcc/testsuite/gcc.dg/cpp/isysroot-1.c new file mode 100644 index 0000000..bfbf255 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/isysroot-1.c @@ -0,0 +1,10 @@ +/* { dg-options "-isysroot ${srcdir}/gcc.dg/cpp" } */ +/* { dg-do compile } */ + +#include <stdio.h> +int main() +{ + /* Special stdio.h supplies function foo. */ + void (*x)(void) = foo; + return 0; +} diff --git a/gcc/testsuite/gcc.dg/cpp/isysroot-2.c b/gcc/testsuite/gcc.dg/cpp/isysroot-2.c new file mode 100644 index 0000000..a32618c --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/isysroot-2.c @@ -0,0 +1,10 @@ +/* { dg-options "-isysroot ${srcdir}/gcc.dg/cpp" { target *-*-darwin* } } */ +/* { dg-do compile } */ + +#include <Carbon/Carbon.h> +int main() +{ + /* Special Carbon.h supplies function foo. */ + void (*x)(void) = foo; + return 0; +} diff --git a/gcc/testsuite/gcc.dg/cpp/usr/include/stdio.h b/gcc/testsuite/gcc.dg/cpp/usr/include/stdio.h new file mode 100644 index 0000000..c674e89 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/usr/include/stdio.h @@ -0,0 +1,4 @@ +/* Used by gcc.dg/cpp/isysroot-1.c to test isysroot. */ +void foo() +{ +} |