[141548] trunk/dports/devel/ld64

jeremyhu at macports.org jeremyhu at macports.org
Sat Dec 12 01:59:51 PST 2015


Revision: 141548
          https://trac.macports.org/changeset/141548
Author:   jeremyhu at macports.org
Date:     2015-10-20 10:05:10 -0700 (Tue, 20 Oct 2015)
Log Message:
-----------
ld64-latest: Bump to 253.3 (Xcode 7.0 version)

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

Added Paths:
-----------
    trunk/dports/devel/ld64/files/Makefile-253
    trunk/dports/devel/ld64/files/PR-23184186.patch
    trunk/dports/devel/ld64/files/PR-23184384.patch
    trunk/dports/devel/ld64/files/PR-23184771.patch

Modified: trunk/dports/devel/ld64/Portfile
===================================================================
--- trunk/dports/devel/ld64/Portfile	2015-10-20 16:53:31 UTC (rev 141547)
+++ trunk/dports/devel/ld64/Portfile	2015-10-20 17:05:10 UTC (rev 141548)
@@ -145,17 +145,17 @@
 }
 
 subport ld64-latest {
-    # XCode 6.4
-    version             242.2
+    # XCode 7.0
+    version             253.3
 
-    checksums           rmd160  2bb0b2518dd02ab6a4941ee64e68cd0cddc95c25 \
-                        sha256  fe9bf780fe15cb71f41f25595dcc6cc715093a3066914a65098222421a76213b
+    checksums           rmd160  05a334fa636bf05a36eac3e745101f8f2dcab70b \
+                        sha256  76c02f6f297c251b66504e1115946bda6e1618640bc6cf03d0ad99b17bd8a5d6
 
     # http://trac.macports.org/ticket/43737
     # < 100 is a guess.  Xcode 4.1 might work, so I'm leaving it as an option unless someone reports a failure.
     compiler.blacklist-append *gcc* {clang < 100}
 
-    set makefile        "Makefile-133"
+    set makefile        "Makefile-253"
     set ld64_ver        latest
 
     patchfiles-append \
@@ -163,10 +163,15 @@
         ld64-133-no-CrashReporterClient.h.patch \
         ld64-134-missing-include.patch \
         ld64-136-i386-badAddress.patch \
-        ld64-ppc-9610466.patch
+        ld64-ppc-9610466.patch \
+        PR-23184186.patch \
+        PR-23184384.patch \
+        PR-23184771.patch
 
+    depends_lib-append port:libcxx
     configure.cxx_stdlib libc++
-    depends_lib-append port:libcxx
+    configure.cxxflags-append -std=c++11
+
     supported_archs i386 x86_64
 
     pre-fetch {

Added: trunk/dports/devel/ld64/files/Makefile-253
===================================================================
--- trunk/dports/devel/ld64/files/Makefile-253	                        (rev 0)
+++ trunk/dports/devel/ld64/files/Makefile-253	2015-10-20 17:05:10 UTC (rev 141548)
@@ -0,0 +1,105 @@
+ifdef LLVM_CONFIG
+LLVM_CPPFLAGS := -I$(shell $(LLVM_CONFIG) --includedir) -DLTO_SUPPORT
+LLVM_LDFLAGS := -L$(shell $(LLVM_CONFIG) --libdir) -lLTO
+endif
+
+CPPFLAGS = $(LLVM_CPPFLAGS) -Isrc/abstraction -Isrc/ld -Isrc/ld/parsers $(OTHER_CPPFLAGS)
+CFLAGS = -Os $(OTHER_CFLAGS)
+CXXFLAGS = -Os $(OTHER_CXXFLAGS)
+LDFLAGS = $(OTHER_LDFLAGS)
+
+ifndef RANLIB
+RANLIB = ranlib
+endif
+ifndef AR
+AR = ar
+endif
+ifndef PREFIX
+PREFIX = /usr
+endif
+
+# libprunetrie.a
+all : src/ld/configure.h ObjectDump dyldinfo ld machocheck rebase unwinddump
+
+src/ld/Snapshot.o : src/ld/compile_stubs.h
+src/ld/compile_stubs.h : compile_stubs
+	echo "static const char *compile_stubs = " > $@
+	cat $^ | sed s/\"/\\\\\"/g | sed s/^/\"/ | sed s/$$/\\\\n\"/ >> $@
+	echo ";" >> $@
+
+src/ld/configure.h : src/create_configure
+	DERIVED_SOURCES_DIR=src/ld DERIVED_FILE_DIR=src/ld $^ > $@
+
+ObjectDump : src/ld/debugline.o
+ObjectDump : src/ld/parsers/macho_relocatable_file.o 
+ObjectDump : src/ld/parsers/lto_file.o
+ObjectDump : src/other/ObjectDump.o 
+	$(CXX) $(LLVM_LDFLAGS) $(LDFLAGS) $^ -o $@
+
+dyldinfo : src/other/dyldinfo.o
+	$(CXX) $(LDFLAGS) -Wl,-exported_symbol,__mh_execute_header $^ -o $@
+
+ld : src/ld/debugline.o
+ld : src/ld/ld.o
+ld : src/ld/InputFiles.o
+ld : src/ld/Options.o
+ld : src/ld/OutputFile.o
+ld : src/ld/Resolver.o
+ld : src/ld/Snapshot.o
+ld : src/ld/SymbolTable.o
+ld : src/ld/parsers/archive_file.o
+ld : src/ld/parsers/lto_file.o
+ld : src/ld/parsers/macho_dylib_file.o
+ld : src/ld/parsers/macho_relocatable_file.o
+ld : src/ld/parsers/opaque_section_file.o
+ld : src/ld/parsers/textstub_dylib_file.o
+ld : src/ld/passes/bitcode_bundle.o
+ld : src/ld/passes/branch_island.o
+ld : src/ld/passes/branch_shim.o
+ld : src/ld/passes/compact_unwind.o
+ld : src/ld/passes/dtrace_dof.o
+ld : src/ld/passes/dylibs.o
+ld : src/ld/passes/got.o
+ld : src/ld/passes/huge.o
+ld : src/ld/passes/objc.o
+ld : src/ld/passes/order.o
+ld : src/ld/passes/tlvp.o
+ld : src/ld/passes/stubs/stubs.o
+	$(CXX) $(LLVM_LDFLAGS) $(LDFLAGS) $(OTHER_LDFLAGS_LD64) -Wl,-exported_symbol,__mh_execute_header $^ -lxar -o $@
+
+machocheck : src/other/machochecker.o
+	$(CXX) $(LDFLAGS) $^ -o $@
+
+rebase : src/other/rebase.o
+	$(CXX) $(LDFLAGS) -Wl,-exported_symbol,__mh_execute_header $^ -o $@
+
+unwinddump : src/other/unwinddump.o
+	$(CXX) $(LDFLAGS) -Wl,-exported_symbol,__mh_execute_header $^ -o $@
+
+src/other/PruneTrie.o : src/ld/configure.h
+libprunetrie.a : src/other/PruneTrie.o
+	$(AR) cru $@ $^
+	$(RANLIB) $@
+
+install : all
+	install -d -m 755 $(DESTDIR)$(PREFIX)/bin
+	install -d -m 755 $(DESTDIR)$(PREFIX)/lib
+	install -d -m 755 $(DESTDIR)$(PREFIX)/include/mach-o
+	install -d -m 755 $(DESTDIR)$(PREFIX)/share/man/man1
+	
+	install -m 755 ObjectDump $(DESTDIR)$(PREFIX)/bin
+	install -m 755 dyldinfo   $(DESTDIR)$(PREFIX)/bin
+	install -m 755 ld         $(DESTDIR)$(PREFIX)/bin
+	install -m 755 machocheck $(DESTDIR)$(PREFIX)/bin
+	install -m 755 rebase     $(DESTDIR)$(PREFIX)/bin
+	install -m 755 unwinddump $(DESTDIR)$(PREFIX)/bin
+
+	#install -m 644 src/other/prune_trie.h $(DESTDIR)$(PREFIX)/include/mach-o
+	#install -m 644 libprunetrie.a $(DESTDIR)$(PREFIX)/lib
+
+	install -m 644 doc/man/man1/dyldinfo.1   $(DESTDIR)$(PREFIX)/share/man/man1
+	install -m 644 doc/man/man1/ld.1         $(DESTDIR)$(PREFIX)/share/man/man1
+	install -m 644 doc/man/man1/ld64.1       $(DESTDIR)$(PREFIX)/share/man/man1
+	install -m 644 doc/man/man1/rebase.1     $(DESTDIR)$(PREFIX)/share/man/man1
+	install -m 644 doc/man/man1/unwinddump.1 $(DESTDIR)$(PREFIX)/share/man/man1
+

Added: trunk/dports/devel/ld64/files/PR-23184186.patch
===================================================================
--- trunk/dports/devel/ld64/files/PR-23184186.patch	                        (rev 0)
+++ trunk/dports/devel/ld64/files/PR-23184186.patch	2015-10-20 17:05:10 UTC (rev 141548)
@@ -0,0 +1,10 @@
+--- src/ld/Options.cpp.orig	2015-10-20 09:15:30.000000000 -0700
++++ src/ld/Options.cpp	2015-10-20 09:15:45.000000000 -0700
+@@ -5292,7 +5292,6 @@ void Options::checkIllegalOptionCombinat
+ 		throw "-segment_order can only used used with -preload output";
+ 
+ 	// <rdar://problem/17598404> warn if building an embedded iOS dylib for pre-iOS 8
+-	// <rdar://problem/18935714> How can we suppress "ld: warning: embedded dylibs/frameworks only run on iOS 8 or later\xD3 when building XCTest?
+ 	if ( (fOutputKind == Options::kDynamicLibrary) && (fIOSVersionMin != ld::iOSVersionUnset) && (fDylibInstallName != NULL) ) {
+ 		if ( !min_iOS(ld::iOS_8_0) && (fDylibInstallName[0] == '@') && !fEncryptableForceOff )
+ 			warning("embedded dylibs/frameworks only run on iOS 8 or later");

Added: trunk/dports/devel/ld64/files/PR-23184384.patch
===================================================================
--- trunk/dports/devel/ld64/files/PR-23184384.patch	                        (rev 0)
+++ trunk/dports/devel/ld64/files/PR-23184384.patch	2015-10-20 17:05:10 UTC (rev 141548)
@@ -0,0 +1,20 @@
+--- src/other/machochecker.cpp.orig	2013-07-22 16:37:47.000000000 -0700
++++ src/other/machochecker.cpp	2015-10-20 09:35:33.000000000 -0700
+@@ -533,7 +533,7 @@ void MachOChecker<A>::checkLoadCommands(
+ 				else {
+ 					throw "overlapping segment vm addresses";
+ 				}
+-				segmentAddressRanges.push_back(std::make_pair<pint_t, pint_t>(startAddr, endAddr));
++				segmentAddressRanges.push_back(std::make_pair(startAddr, endAddr));
+ 			}
+ 			// see if this overlaps another segment file offset range
+ 			uint64_t startOffset = segCmd->fileoff();
+@@ -550,7 +550,7 @@ void MachOChecker<A>::checkLoadCommands(
+ 				else {
+ 					throw "overlapping segment file data";
+ 				}
+-				segmentFileOffsetRanges.push_back(std::make_pair<pint_t, pint_t>(startOffset, endOffset));
++				segmentFileOffsetRanges.push_back(std::make_pair(startOffset, endOffset));
+ 				// check is within file bounds
+ 				if ( (startOffset > fLength) || (endOffset > fLength) )
+ 					throw "segment file data is past end of file";

Added: trunk/dports/devel/ld64/files/PR-23184771.patch
===================================================================
--- trunk/dports/devel/ld64/files/PR-23184771.patch	                        (rev 0)
+++ trunk/dports/devel/ld64/files/PR-23184771.patch	2015-10-20 17:05:10 UTC (rev 141548)
@@ -0,0 +1,20 @@
+--- src/ld/passes/bitcode_bundle.cpp.orig	2015-08-25 10:19:19.000000000 -0700
++++ src/ld/passes/bitcode_bundle.cpp	2015-10-20 09:59:42.000000000 -0700
+@@ -252,6 +252,9 @@ BitcodeObfuscator::BitcodeObfuscator()
+     _lto_hide_symbols = (lto_codegen_func_t) dlsym(RTLD_DEFAULT, "lto_codegen_hide_symbols");
+     _lto_write_reverse_map = (lto_codegen_output_t) dlsym(RTLD_DEFAULT, "lto_codegen_write_symbol_reverse_map");
+     _lto_reset_context = (lto_codegen_func_t) dlsym(RTLD_DEFAULT, "lto_codegen_reset_context");
++#if LTO_API_VERSION < 11
++    throwf("compile-time libLTO didn't support -bitcode_hide_symbols: %d", LTO_API_VERSION);
++#else
+     if ( _lto_hide_symbols == NULL || _lto_write_reverse_map == NULL ||
+         _lto_reset_context == NULL || ::lto_api_version() < 14 )
+         throwf("loaded libLTO doesn't support -bitcode_hide_symbols: %s", ::lto_get_version());
+@@ -259,6 +262,7 @@ BitcodeObfuscator::BitcodeObfuscator()
+ #if LTO_API_VERSION >= 14
+     lto_codegen_set_should_internalize(_obfuscator, false);
+ #endif
++#endif
+ }
+ 
+ BitcodeObfuscator::~BitcodeObfuscator()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151212/c71affa6/attachment.html>


More information about the macports-changes mailing list