[123756] trunk/dports/devel/ld64

jeremyhu at macports.org jeremyhu at macports.org
Wed Aug 13 15:58:39 PDT 2014


Revision: 123756
          https://trac.macports.org/changeset/123756
Author:   jeremyhu at macports.org
Date:     2014-08-13 15:58:39 -0700 (Wed, 13 Aug 2014)
Log Message:
-----------
ld64: Don't warn about -mlong-branch for crt1.o (#44607)

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

Added Paths:
-----------
    trunk/dports/devel/ld64/files/ld64-127-long-branch-warn.patch
    trunk/dports/devel/ld64/files/ld64-97-long-branch-warn.patch

Modified: trunk/dports/devel/ld64/Portfile
===================================================================
--- trunk/dports/devel/ld64/Portfile	2014-08-13 22:52:07 UTC (rev 123755)
+++ trunk/dports/devel/ld64/Portfile	2014-08-13 22:58:39 UTC (rev 123756)
@@ -91,7 +91,7 @@
     # XCode 3.2.6
     # 127.2 should work for powerpc, but it will require some build fixes.
     version             97.17
-    revision            2
+    revision            3
     checksums           rmd160  d52df7d7f741c8bedd29cbac73dbb9db992b4795 \
                         sha256  02bd46af0809eaa415d096d7d41c3e8e7d80f7d8d181840866fb87f036b4e089
     supported_archs     x86_64 i386 ppc
@@ -99,12 +99,12 @@
     set makefile	"Makefile-97"
 
     patchfiles-delete   ld64-133-no-CrashReporterClient.h.patch ld64-134-missing-include.patch ld64-136-i386-badAddress.patch PR-16935960.patch PR-16936488.patch
-    patchfiles-append   ld64-97-no-LTO.patch ld64-97-ppc-branch-island.patch ld64-97-arm_types_PR38931.patch
+    patchfiles-append   ld64-97-no-LTO.patch ld64-97-ppc-branch-island.patch ld64-97-arm_types_PR38931.patch ld64-97-long-branch-warn.patch
 } elseif {${os.major} < 10} {
     # XCode 4.2
     # This was the last ld64 release that supported linking ppc executables.
     version             127.2
-    revision            6
+    revision            7
     checksums           rmd160  8ee709341549a1944732daef6ebab7ef1acfcc6e \
                         sha256  97b75547b2bd761306ab3e15ae297f01e7ab9760b922bc657f4ef72e4e052142
     supported_archs     i386 x86_64
@@ -112,7 +112,7 @@
     set makefile	"Makefile-127"
 
     patchfiles-delete   ld64-133-no-CrashReporterClient.h.patch ld64-136-i386-badAddress.patch PR-16935960.patch PR-16936488.patch
-    patchfiles-append   ld64-127-any-cctools.patch
+    patchfiles-append   ld64-127-any-cctools.patch ld64-127-long-branch-warn.patch
 } elseif {${os.major} < 11} {
     # XCode 4.6
     # Until we figure out a way to better bootstrap ld64-236 on SnowLeopard or fix its build failure

Added: trunk/dports/devel/ld64/files/ld64-127-long-branch-warn.patch
===================================================================
--- trunk/dports/devel/ld64/files/ld64-127-long-branch-warn.patch	                        (rev 0)
+++ trunk/dports/devel/ld64/files/ld64-127-long-branch-warn.patch	2014-08-13 22:58:39 UTC (rev 123756)
@@ -0,0 +1,13 @@
+https://trac.macports.org/ticket/44607
+
+--- src/ld/parsers/macho_relocatable_file.cpp	2011-07-26 17:10:35.000000000 -0700
++++ src/ld/parsers/macho_relocatable_file.cpp	2014-08-11 09:55:48.000000000 -0700
+@@ -5811,7 +5811,7 @@ bool Section<A>::addRelocFixup_powerpc(c
+ 				// this is from -mlong-branch codegen.  We ignore the jump island and make reference to the real target
+ 				if ( nextReloc->r_type() != PPC_RELOC_PAIR ) 
+ 					throw "PPC_RELOC_JBSR missing following pair";
+-				if ( !parser._hasLongBranchStubs )
++				if ( !parser._hasLongBranchStubs && !strstr(parser._path, "/usr/lib/crt1.o") )
+ 					warning("object file compiled with -mlong-branch which is no longer needed. "
+ 							"To remove this warning, recompile without -mlong-branch: %s", parser._path);
+ 				parser._hasLongBranchStubs = true;

Added: trunk/dports/devel/ld64/files/ld64-97-long-branch-warn.patch
===================================================================
--- trunk/dports/devel/ld64/files/ld64-97-long-branch-warn.patch	                        (rev 0)
+++ trunk/dports/devel/ld64/files/ld64-97-long-branch-warn.patch	2014-08-13 22:58:39 UTC (rev 123756)
@@ -0,0 +1,13 @@
+https://trac.macports.org/ticket/44607
+
+--- src/ld/MachOReaderRelocatable.hpp	2010-01-26 10:42:37.000000000 -0800
++++ src/ld/MachOReaderRelocatable.hpp	2014-08-11 09:51:12.000000000 -0700
+@@ -4517,7 +4517,7 @@ bool Reader<A>::addRelocReference_powerp
+ 				if ( nextReloc->r_type() != PPC_RELOC_PAIR ) {
+ 					throw "PPC_RELOC_JBSR missing following pair";
+ 				}
+-				if ( !fHasLongBranchStubs )
++				if ( !fHasLongBranchStubs && !strstr(fPath, "/usr/lib/crt1.o") )
+ 					warning("object file compiled with -mlong-branch which is no longer needed. To remove this warning, recompile without -mlong-branch: %s", fPath);
+ 				fHasLongBranchStubs = true;
+ 				result = true;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140813/63793bb7/attachment.html>


More information about the macports-changes mailing list