+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.
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)
/* 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);
}
}
|| !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"))
+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
--- /dev/null
+/* Used by gcc.dg/cpp/isysroot-2.c to test isysroot. */
+void foo()
+{
+}
--- /dev/null
+/* { 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;
+}
--- /dev/null
+/* { 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;
+}
--- /dev/null
+/* Used by gcc.dg/cpp/isysroot-1.c to test isysroot. */
+void foo()
+{
+}