Permalink
Browse files

ld64: Make newer versions of ld64 build with the Makefile

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
  • Loading branch information...
1 parent b7a1bcd commit 8318bdb601ef5009473aa7048769c910f930e371 @jeremyhu committed Apr 28, 2012
View
4 devel/ld64/Portfile
@@ -69,7 +69,7 @@ if {${os.arch} == "powerpc" || ${os.major} < 9} {
sha256 02bd46af0809eaa415d096d7d41c3e8e7d80f7d8d181840866fb87f036b4e089
supported_archs x86_64 i386 ppc
- patchfiles-append ld64-97.17-no-LTO.patch
+ patchfiles-append ld64-97-no-LTO.patch ld64-97-Makefile.patch
} elseif {${os.major} < 11} {
# XCode 3.2.6
# This was the last XCode release that supported linking ppc executables.
@@ -79,7 +79,7 @@ if {${os.arch} == "powerpc" || ${os.major} < 9} {
sha256 97b75547b2bd761306ab3e15ae297f01e7ab9760b922bc657f4ef72e4e052142
supported_archs i386 x86_64
- patchfiles-append ld64-127-any-cctools.patch
+ patchfiles-append ld64-127-any-cctools.patch ld64-127-Makefile.patch
}
platform darwin 8 {
View
31 devel/ld64/files/Makefile
@@ -3,7 +3,7 @@ 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 $(OTHER_CPPFLAGS)
+CPPFLAGS = $(LLVM_CPPFLAGS) -Isrc/abstraction -Isrc/ld -Isrc/ld/parsers $(OTHER_CPPFLAGS)
CFLAGS = -Os $(OTHER_CFLAGS)
CXXFLAGS = -Os $(OTHER_CXXFLAGS)
LDFLAGS = $(OTHER_LDFLAGS)
@@ -25,13 +25,38 @@ src/ld/Options.o : src/ld/configure.h
src/ld/configure.h :
touch $@
-ObjectDump : src/other/ObjectDump.o src/ld/debugline.o
+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/ld.o src/ld/Options.o src/ld/debugline.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/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/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 $^ -o $@
machocheck : src/other/machochecker.o
View
11 devel/ld64/files/ld64-127-Makefile.patch
@@ -0,0 +1,11 @@
+--- Makefile
++++ Makefile
+@@ -54,7 +54,7 @@ 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/order_file.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 $^ -o $@
View
48 devel/ld64/files/ld64-97-Makefile.patch
@@ -0,0 +1,48 @@
+--- Makefile
++++ Makefile
+@@ -3,7 +3,7 @@ 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)
++CPPFLAGS = $(LLVM_CPPFLAGS) -Isrc/abstraction -Isrc/ld $(OTHER_CPPFLAGS)
+ CFLAGS = -Os $(OTHER_CFLAGS)
+ CXXFLAGS = -Os $(OTHER_CXXFLAGS)
+ LDFLAGS = $(OTHER_LDFLAGS)
+@@ -26,8 +26,6 @@ src/ld/configure.h :
+ touch $@
+
+ 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 $@
+
+@@ -36,27 +34,7 @@ dyldinfo : src/other/dyldinfo.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/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/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 $^ -o $@
+
+ machocheck : src/other/machochecker.o
View
0 devel/ld64/files/ld64-97.17-no-LTO.patch → devel/ld64/files/ld64-97-no-LTO.patch
File renamed without changes.

0 comments on commit 8318bdb

Please sign in to comment.