[llvm-commits] [llvm-gcc-4.2] r56098 - /llvm-gcc-4.2/trunk/gcc/c-incpath.c
Nick Lewycky
nicholas at mxc.ca
Wed Sep 10 23:15:33 PDT 2008
Author: nicholas
Date: Thu Sep 11 01:15:33 2008
New Revision: 56098
URL: http://llvm.org/viewvc/llvm-project?rev=56098&view=rev
Log:
Revert r56071 as the cause of build breakage on linux.
Linux defines mempcpy only with <string.h> and _GNU_SOURCE defined.
Modified:
llvm-gcc-4.2/trunk/gcc/c-incpath.c
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=56098&r1=56097&r2=56098&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-incpath.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-incpath.c Thu Sep 11 01:15:33 2008
@@ -33,9 +33,6 @@
/* APPLE LOCAL headermaps 3871393 */
#include "errors.h"
-/* LLVM LOCAL fix MacOSX 10.5 SDK */
-extern char * mempcpy (char *dst, const char *src, size_t len);
-
/* Windows does not natively support inodes, and neither does MSDOS.
Cygwin's emulation can generate non-unique inodes, so don't use it.
VMS has non-numeric inodes. */
@@ -134,8 +131,6 @@
{
const struct default_include *p;
size_t len;
- /* LLVM LOCAL begin fix MacOSX 10.5 SDK */
- bool SDK10_5 = false;
if (iprefix && (len = cpp_GCC_INCLUDE_DIR_len) != 0)
{
@@ -162,9 +157,6 @@
}
}
- /* LLVM LOCAL begin fix MacOSX 10.5 SDK */
- if (sysroot && strstr(sysroot, "MacOSX10.5.sdk") != NULL)
- SDK10_5 = true;
for (p = cpp_include_defaults; p->fname; p++)
{
if (!p->cplusplus || cxx_stdinc)
@@ -172,32 +164,8 @@
char *str;
/* Should this directory start with the sysroot? */
- if (sysroot && p->add_sysroot) {
- if (SDK10_5) {
- char *d = strstr(p->fname, "apple-darwin");
- if (d) {
- /* Released 10.5 SDK uses header paths that include OS version
- number, for example 9 in
- .../MacOSX10.5.sdk/.../lib/gcc/i686-apple-darwin9/4.2.1/include
- However the 9 is constructed based on the host OS version on
- which the compiler is built. This means, the compiler will
- not be able to use 10.5 SDK unless it is built on 10.5 system.
- Fix header path here to make it work.
-
- The p->fname includes "apple-darwinXYZ/" substring. Replace
- this substring with "apple-darwin9/". */
- char *str1;
- str = XNEWVEC(char, strlen(sysroot) + strlen(p->fname) + 2);
- str1 = mempcpy(str, sysroot, strlen(sysroot));
- str1 = mempcpy(str1, p->fname, d - p->fname);
- str1 = mempcpy(str1, "apple-darwin9", strlen("apple-darwin9"));
- d = strchr(d, '/');
- str1 = mempcpy(str1, d, strlen(d));
- } else
- str = concat (sysroot, p->fname, NULL);
- } else
- str = concat (sysroot, p->fname, NULL);
- }
+ if (sysroot && p->add_sysroot)
+ str = concat (sysroot, p->fname, NULL);
else
str = update_path (p->fname, p->component);
@@ -207,7 +175,6 @@
add_path (str, SYSTEM, p->cxx_aware, false);
}
}
- /* LLVM LOCAL end fix MacOSX 10.5 SDK */
}
More information about the llvm-commits
mailing list