[93186] trunk/dports/lang/apple-gcc42/files/incpath.patch
royliu at macports.org
royliu at macports.org
Thu May 17 03:07:13 PDT 2012
Revision: 93186
https://trac.macports.org/changeset/93186
Author: royliu at macports.org
Date: 2012-05-17 03:07:13 -0700 (Thu, 17 May 2012)
Log Message:
-----------
apple-gcc42: make further behavioral changes for the case when the "-isysroot" option is present
Modified Paths:
--------------
trunk/dports/lang/apple-gcc42/files/incpath.patch
Modified: trunk/dports/lang/apple-gcc42/files/incpath.patch
===================================================================
--- trunk/dports/lang/apple-gcc42/files/incpath.patch 2012-05-17 09:41:20 UTC (rev 93185)
+++ trunk/dports/lang/apple-gcc42/files/incpath.patch 2012-05-17 10:07:13 UTC (rev 93186)
@@ -1,6 +1,6 @@
--- gcc/c-incpath.c.orig 2011-11-06 23:49:39.000000000 -0500
+++ gcc/c-incpath.c 2011-11-06 23:49:39.000000000 -0500
-@@ -164,10 +164,25 @@
+@@ -164,10 +164,30 @@
char *str;
/* Should this directory start with the sysroot? */
@@ -8,21 +8,26 @@
- str = concat (sysroot, p->fname, NULL);
- else
+ if (sysroot && p->add_sysroot) {
++ if (false) {
++ }
+ /* Don't append the MacPorts prefix to the sysroot, and instead use
+ "/usr/include". This is because the "-isysroot" option almost always
+ refers to an Mac OS X SDK which is structured that way. */
-+ const char *fname;
-+
+ #ifdef PREFIX_INCLUDE_DIR
-+ if (!strcmp(p->fname, PREFIX_INCLUDE_DIR)) {
-+ fname = "/usr/include";
-+ } else {
++ else if (!strcmp (p->fname, PREFIX_INCLUDE_DIR)) {
++ str = concat (sysroot, "/usr/include", NULL);
++ }
+ #endif
-+ fname = p->fname;
-+ #ifdef PREFIX_INCLUDE_DIR
++ /* Don't append the MacPorts compiler's include directory to the
++ sysroot, and instead use it as-is. This is because the "-isysroot"
++ option almost always refers to an Mac OS X SDK which surely does not
++ contain a hierarchy for the compiler in question. */
++ else if (!strcmp (p->fname, cpp_GCC_INCLUDE_DIR)) {
++ str = (char *) cpp_GCC_INCLUDE_DIR;
+ }
-+ #endif
-+ str = concat (sysroot, fname, NULL);
++ else {
++ str = concat (sysroot, p->fname, NULL);
++ }
+ } else {
str = update_path (p->fname, p->component);
+ }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120517/e1af53a6/attachment.html>
More information about the macports-changes
mailing list