Ticket #44607: PR-44607.patch

File PR-44607.patch, 3.8 KB (added by jeremyhu (Jeremy Huddleston Sequoia), 10 years ago)

PR-44607.patch

  • Portfile

     
    9191    # XCode 3.2.6
    9292    # 127.2 should work for powerpc, but it will require some build fixes.
    9393    version             97.17
    94     revision            2
     94    revision            3
    9595    checksums           rmd160  d52df7d7f741c8bedd29cbac73dbb9db992b4795 \
    9696                        sha256  02bd46af0809eaa415d096d7d41c3e8e7d80f7d8d181840866fb87f036b4e089
    9797    supported_archs     x86_64 i386 ppc
     
    9999    set makefile        "Makefile-97"
    100100
    101101    patchfiles-delete   ld64-133-no-CrashReporterClient.h.patch ld64-134-missing-include.patch ld64-136-i386-badAddress.patch PR-16935960.patch PR-16936488.patch
    102     patchfiles-append   ld64-97-no-LTO.patch ld64-97-ppc-branch-island.patch ld64-97-arm_types_PR38931.patch
     102    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
    103103} elseif {${os.major} < 10} {
    104104    # XCode 4.2
    105105    # This was the last ld64 release that supported linking ppc executables.
    106106    version             127.2
    107     revision            6
     107    revision            7
    108108    checksums           rmd160  8ee709341549a1944732daef6ebab7ef1acfcc6e \
    109109                        sha256  97b75547b2bd761306ab3e15ae297f01e7ab9760b922bc657f4ef72e4e052142
    110110    supported_archs     i386 x86_64
     
    112112    set makefile        "Makefile-127"
    113113
    114114    patchfiles-delete   ld64-133-no-CrashReporterClient.h.patch ld64-136-i386-badAddress.patch PR-16935960.patch PR-16936488.patch
    115     patchfiles-append   ld64-127-any-cctools.patch
     115    patchfiles-append   ld64-127-any-cctools.patch ld64-127-long-branch-warn.patch
    116116} elseif {${os.major} < 11} {
    117117    # XCode 4.6
    118118    # Until we figure out a way to better bootstrap ld64-236 on SnowLeopard or fix its build failure
  • files/ld64-127-long-branch-warn.patch

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

     
     1https://trac.macports.org/ticket/44607
     2
     3--- src/ld/MachOReaderRelocatable.hpp   2010-01-26 10:42:37.000000000 -0800
     4+++ src/ld/MachOReaderRelocatable.hpp   2014-08-11 09:51:12.000000000 -0700
     5@@ -4517,7 +4517,7 @@ bool Reader<A>::addRelocReference_powerp
     6                                if ( nextReloc->r_type() != PPC_RELOC_PAIR ) {
     7                                        throw "PPC_RELOC_JBSR missing following pair";
     8                                }
     9-                               if ( !fHasLongBranchStubs )
     10+                               if ( !fHasLongBranchStubs && !strstr(fPath, "/usr/lib/crt1.o") )
     11                                        warning("object file compiled with -mlong-branch which is no longer needed. To remove this warning, recompile without -mlong-branch: %s", fPath);
     12                                fHasLongBranchStubs = true;
     13                                result = true;