[120121] trunk/dports/devel/ld64

jeremyhu at macports.org jeremyhu at macports.org
Fri May 16 10:02:53 PDT 2014


Revision: 120121
          https://trac.macports.org/changeset/120121
Author:   jeremyhu at macports.org
Date:     2014-05-16 10:02:53 -0700 (Fri, 16 May 2014)
Log Message:
-----------
ld64: Update libstdc++ patch (#43724)

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

Added Paths:
-----------
    trunk/dports/devel/ld64/files/ld64-236-hash_set.patch

Removed Paths:
-------------
    trunk/dports/devel/ld64/files/ld64-136-hash_set.patch

Modified: trunk/dports/devel/ld64/Portfile
===================================================================
--- trunk/dports/devel/ld64/Portfile	2014-05-16 15:31:33 UTC (rev 120120)
+++ trunk/dports/devel/ld64/Portfile	2014-05-16 17:02:53 UTC (rev 120121)
@@ -123,7 +123,7 @@
     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
 } elseif {${cxxstdlib} eq "libstdc++"} {
-    patchfiles-append   ld64-136-hash_set.patch
+    patchfiles-append   ld64-236-hash_set.patch
 }
 
 platform darwin 8 {

Deleted: trunk/dports/devel/ld64/files/ld64-136-hash_set.patch
===================================================================
--- trunk/dports/devel/ld64/files/ld64-136-hash_set.patch	2014-05-16 15:31:33 UTC (rev 120120)
+++ trunk/dports/devel/ld64/files/ld64-136-hash_set.patch	2014-05-16 17:02:53 UTC (rev 120121)
@@ -1,606 +0,0 @@
-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-236-hash_set.patch
===================================================================
(Binary files differ)


Property changes on: trunk/dports/devel/ld64/files/ld64-236-hash_set.patch
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140516/35994b88/attachment-0001.html>


More information about the macports-changes mailing list