grobian 15/02/03 21:12:23
Added: ld64-127.2-thread_state.patch ld64-128.2-1010.patch
ld64-127.2-extraneous-headers.patch
binutils-apple-4.2-globals-extern.patch
ld64-127.2-Makefile ld64-128.2-Makefile-2
Removed: cctools-839-lto.patch
Log:
Add fixed older versions for PPC and comparisons by Michael Weiser, bug
#538384
(Portage version: 2.2.14-prefix/cvs/Darwin i386, signed Manifest commit with
key 0x5F75F607C5C74E89)
Revision Changes Path
1.1
sys-devel/binutils-apple/files/ld64-127.2-thread_state.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/files/ld64-127.2-thread_state.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/files/ld64-127.2-thread_state.patch?rev=1.1&content-type=text/plain
Index: ld64-127.2-thread_state.patch
===================================================================
Include thread_status.h so that __darwin_i386_thread_state_t is known and will
not generate warnings that it's declared inside parameter list.
--- ld64-127.2/src/ld/HeaderAndLoadCommands.hpp.orig 2015-01-28
00:32:55.000000000 +0100
+++ ld64-127.2/src/ld/HeaderAndLoadCommands.hpp 2015-01-28 00:27:51.000000000
+0100
@@ -29,6 +29,7 @@
#include <limits.h>
#include <unistd.h>
#include <mach-o/loader.h>
+#include <mach/i386/thread_status.h>
#include <vector>
1.1 sys-devel/binutils-apple/files/ld64-128.2-1010.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/files/ld64-128.2-1010.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/files/ld64-128.2-1010.patch?rev=1.1&content-type=text/plain
Index: ld64-128.2-1010.patch
===================================================================
Backport (just a diff really) of OS X 10.10 handling from 241.9.
--- ld64-128.2/src/ld/Options.cpp 2015-01-30 17:16:48.000000000 +0100
+++ ld64-241.9/src/ld/Options.cpp 2015-01-30 17:11:57.000000000 +0100
@@ -1241,7 +1348,14 @@
throw "-macosx_version_min argument missing";
if ( (strncmp(version, "10.", 3) == 0) && isdigit(version[3]) ) {
- unsigned int minorVersion = version[3] - '0';
+ unsigned int minorVersion = 0;
+ for (int i=3; isdigit(version[i]); ++i) {
+ minorVersion = minorVersion*10 + (version[i] - '0');
+ }
+ if ( minorVersion > 255 ) {
+ warning("Mac OS X minor version > 255 in '%s'",
version);
+ minorVersion = 255;
+ }
fMacVersionMin = (ld::MacVersionMin)(0x000A0000 | (minorVersion
<< 8));
}
else {
1.1
sys-devel/binutils-apple/files/ld64-127.2-extraneous-headers.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/files/ld64-127.2-extraneous-headers.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/files/ld64-127.2-extraneous-headers.patch?rev=1.1&content-type=text/plain
Index: ld64-127.2-extraneous-headers.patch
===================================================================
Remove unused header that doesn't exist on older OS Xes.
--- ld64-127.2/src/ld/parsers/libunwind/AddressSpace.hpp.orig 2015-01-27
23:24:49.000000000 +0100
+++ ld64-127.2/src/ld/parsers/libunwind/AddressSpace.hpp 2015-01-27
23:26:21.000000000 +0100
@@ -37,7 +37,6 @@
#include <mach-o/getsect.h>
#include <mach-o/dyld_priv.h>
#include <mach/i386/thread_status.h>
-#include <Availability.h>
#include "FileAbstraction.hpp"
#include "libunwind.h"
1.1
sys-devel/binutils-apple/files/binutils-apple-4.2-globals-extern.patch
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/files/binutils-apple-4.2-globals-extern.patch?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/files/binutils-apple-4.2-globals-extern.patch?rev=1.1&content-type=text/plain
Index: binutils-apple-4.2-globals-extern.patch
===================================================================
Externally referenced globals should be marked extern to avoid stuff like this
happening:
ld: warning: tentative definition of '_subsections_via_symbols' with size 16
from 'app.o' is being replaced by real definition of smaller size 4 from 'as.o'
ld: warning: tentative definition of '_subsections_via_symbols' with size 16
from 'atof-ieee.o' is being replaced by real definition of smaller size 4 from
'as.o'
...
--- cctools-809/as/as.h.orig 2015-01-28 23:52:40.000000000 +0100
+++ cctools-809/as/as.h 2015-01-28 23:52:52.000000000 +0100
@@ -179,7 +179,7 @@
extern char *specific_archflag;
/* TRUE if the .subsections_via_symbols directive was seen */
-int subsections_via_symbols;
+extern int subsections_via_symbols;
/* -I path options for .includes */
struct directory_stack {
--- cctools-809/as/arm.c.orig 2015-01-28 23:57:23.000000000 +0100
+++ cctools-809/as/arm.c 2015-01-28 23:57:35.000000000 +0100
@@ -151,8 +151,7 @@
# define N_(String) (String)
/* STUFF FROM gas/as.h */
-#define COMMON
-COMMON subsegT now_subseg;
+extern subsegT now_subseg;
/* STUFF FROM gas/config/tc-arm.h */
#define ARM_FLAG_THUMB (1 << 0) /* The symbol is a
Thumb symbol rather than an Arm symbol. */
1.1 sys-devel/binutils-apple/files/ld64-127.2-Makefile
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/files/ld64-127.2-Makefile?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/files/ld64-127.2-Makefile?rev=1.1&content-type=text/plain
Index: ld64-127.2-Makefile
===================================================================
CPPFLAGS += -Iinclude -Iabstraction -Ild -Ild/parsers -Iother -I.
# some files generate warnings about applying offsetof to a non-POD type.
# Upstream seems aware of that and ignores by setting
# GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO in the xcode project.
CXXFLAGS += -Wno-invalid-offsetof
all: rebase unwinddump dyldinfo ld64 ObjectDump machocheck
libprunetrie.a: other/PruneTrie.o other/prune_trie.h
$(AR) -s -r -c libprunetrie.a other/PruneTrie.o
LD64LIBS=ld/parsers/archive_file.o ld/parsers/macho_relocatable_file.o \
ld/parsers/opaque_section_file.o \
ld/parsers/macho_dylib_file.o \
ld/passes/branch_island.o ld/passes/dylibs.o
ld/passes/order_file.o \
ld/passes/branch_shim.o ld/passes/got.o ld/passes/tlvp.o \
ld/passes/compact_unwind.o ld/passes/huge.o \
ld/passes/dtrace_dof.o ld/passes/objc.o \
ld/passes/stubs/stubs.o \
ld/InputFiles.o ld/OutputFile.o ld/SymbolTable.o \
ld/Options.o ld/Resolver.o ld/debugline.o ld/ld.o
ifeq ($(LTO),1)
CPPFLAGS += -DLTO
LTO_OBJ = ld/parsers/lto_file.o
LIBLTO = -lLTO
else
LTO_OBJ =
LIBLTO =
endif
ld64: libprunetrie.a version.o $(LD64LIBS) $(LTO_OBJ)
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBLTO) -o $@ $^
rebase: other/rebase.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
dyldinfo: other/dyldinfo.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
unwinddump: other/unwinddump.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
ObjectDump: other/ObjectDump.o ld/debugline.o
ld/parsers/macho_relocatable_file.o $(LTO_OBJ)
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBLTO) -o $@ $^
machocheck: other/machochecker.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
1.1 sys-devel/binutils-apple/files/ld64-128.2-Makefile-2
file :
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/files/ld64-128.2-Makefile-2?rev=1.1&view=markup
plain:
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/binutils-apple/files/ld64-128.2-Makefile-2?rev=1.1&content-type=text/plain
Index: ld64-128.2-Makefile-2
===================================================================
CPPFLAGS += -Iinclude -Iabstraction -Ild -Ild/parsers -Iother -I.
# some files generate warnings about applying offsetof to a non-POD type.
# Upstream seems aware of that and ignores by setting
# GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = NO in the xcode project.
CXXFLAGS += -Wno-invalid-offsetof
all: rebase unwinddump dyldinfo ld64 ObjectDump machocheck
libprunetrie.a: other/PruneTrie.o other/prune_trie.h
$(AR) -s -r -c libprunetrie.a other/PruneTrie.o
LD64LIBS=ld/parsers/archive_file.o ld/parsers/macho_relocatable_file.o \
ld/parsers/opaque_section_file.o \
ld/parsers/macho_dylib_file.o \
ld/passes/branch_island.o ld/passes/dylibs.o ld/passes/order.o
\
ld/passes/branch_shim.o ld/passes/got.o ld/passes/tlvp.o \
ld/passes/compact_unwind.o ld/passes/huge.o \
ld/passes/dtrace_dof.o ld/passes/objc.o \
ld/passes/stubs/stubs.o \
ld/InputFiles.o ld/OutputFile.o ld/SymbolTable.o \
ld/Options.o ld/Resolver.o ld/debugline.o ld/ld.o
ifeq ($(LTO),1)
CPPFLAGS += -DLTO
LTO_OBJ = ld/parsers/lto_file.o
LIBLTO = -lLTO
else
LTO_OBJ =
LIBLTO =
endif
ld64: libprunetrie.a version.o $(LD64LIBS) $(LTO_OBJ)
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBLTO) -o $@ $^
rebase: other/rebase.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
dyldinfo: other/dyldinfo.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
unwinddump: other/unwinddump.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
ObjectDump: other/ObjectDump.o ld/debugline.o
ld/parsers/macho_relocatable_file.o $(LTO_OBJ)
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(LIBLTO) -o $@ $^
machocheck: other/machochecker.o
$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^