[106464] trunk/dports/devel/ld64
jeremyhu at macports.org
jeremyhu at macports.org
Mon May 27 11:07:56 PDT 2013
Revision: 106464
https://trac.macports.org/changeset/106464
Author: jeremyhu at macports.org
Date: 2013-05-27 11:07:56 -0700 (Mon, 27 May 2013)
Log Message:
-----------
ld64: Version bump to 136
Modified Paths:
--------------
trunk/dports/devel/ld64/Portfile
Added Paths:
-----------
trunk/dports/devel/ld64/files/ld64-136-hash_set.patch
trunk/dports/devel/ld64/files/ld64-136-i386-badAddress.patch
Removed Paths:
-------------
trunk/dports/devel/ld64/files/ld64-134-PR-36654.patch
Modified: trunk/dports/devel/ld64/Portfile
===================================================================
--- trunk/dports/devel/ld64/Portfile 2013-05-27 18:03:07 UTC (rev 106463)
+++ trunk/dports/devel/ld64/Portfile 2013-05-27 18:07:56 UTC (rev 106464)
@@ -6,9 +6,8 @@
# revbump cctools whenever this port updates
name ld64
-# XCode 4.5
-version 134.9
-revision 1
+# XCode 4.6
+version 136
categories devel
platforms darwin
maintainers jeremyhu
@@ -22,10 +21,10 @@
long_description ld64 combines several object files and libraries, \
resolves references, and produces an ouput file.
-checksums rmd160 9464743da9603af5e5a8f27c51e2fea177e0c1c5 \
- sha256 938bad7aa53999ca9e2b6e6d55a1ccbec0bd2afc743ce8c1a0e8f9ccc6d6df1b
+checksums rmd160 4a2930ccdd398b63a108810e90293ab96dc154a0 \
+ sha256 99d6c4acb6d4cdf45772951dd2308222aa966763170137459a9d276674645d9e
-patchfiles ld64-version.patch ld64-133-no-CrashReporterClient.h.patch ld64-134-PR-36654.patch ld64-134-missing-include.patch
+patchfiles ld64-version.patch ld64-133-no-CrashReporterClient.h.patch ld64-134-missing-include.patch ld64-136-i386-badAddress.patch
# We don't set llvmXX as the default variant on Tiger because it would introduce a
# dependency cycle as llvm requires apple-gcc42 and ld64 to build correctly. Users
@@ -82,7 +81,7 @@
set makefile "Makefile-97"
- patchfiles-delete ld64-133-no-CrashReporterClient.h.patch ld64-134-PR-36654.patch ld64-134-missing-include.patch
+ patchfiles-delete ld64-133-no-CrashReporterClient.h.patch ld64-134-missing-include.patch ld64-136-i386-badAddress.patch
patchfiles-append ld64-97-no-LTO.patch ld64-97-ppc-branch-island.patch
} elseif {${os.major} < 11} {
# XCode 4.2
@@ -95,8 +94,16 @@
set makefile "Makefile-127"
- patchfiles-delete ld64-133-no-CrashReporterClient.h.patch
+ patchfiles-delete ld64-133-no-CrashReporterClient.h.patch ld64-136-i386-badAddress.patch
patchfiles-append ld64-127-any-cctools.patch
+} else {
+ # The base version (ld64-136)
+ if {[string match *clang* ${configure.compiler}]} {
+ configure.cxxflags-append -stdlib=libc++
+ configure.ldflags-append -stdlib=libc++
+ } else {
+ patchfiles-append ld64-136-hash_set.patch
+ }
}
platform darwin 8 {
Deleted: trunk/dports/devel/ld64/files/ld64-134-PR-36654.patch
===================================================================
--- trunk/dports/devel/ld64/files/ld64-134-PR-36654.patch 2013-05-27 18:03:07 UTC (rev 106463)
+++ trunk/dports/devel/ld64/files/ld64-134-PR-36654.patch 2013-05-27 18:07:56 UTC (rev 106464)
@@ -1,11 +0,0 @@
---- src/ld/OutputFile.cpp
-+++ src/ld/OutputFile.cpp
-@@ -2421,6 +2421,8 @@ bool OutputFile::isPcRelStore(ld::Fixup::Kind kind)
- case ld::Fixup::kindStoreTargetAddressX86PCRel32:
- case ld::Fixup::kindStoreTargetAddressX86PCRel32GOTLoad:
- case ld::Fixup::kindStoreTargetAddressX86PCRel32GOTLoadNowLEA:
-+ case ld::Fixup::kindStoreTargetAddressX86PCRel32TLVLoad:
-+ case ld::Fixup::kindStoreTargetAddressX86PCRel32TLVLoadNowLEA:
- case ld::Fixup::kindStoreTargetAddressARMBranch24:
- case ld::Fixup::kindStoreTargetAddressThumbBranch22:
- case ld::Fixup::kindStoreTargetAddressARMLoad12:
Added: trunk/dports/devel/ld64/files/ld64-136-hash_set.patch
===================================================================
--- trunk/dports/devel/ld64/files/ld64-136-hash_set.patch (rev 0)
+++ trunk/dports/devel/ld64/files/ld64-136-hash_set.patch 2013-05-27 18:07:56 UTC (rev 106464)
@@ -0,0 +1,606 @@
+commit 8fe69df46f26076e7a5339f6ae505e19302a19d2
+Author: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
+Date: Mon May 27 10:24:39 2013 -0700
+
+ Don't use unordered_set without libc++
+
+diff --git a/src/ld/InputFiles.cpp b/src/ld/InputFiles.cpp
+index 7bf136b..6a81db2 100644
+--- src/ld/InputFiles.cpp
++++ src/ld/InputFiles.cpp
+@@ -49,6 +49,8 @@
+ #include <vector>
+ #include <list>
+ #include <algorithm>
++#include <ext/hash_map>
++#include <ext/hash_set>
+ #include <dlfcn.h>
+ #include <AvailabilityMacros.h>
+
+diff --git a/src/ld/InputFiles.h b/src/ld/InputFiles.h
+index 9b969ee..ff4fd86 100644
+--- src/ld/InputFiles.h
++++ src/ld/InputFiles.h
+@@ -103,7 +103,11 @@ private:
+ static void parseWorkerThread(InputFiles *inputFiles);
+ void startThread(void (*threadFunc)(InputFiles *)) const;
+
+- typedef std::unordered_map<const char*, ld::dylib::File*, CStringHash, CStringEquals> InstallNameToDylib;
++ class CStringEquals {
++ public:
++ bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
++ };
++ typedef __gnu_cxx::hash_map<const char*, ld::dylib::File*, __gnu_cxx::hash<const char*>, CStringEquals> InstallNameToDylib;
+
+ const Options& _options;
+ std::vector<ld::File*> _inputFiles;
+diff --git a/src/ld/LinkEditClassic.hpp b/src/ld/LinkEditClassic.hpp
+index 60a4fa9..4df2d5f 100644
+--- src/ld/LinkEditClassic.hpp
++++ src/ld/LinkEditClassic.hpp
+@@ -32,7 +32,6 @@
+ #include <unistd.h>
+
+ #include <vector>
+-#include <unordered_map>
+
+ #include "Options.h"
+ #include "ld.hpp"
+@@ -91,8 +90,13 @@ public:
+ uint32_t currentOffset();
+
+ private:
++ class CStringEquals
++ {
++ public:
++ bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
++ };
+ enum { kBufferSize = 0x01000000 };
+- typedef std::unordered_map<const char*, int32_t, CStringHash, CStringEquals> StringToOffset;
++ typedef __gnu_cxx::hash_map<const char*, int32_t, __gnu_cxx::hash<const char*>, CStringEquals> StringToOffset;
+
+ const uint32_t _pointerSize;
+ std::vector<char*> _fullBuffers;
+diff --git a/src/ld/Options.h b/src/ld/Options.h
+index 41e5653..4289e68 100644
+--- src/ld/Options.h
++++ src/ld/Options.h
+@@ -30,8 +30,8 @@
+ #include <mach/machine.h>
+
+ #include <vector>
+-#include <unordered_set>
+-#include <unordered_map>
++#include <ext/hash_set>
++#include <ext/hash_map>
+
+ #include "ld.hpp"
+ #include "Snapshot.h"
+@@ -342,8 +342,13 @@ public:
+ const char* pipelineFifo() const { return fPipelineFifo; }
+
+ private:
+- typedef std::unordered_map<const char*, unsigned int, ld::CStringHash, ld::CStringEquals> NameToOrder;
+- typedef std::unordered_set<const char*, ld::CStringHash, ld::CStringEquals> NameSet;
++ class CStringEquals
++ {
++ public:
++ bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
++ };
++ typedef __gnu_cxx::hash_map<const char*, unsigned int, __gnu_cxx::hash<const char*>, CStringEquals> NameToOrder;
++ typedef __gnu_cxx::hash_set<const char*, __gnu_cxx::hash<const char*>, CStringEquals> NameSet;
+ enum ExportMode { kExportDefault, kExportSome, kDontExportSome };
+ enum LibrarySearchMode { kSearchDylibAndArchiveInEachDir, kSearchAllDirsForDylibsThenAllDirsForArchives };
+ enum InterposeMode { kInterposeNone, kInterposeAllExternal, kInterposeSome };
+diff --git a/src/ld/OutputFile.cpp b/src/ld/OutputFile.cpp
+index 16fdd66..bacee09 100644
+--- src/ld/OutputFile.cpp
++++ src/ld/OutputFile.cpp
+@@ -50,7 +50,8 @@
+ #include <vector>
+ #include <list>
+ #include <algorithm>
+-#include <unordered_set>
++#include <ext/hash_map>
++#include <ext/hash_set>
+
+ #include <CommonCrypto/CommonDigest.h>
+ #include <AvailabilityMacros.h>
+@@ -3420,6 +3421,12 @@ public:
+ };
+
+
++class CStringEquals
++{
++public:
++ bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
++};
++
+ const char* OutputFile::assureFullPath(const char* path)
+ {
+ if ( path[0] == '/' )
+@@ -3505,7 +3512,7 @@ void OutputFile::synthesizeDebugNotes(ld::Internal& state)
+ const char* filename = NULL;
+ bool wroteStartSO = false;
+ state.stabs.reserve(atomsNeedingDebugNotes.size()*4);
+- std::unordered_set<const char*, CStringHash, CStringEquals> seenFiles;
++ __gnu_cxx::hash_set<const char*, __gnu_cxx::hash<const char*>, CStringEquals> seenFiles;
+ for (std::vector<const ld::Atom*>::iterator it=atomsNeedingDebugNotes.begin(); it != atomsNeedingDebugNotes.end(); it++) {
+ const ld::Atom* atom = *it;
+ const ld::File* atomFile = atom->file();
+diff --git a/src/ld/Resolver.cpp b/src/ld/Resolver.cpp
+index ad4b22d..4d80af8 100644
+--- src/ld/Resolver.cpp
++++ src/ld/Resolver.cpp
+@@ -47,6 +47,8 @@
+ #include <vector>
+ #include <list>
+ #include <algorithm>
++#include <ext/hash_map>
++#include <ext/hash_set>
+ #include <dlfcn.h>
+ #include <AvailabilityMacros.h>
+
+diff --git a/src/ld/Resolver.h b/src/ld/Resolver.h
+index 32d1d50..d71aed3 100644
+--- src/ld/Resolver.h
++++ src/ld/Resolver.h
+@@ -42,7 +42,6 @@
+ #include <mach-o/dyld.h>
+
+ #include <vector>
+-#include <unordered_set>
+
+ #include "Options.h"
+ #include "ld.hpp"
+@@ -100,7 +99,11 @@ private:
+ bool printReferencedBy(const char* name, SymbolTable::IndirectBindingSlot slot);
+ void tweakWeakness();
+
+- typedef std::unordered_set<const char*, CStringHash, CStringEquals> StringSet;
++ class CStringEquals {
++ public:
++ bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
++ };
++ typedef __gnu_cxx::hash_set<const char*, __gnu_cxx::hash<const char*>, CStringEquals> StringSet;
+
+ class NotLive {
+ public:
+diff --git a/src/ld/SymbolTable.cpp b/src/ld/SymbolTable.cpp
+index 2ea690f..406556a 100644
+--- src/ld/SymbolTable.cpp
++++ src/ld/SymbolTable.cpp
+@@ -41,6 +41,8 @@
+ #include <set>
+ #include <vector>
+ #include <algorithm>
++#include <ext/hash_map>
++#include <ext/hash_set>
+
+ #include "Options.h"
+
+@@ -746,7 +748,7 @@ void SymbolTable::printStatistics()
+ count[b] = 0;
+ }
+ for(unsigned int i=0; i < _cstringTable.bucket_count(); ++i) {
+- unsigned int n = _cstringTable.bucket_size(i);
++ unsigned int n = _cstringTable.elems_in_bucket(i);
+ if ( n < 10 )
+ count[n] += 1;
+ else
+diff --git a/src/ld/SymbolTable.h b/src/ld/SymbolTable.h
+index 5575f31..451d064 100644
+--- src/ld/SymbolTable.h
++++ src/ld/SymbolTable.h
+@@ -42,7 +42,7 @@
+ #include <mach-o/dyld.h>
+
+ #include <vector>
+-#include <unordered_map>
++#include <ext/hash_map>
+
+ #include "Options.h"
+ #include "ld.hpp"
+@@ -57,38 +57,42 @@ public:
+ typedef uint32_t IndirectBindingSlot;
+
+ private:
+- typedef std::unordered_map<const char*, IndirectBindingSlot, CStringHash, CStringEquals> NameToSlot;
++ class CStringEquals {
++ public:
++ bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
++ };
++ typedef __gnu_cxx::hash_map<const char*, IndirectBindingSlot, __gnu_cxx::hash<const char*>, CStringEquals> NameToSlot;
+
+ class ContentFuncs {
+ public:
+ size_t operator()(const ld::Atom*) const;
+ bool operator()(const ld::Atom* left, const ld::Atom* right) const;
+ };
+- typedef std::unordered_map<const ld::Atom*, IndirectBindingSlot, ContentFuncs, ContentFuncs> ContentToSlot;
++ typedef __gnu_cxx::hash_map<const ld::Atom*, IndirectBindingSlot, ContentFuncs, ContentFuncs> ContentToSlot;
+
+ class ReferencesHashFuncs {
+ public:
+ size_t operator()(const ld::Atom*) const;
+ bool operator()(const ld::Atom* left, const ld::Atom* right) const;
+ };
+- typedef std::unordered_map<const ld::Atom*, IndirectBindingSlot, ReferencesHashFuncs, ReferencesHashFuncs> ReferencesToSlot;
++ typedef __gnu_cxx::hash_map<const ld::Atom*, IndirectBindingSlot, ReferencesHashFuncs, ReferencesHashFuncs> ReferencesToSlot;
+
+ class CStringHashFuncs {
+ public:
+ size_t operator()(const ld::Atom*) const;
+ bool operator()(const ld::Atom* left, const ld::Atom* right) const;
+ };
+- typedef std::unordered_map<const ld::Atom*, IndirectBindingSlot, CStringHashFuncs, CStringHashFuncs> CStringToSlot;
++ typedef __gnu_cxx::hash_map<const ld::Atom*, IndirectBindingSlot, CStringHashFuncs, CStringHashFuncs> CStringToSlot;
+
+ class UTF16StringHashFuncs {
+ public:
+ size_t operator()(const ld::Atom*) const;
+ bool operator()(const ld::Atom* left, const ld::Atom* right) const;
+ };
+- typedef std::unordered_map<const ld::Atom*, IndirectBindingSlot, UTF16StringHashFuncs, UTF16StringHashFuncs> UTF16StringToSlot;
++ typedef __gnu_cxx::hash_map<const ld::Atom*, IndirectBindingSlot, UTF16StringHashFuncs, UTF16StringHashFuncs> UTF16StringToSlot;
+
+ typedef std::map<IndirectBindingSlot, const char*> SlotToName;
+- typedef std::unordered_map<const char*, CStringToSlot*, CStringHash, CStringEquals> NameToMap;
++ typedef __gnu_cxx::hash_map<const char*, CStringToSlot*, __gnu_cxx::hash<const char*>, CStringEquals> NameToMap;
+
+ typedef std::vector<const ld::Atom *> DuplicatedSymbolAtomList;
+ typedef std::map<const char *, DuplicatedSymbolAtomList * > DuplicateSymbols;
+diff --git a/src/ld/ld.cpp b/src/ld/ld.cpp
+index a5db06e..1a234db 100644
+--- src/ld/ld.cpp
++++ src/ld/ld.cpp
+@@ -54,7 +54,8 @@ extern "C" double log2 ( double );
+ #include <vector>
+ #include <list>
+ #include <algorithm>
+-#include <unordered_map>
++#include <ext/hash_map>
++#include <ext/hash_set>
+ #include <cxxabi.h>
+
+ #include "Options.h"
+@@ -146,7 +147,7 @@ private:
+ struct SectionEquals {
+ bool operator()(const ld::Section* left, const ld::Section* right) const;
+ };
+- typedef std::unordered_map<const ld::Section*, FinalSection*, SectionHash, SectionEquals> SectionInToOut;
++ typedef __gnu_cxx::hash_map<const ld::Section*, FinalSection*, SectionHash, SectionEquals> SectionInToOut;
+
+
+ SectionInToOut _sectionInToFinalMap;
+@@ -167,7 +168,7 @@ std::vector<const char*> InternalState::FinalSection::_s_segmentsSeen;
+ size_t InternalState::SectionHash::operator()(const ld::Section* sect) const
+ {
+ size_t hash = 0;
+- ld::CStringHash temp;
++ __gnu_cxx::hash<const char*> temp;
+ hash += temp.operator()(sect->segmentName());
+ hash += temp.operator()(sect->sectionName());
+ return hash;
+diff --git a/src/ld/ld.hpp b/src/ld/ld.hpp
+index 7be00a3..ed021ff 100644
+--- src/ld/ld.hpp
++++ src/ld/ld.hpp
+@@ -788,20 +788,6 @@ public:
+
+
+
+-
+-// utility classes for using std::unordered_map with c-strings
+-struct CStringHash {
+- size_t operator()(const char* __s) const {
+- size_t __h = 0;
+- for ( ; *__s; ++__s)
+- __h = 5 * __h + *__s;
+- return __h;
+- };
+-};
+-struct CStringEquals
+-{
+- bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
+-};
+
+
+
+diff --git a/src/ld/parsers/archive_file.cpp b/src/ld/parsers/archive_file.cpp
+index 708f1fb..29ff25f 100644
+--- src/ld/parsers/archive_file.cpp
++++ src/ld/parsers/archive_file.cpp
+@@ -33,7 +33,7 @@
+ #include <set>
+ #include <map>
+ #include <algorithm>
+-#include <unordered_map>
++#include <ext/hash_map>
+
+ #include "MachOFileAbstraction.hpp"
+ #include "Architectures.hpp"
+@@ -112,7 +112,12 @@ private:
+ struct MemberState { ld::relocatable::File* file; const Entry *entry; bool logged; bool loaded; uint16_t index;};
+ bool loadMember(MemberState& state, ld::File::AtomHandler& handler, const char *format, ...) const;
+
+- typedef std::unordered_map<const char*, const struct ranlib*, ld::CStringHash, ld::CStringEquals> NameToEntryMap;
++ class CStringEquals
++ {
++ public:
++ bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
++ };
++ typedef __gnu_cxx::hash_map<const char*, const struct ranlib*, __gnu_cxx::hash<const char*>, CStringEquals> NameToEntryMap;
+
+ typedef typename A::P P;
+ typedef typename A::P::E E;
+diff --git a/src/ld/parsers/lto_file.cpp b/src/ld/parsers/lto_file.cpp
+index 023f6e3..11b04a4 100644
+--- src/ld/parsers/lto_file.cpp
++++ src/ld/parsers/lto_file.cpp
+@@ -30,11 +30,10 @@
+ #include <sys/fcntl.h>
+ #include <sys/stat.h>
+ #include <errno.h>
+-#include <pthread.h>
+ #include <mach-o/dyld.h>
+ #include <vector>
+-#include <unordered_set>
+-#include <unordered_map>
++#include <ext/hash_set>
++#include <ext/hash_map>
+
+ #include "MachOFileAbstraction.hpp"
+ #include "Architectures.hpp"
+@@ -212,8 +211,13 @@ private:
+ static const char* tripletPrefixForArch(cpu_type_t arch);
+ static ld::relocatable::File* parseMachOFile(const uint8_t* p, size_t len, const OptimizeOptions& options);
+
+- typedef std::unordered_set<const char*, ld::CStringHash, ld::CStringEquals> CStringSet;
+- typedef std::unordered_map<const char*, Atom*, ld::CStringHash, ld::CStringEquals> CStringToAtom;
++ class CStringEquals
++ {
++ public:
++ bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
++ };
++ typedef __gnu_cxx::hash_set<const char*, __gnu_cxx::hash<const char*>, CStringEquals> CStringSet;
++ typedef __gnu_cxx::hash_map<const char*, Atom*, __gnu_cxx::hash<const char*>, CStringEquals> CStringToAtom;
+
+ class AtomSyncer : public ld::File::AtomHandler {
+ public:
+diff --git a/src/ld/parsers/macho_dylib_file.cpp b/src/ld/parsers/macho_dylib_file.cpp
+index aad1a8b..77a4824 100644
+--- src/ld/parsers/macho_dylib_file.cpp
++++ src/ld/parsers/macho_dylib_file.cpp
+@@ -33,8 +33,8 @@
+ #include <vector>
+ #include <set>
+ #include <algorithm>
+-#include <unordered_map>
+-#include <unordered_set>
++#include <ext/hash_map>
++#include <ext/hash_set>
+
+ #include "Architectures.hpp"
+ #include "MachOFileAbstraction.hpp"
+@@ -178,17 +178,14 @@ private:
+ friend class ExportAtom<A>;
+ friend class ImportAtom<A>;
+
+- struct CStringHash {
+- std::size_t operator()(const char* __s) const {
+- unsigned long __h = 0;
+- for ( ; *__s; ++__s)
+- __h = 5 * __h + *__s;
+- return size_t(__h);
+- };
++ class CStringEquals
++ {
++ public:
++ bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
+ };
+ struct AtomAndWeak { ld::Atom* atom; bool weakDef; bool tlv; pint_t address; };
+- typedef std::unordered_map<const char*, AtomAndWeak, ld::CStringHash, ld::CStringEquals> NameToAtomMap;
+- typedef std::unordered_set<const char*, CStringHash, ld::CStringEquals> NameSet;
++ typedef __gnu_cxx::hash_map<const char*, AtomAndWeak, __gnu_cxx::hash<const char*>, CStringEquals> NameToAtomMap;
++ typedef __gnu_cxx::hash_set<const char*, __gnu_cxx::hash<const char*>, CStringEquals> NameSet;
+
+ struct Dependent { const char* path; File<A>* dylib; bool reExport; };
+
+@@ -509,14 +506,14 @@ void File<A>::buildExportHashTableFromSymbolTable(const macho_dysymtab_command<P
+ if ( _s_logHashtable ) fprintf(stderr, "ld: building hashtable of %u toc entries for %s\n", dynamicInfo->nextdefsym(), this->path());
+ const macho_nlist<P>* start = &symbolTable[dynamicInfo->iextdefsym()];
+ const macho_nlist<P>* end = &start[dynamicInfo->nextdefsym()];
+- _atoms.reserve(dynamicInfo->nextdefsym()); // set initial bucket count
++ _atoms.resize(dynamicInfo->nextdefsym()); // set initial bucket count
+ for (const macho_nlist<P>* sym=start; sym < end; ++sym) {
+ this->addSymbol(&strings[sym->n_strx()], (sym->n_desc() & N_WEAK_DEF) != 0, false, sym->n_value());
+ }
+ }
+ else {
+ int32_t count = dynamicInfo->ntoc();
+- _atoms.reserve(count); // set initial bucket count
++ _atoms.resize(count); // set initial bucket count
+ if ( _s_logHashtable ) fprintf(stderr, "ld: building hashtable of %u entries for %s\n", count, this->path());
+ const struct dylib_table_of_contents* toc = (dylib_table_of_contents*)(fileContent + dynamicInfo->tocoff());
+ for (int32_t i = 0; i < count; ++i) {
+diff --git a/src/ld/passes/dtrace_dof.cpp b/src/ld/passes/dtrace_dof.cpp
+index 74328ff..175629d 100644
+--- src/ld/passes/dtrace_dof.cpp
++++ src/ld/passes/dtrace_dof.cpp
+@@ -30,8 +30,7 @@
+
+ #include <vector>
+ #include <map>
+-#include <unordered_map>
+-#include <unordered_set>
++#include <ext/hash_map>
+
+ #include "ld.hpp"
+ #include "dtrace_dof.h"
+@@ -104,14 +103,20 @@ Atom::Atom(File& f, const char* n, const uint8_t* content, uint64_t sz)
+
+
+
++class CStringEquals
++{
++public:
++ bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
++};
++
+ struct DTraceProbeInfo {
+ DTraceProbeInfo(const ld::Atom* a, uint32_t o, const char* n) : atom(a), offset(o), probeName(n) {}
+ const ld::Atom* atom;
+ uint32_t offset;
+ const char* probeName;
+ };
+-typedef std::unordered_map<const char*, std::vector<DTraceProbeInfo>, CStringHash, CStringEquals> ProviderToProbes;
+-typedef std::unordered_set<const char*, CStringHash, CStringEquals> CStringSet;
++typedef __gnu_cxx::hash_map<const char*, std::vector<DTraceProbeInfo>, __gnu_cxx::hash<const char*>, CStringEquals> ProviderToProbes;
++typedef __gnu_cxx::hash_set<const char*, __gnu_cxx::hash<const char*>, CStringEquals> CStringSet;
+
+
+
+diff --git a/src/ld/passes/got.cpp b/src/ld/passes/got.cpp
+index 3e6824f..44a5103 100644
+--- src/ld/passes/got.cpp
++++ src/ld/passes/got.cpp
+@@ -30,6 +30,7 @@
+
+ #include <vector>
+ #include <map>
++#include <ext/hash_map>
+
+ #include "ld.hpp"
+ #include "got.h"
+diff --git a/src/ld/passes/order.cpp b/src/ld/passes/order.cpp
+index b4be79f..6876d8f 100644
+--- src/ld/passes/order.cpp
++++ src/ld/passes/order.cpp
+@@ -31,7 +31,6 @@
+
+ #include <vector>
+ #include <map>
+-#include <unordered_map>
+
+ #include "ld.hpp"
+ #include "order.h"
+@@ -83,7 +82,11 @@ private:
+ const Layout& _layout;
+ };
+
+- typedef std::unordered_map<const char*, const ld::Atom*, CStringHash, CStringEquals> NameToAtom;
++ class CStringEquals {
++ public:
++ bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
++ };
++ typedef __gnu_cxx::hash_map<const char*, const ld::Atom*, __gnu_cxx::hash<const char*>, CStringEquals> NameToAtom;
+
+ typedef std::map<const ld::Atom*, const ld::Atom*> AtomToAtom;
+
+diff --git a/src/ld/passes/tlvp.cpp b/src/ld/passes/tlvp.cpp
+index 6a58fdf..eed532e 100644
+--- src/ld/passes/tlvp.cpp
++++ src/ld/passes/tlvp.cpp
+@@ -30,6 +30,7 @@
+
+ #include <vector>
+ #include <map>
++#include <ext/hash_map>
+
+ #include "ld.hpp"
+ #include "tlvp.h"
+diff --git a/src/other/dyldinfo.cpp b/src/other/dyldinfo.cpp
+index 71f13b8..9dbf754 100644
+--- src/other/dyldinfo.cpp
++++ src/other/dyldinfo.cpp
+@@ -33,7 +33,7 @@
+
+ #include <vector>
+ #include <set>
+-#include <unordered_set>
++#include <ext/hash_set>
+
+ #include "configure.h"
+ #include "MachOFileAbstraction.hpp"
+@@ -87,6 +87,14 @@ private:
+ typedef typename A::P::E E;
+ typedef typename A::P::uint_t pint_t;
+
++ class CStringEquals
++ {
++ public:
++ bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
++ };
++
++ typedef __gnu_cxx::hash_set<const char*, __gnu_cxx::hash<const char*>, CStringEquals> StringSet;
++
+ DyldInfoPrinter(const uint8_t* fileContent, uint32_t fileLength, const char* path, bool printArch);
+ void printRebaseInfo();
+ void printRebaseInfoOpcodes();
+diff --git a/src/other/machochecker.cpp b/src/other/machochecker.cpp
+index bd585d1..274d170 100644
+--- src/other/machochecker.cpp
++++ src/other/machochecker.cpp
+@@ -33,7 +33,7 @@
+
+ #include <vector>
+ #include <set>
+-#include <unordered_set>
++#include <ext/hash_set>
+
+ #include "configure.h"
+
+@@ -110,21 +110,13 @@ private:
+ typedef typename A::P::E E;
+ typedef typename A::P::uint_t pint_t;
+
+- // utility classes for using std::unordered_map with c-strings
+- struct CStringHash {
+- size_t operator()(const char* __s) const {
+- size_t __h = 0;
+- for ( ; *__s; ++__s)
+- __h = 5 * __h + *__s;
+- return __h;
+- };
+- };
+- struct CStringEquals
++ class CStringEquals
+ {
++ public:
+ bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
+ };
+
+- typedef std::unordered_set<const char*, CStringHash, CStringEquals> StringSet;
++ typedef __gnu_cxx::hash_set<const char*, __gnu_cxx::hash<const char*>, CStringEquals> StringSet;
+
+ MachOChecker(const uint8_t* fileContent, uint32_t fileLength, const char* path);
+ void checkMachHeader();
+diff --git a/src/other/unwinddump.cpp b/src/other/unwinddump.cpp
+index 731f2a3..9060557 100644
+--- src/other/unwinddump.cpp
++++ src/other/unwinddump.cpp
+@@ -33,7 +33,7 @@
+
+ #include <vector>
+ #include <set>
+-#include <unordered_set>
++#include <ext/hash_set>
+
+
+ #include "MachOFileAbstraction.hpp"
+@@ -71,6 +71,14 @@ private:
+ typedef typename A::P::E E;
+ typedef typename A::P::uint_t pint_t;
+
++ class CStringEquals
++ {
++ public:
++ bool operator()(const char* left, const char* right) const { return (strcmp(left, right) == 0); }
++ };
++
++ typedef __gnu_cxx::hash_set<const char*, __gnu_cxx::hash<const char*>, CStringEquals> StringSet;
++
+ UnwindPrinter(const uint8_t* fileContent, uint32_t fileLength,
+ const char* path, bool showFunctionNames);
+ bool findUnwindSection();
Added: trunk/dports/devel/ld64/files/ld64-136-i386-badAddress.patch
===================================================================
--- trunk/dports/devel/ld64/files/ld64-136-i386-badAddress.patch (rev 0)
+++ trunk/dports/devel/ld64/files/ld64-136-i386-badAddress.patch 2013-05-27 18:07:56 UTC (rev 106464)
@@ -0,0 +1,11 @@
+--- src/ld/LinkEdit.hpp.orig 2013-05-27 10:47:54.000000000 -0700
++++ src/ld/LinkEdit.hpp 2013-05-27 10:56:06.000000000 -0700
+@@ -1278,7 +1278,7 @@ template <typename A>
+ void FunctionStartsAtom<A>::encode() const
+ {
+ this->_encodedData.reserve(8192);
+- const uint64_t badAddress = 0xFFFFFFFFFFFFFFFF;
++ const uint64_t badAddress = 0xFFFFFFFFFFFFFFFFULL;
+ uint64_t addr = badAddress;
+ // delta compress all function addresses
+ for (std::vector<ld::Internal::FinalSection*>::iterator it = this->_state.sections.begin(); it != this->_state.sections.end(); ++it) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130527/9fc4e51b/attachment-0001.html>
More information about the macports-changes
mailing list