[92238] trunk/dports/devel/ld64

jeremyhu at macports.org jeremyhu at macports.org
Sun Apr 22 02:53:54 PDT 2012


Revision: 92238
          https://trac.macports.org/changeset/92238
Author:   jeremyhu at macports.org
Date:     2012-04-22 02:53:52 -0700 (Sun, 22 Apr 2012)
Log Message:
-----------
ld64: Fix building of ld64-127.2 with newer headers (#34158)

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

Added Paths:
-----------
    trunk/dports/devel/ld64/files/ld64-127-any-cctools.patch

Modified: trunk/dports/devel/ld64/Portfile
===================================================================
--- trunk/dports/devel/ld64/Portfile	2012-04-22 09:24:27 UTC (rev 92237)
+++ trunk/dports/devel/ld64/Portfile	2012-04-22 09:53:52 UTC (rev 92238)
@@ -75,6 +75,8 @@
     checksums           rmd160  8ee709341549a1944732daef6ebab7ef1acfcc6e \
                         sha256  97b75547b2bd761306ab3e15ae297f01e7ab9760b922bc657f4ef72e4e052142
     supported_archs     i386 x86_64
+
+    patchfiles-append   ld64-127-any-cctools.patch
 }
 
 xcode.target            all ObjectDump machocheck

Added: trunk/dports/devel/ld64/files/ld64-127-any-cctools.patch
===================================================================
--- trunk/dports/devel/ld64/files/ld64-127-any-cctools.patch	                        (rev 0)
+++ trunk/dports/devel/ld64/files/ld64-127-any-cctools.patch	2012-04-22 09:53:52 UTC (rev 92238)
@@ -0,0 +1,36 @@
+--- src/abstraction/MachOFileAbstraction.hpp
++++ src/abstraction/MachOFileAbstraction.hpp
+@@ -1278,8 +1278,13 @@ public:
+ 	uint32_t		version() const							INLINE { return fields.version; }
+ 	void			set_version(uint32_t value)				INLINE { E::set32(fields.version, value); }
+ 
+-	uint32_t		reserved() const						INLINE { return fields.reserved; }
+-	void			set_reserved(uint32_t value)			INLINE { E::set32(fields.reserved, value); }
++#ifdef LC_SOURCE_VERSION
++	uint32_t		sdk() const								INLINE { return fields.sdk; }
++	void			set_sdk(uint32_t value)					INLINE { E::set32(fields.sdk, value); }
++#else
++	uint32_t		sdk() const								INLINE { return fields.reserved; }
++	void			set_sdk(uint32_t value)					INLINE { E::set32(fields.reserved, value); }
++#endif
+ 
+ 	typedef typename P::E		E;
+ private:
+--- src/ld/HeaderAndLoadCommands.hpp
++++ src/ld/HeaderAndLoadCommands.hpp
+@@ -1006,13 +1006,13 @@ uint8_t* HeaderAndLoadCommandsAtom<A>::copyVersionLoadCommand(uint8_t* p) const
+ 		cmd->set_cmd(LC_VERSION_MIN_MACOSX);
+ 		cmd->set_cmdsize(sizeof(macho_version_min_command<P>));
+ 		cmd->set_version((uint32_t)macVersion);
+-		cmd->set_reserved(0);
++		cmd->set_sdk(0);
+ 	}
+ 	else {
+ 		cmd->set_cmd(LC_VERSION_MIN_IPHONEOS);
+ 		cmd->set_cmdsize(sizeof(macho_version_min_command<P>));
+ 		cmd->set_version((uint32_t)iOSVersion);
+-		cmd->set_reserved(0);
++		cmd->set_sdk(0);
+ 	}
+ 	return p + sizeof(macho_version_min_command<P>);
+ }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120422/a7c37255/attachment-0001.html>


More information about the macports-changes mailing list