diff options
author | dpatel <dpatel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-24 17:47:32 +0000 |
---|---|---|
committer | dpatel <dpatel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-24 17:47:32 +0000 |
commit | 70593ce1fcb64d433107932af0211c961d7ec07c (patch) | |
tree | ea366309ad8043d0c8ca90046334475e8522bf10 | |
parent | bd897384a0835ada7ae79ec0bd9dcd803e519adc (diff) | |
download | gcc-70593ce1fcb64d433107932af0211c961d7ec07c.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91178 138bc75d-0d04-0410-961f-82ee72b054a4
-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 a8abc40bab7..62854cdae1c 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 167b7958c84..feb26f185d2 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); } } diff --git a/gcc/gcc.h b/gcc/gcc.h index d29af91001c..6c3c9829cbc 100644 --- a/gcc/gcc.h +++ b/gcc/gcc.h @@ -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 6a98976fcf6..cb68c281d22 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 00000000000..4259c3718fa --- /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 00000000000..bfbf25565e5 --- /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 00000000000..a32618c2512 --- /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 00000000000..c674e89f7ef --- /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() +{ +} |