[llvm-commits] [llvm-gcc-4.2] r56120 - in /llvm-gcc-4.2/trunk/gcc: c-incpath.c target-def.h
Devang Patel
dpatel at apple.com
Thu Sep 11 13:41:08 PDT 2008
Author: dpatel
Date: Thu Sep 11 15:41:07 2008
New Revision: 56120
URL: http://llvm.org/viewvc/llvm-project?rev=56120&view=rev
Log:
Add target hook to handle -isysroot.
Modified:
llvm-gcc-4.2/trunk/gcc/c-incpath.c
llvm-gcc-4.2/trunk/gcc/target-def.h
Modified: llvm-gcc-4.2/trunk/gcc/c-incpath.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c-incpath.c?rev=56120&r1=56119&r2=56120&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-incpath.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-incpath.c Thu Sep 11 15:41:07 2008
@@ -32,6 +32,8 @@
#include "cppdefault.h"
/* APPLE LOCAL headermaps 3871393 */
#include "errors.h"
+/* LLVM LOCAL sysroot */
+#include "target-def.h"
/* Windows does not natively support inodes, and neither does MSDOS.
Cygwin's emulation can generate non-unique inodes, so don't use it.
@@ -124,6 +126,13 @@
}
}
+/* LLVM LOCAL begin sysroot */
+static char *
+default_build_sysroot_path(const char *sysroot, const char *path) {
+ return concat (sysroot, path, NULL);
+}
+/* LLVM LOCAL end sysroot */
+
/* Append the standard include chain defined in cppdefault.c. */
static void
add_standard_paths (const char *sysroot, const char *iprefix,
@@ -165,7 +174,8 @@
/* Should this directory start with the sysroot? */
if (sysroot && p->add_sysroot)
- str = concat (sysroot, p->fname, NULL);
+ /* LLVM LOCAL sysroot */
+ str = TARGET_BUILD_SYSROOT_PATH(sysroot, p->fname);
else
str = update_path (p->fname, p->component);
Modified: llvm-gcc-4.2/trunk/gcc/target-def.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/target-def.h?rev=56120&r1=56119&r2=56120&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/target-def.h (original)
+++ llvm-gcc-4.2/trunk/gcc/target-def.h Thu Sep 11 15:41:07 2008
@@ -759,5 +759,7 @@
/* APPLE LOCAL end radar 5155743, mainline candidate */ \
}
+/* LLVM LOCAL sysroot */
+#define TARGET_BUILD_SYSROOT_PATH(S,P) default_build_sysroot_path((S), (P))
#include "hooks.h"
#include "targhooks.h"
More information about the llvm-commits
mailing list