[92242] trunk/dports/devel/cctools

jeremyhu at macports.org jeremyhu at macports.org
Sun Apr 22 03:44:46 PDT 2012


Revision: 92242
          https://trac.macports.org/changeset/92242
Author:   jeremyhu at macports.org
Date:     2012-04-22 03:44:45 -0700 (Sun, 22 Apr 2012)
Log Message:
-----------
cctools: Fix cctools-822 build when requested without LTO support

Modified Paths:
--------------
    trunk/dports/devel/cctools/Portfile

Added Paths:
-----------
    trunk/dports/devel/cctools/files/cctools-822-no-lto.patch

Modified: trunk/dports/devel/cctools/Portfile
===================================================================
--- trunk/dports/devel/cctools/Portfile	2012-04-22 10:27:31 UTC (rev 92241)
+++ trunk/dports/devel/cctools/Portfile	2012-04-22 10:44:45 UTC (rev 92242)
@@ -23,7 +23,7 @@
 depends_lib             port:cctools-headers
 depends_build           path:lib/libprunetrie.a:ld64
 
-patchfiles              PR-11136237.patch lto.patch
+patchfiles              PR-11136237.patch lto.patch cctools-822-no-lto.patch
 
 if {${os.arch} == "powerpc"} {
     # XCode 3.1.4
@@ -36,7 +36,7 @@
 
     depends_build-delete path:lib/libprunetrie.a:ld64
 
-    patchfiles-delete   PR-11136237.patch
+    patchfiles-delete   PR-11136237.patch cctools-822-no-lto.patch
     patchfiles-append   patch-misc_libtool.c.diff PR-11136237-698.1.patch
 
 } elseif {${os.major} == 8} {
@@ -50,6 +50,7 @@
 
     depends_build-delete path:lib/libprunetrie.a:ld64
 
+    patchfiles-delete   cctools-822-no-lto.patch
     patchfiles-append   PR-9087924.patch PR-9830754.patch
 }
 

Added: trunk/dports/devel/cctools/files/cctools-822-no-lto.patch
===================================================================
--- trunk/dports/devel/cctools/files/cctools-822-no-lto.patch	                        (rev 0)
+++ trunk/dports/devel/cctools/files/cctools-822-no-lto.patch	2012-04-22 10:44:45 UTC (rev 92242)
@@ -0,0 +1,34 @@
+--- misc/lipo.c.orig	2012-04-22 03:41:01.000000000 -0700
++++ misc/lipo.c	2012-04-22 03:42:03.000000000 -0700
+@@ -1195,6 +1195,7 @@ struct input_file *input)
+ 		thin->fat_arch.align = 0;
+ 	    }
+ 	    else{
++#ifdef LTO_SUPPORT
+ 		if(is_llvm_bitcode_from_memory(addr, size, &input->arch_flag,
+ 					       NULL) != 0){
+ 		    /* create a thin file struct for it */
+@@ -1208,6 +1209,7 @@ struct input_file *input)
+ 		    thin->fat_arch.align = 0;
+ 		}
+ 		else
++#endif
+ 		    fatal("can't figure out the architecture type of: %s",
+ 			  input->name);
+ 	    }
+@@ -1448,6 +1450,7 @@ cpu_subtype_t *cpusubtype)
+ 		    if(strncmp(ar_name, SYMDEF, sizeof(SYMDEF) - 1) != 0){
+ 			ar_addr = addr + offset + ar_name_size;
+ 			ar_size = strtoul(ar_hdr->ar_size, NULL, 10);
++#ifdef LTO_SUPPORT
+ 			if(is_llvm_bitcode_from_memory(ar_addr, ar_size,
+ 						       &arch_flag, NULL) != 0){
+ 			    if(*cputype == 0){
+@@ -1465,6 +1468,7 @@ cpu_subtype_t *cpusubtype)
+ 				      (*cpusubtype) & ~CPU_SUBTYPE_MASK);
+ 			    }
+ 			}
++#endif
+ 		    }
+ 		}
+ 	    } 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120422/580b15f7/attachment.html>


More information about the macports-changes mailing list