source: trunk/dports/emulators/virtualbox/files/patch-apple-gcc42.diff @ 107839

Last change on this file since 107839 was 107839, checked in by royliu@…, 7 years ago

virtualbox: update to 4.2.16 (#39643)

File size: 4.8 KB
RevLine 
[101907]1--- Config.kmk.orig     2013-01-21 13:27:33.000000000 -0500
2+++ Config.kmk  2013-01-21 13:27:33.000000000 -0500
[107839]3@@ -1916,10 +1916,8 @@
[97829]4    $(error VBox: 64-bit darwin builds require Xcode 3.2 or later, you have $(VBOX_XCODE_VERSION))
[89084]5   endif
6  endif
[97829]7- if $(VBOX_XCODE_VERSION_MAJOR) == 4 && $(VBOX_XCODE_VERSION_MINOR) >= 2
8-  TOOL_GXX4MACHO_PREFIX ?= llvm-
9- endif
10- TOOL_GXX4MACHO_SUFFIX ?= -4.2
11+ TOOL_GXX4MACHO_PREFIX ?=
12+ TOOL_GXX4MACHO_SUFFIX ?= -apple-4.2
13  VBOX_DARWIN_NO_COMPACT_LINKEDIT ?=
14 
15  TOOL_GCC4MACHO_SUFFIX ?= $(TOOL_GXX4MACHO_SUFFIX)$(HOSTSUFF_EXE)
[101907]16--- kBuild/tools/LLVMGCC42MACHO.kmk.orig        2013-01-21 13:27:33.000000000 -0500
17+++ kBuild/tools/LLVMGCC42MACHO.kmk     2013-01-21 13:27:33.000000000 -0500
18@@ -1,6 +1,6 @@
19 # $Id: LLVMGCC42MACHO.kmk 2547 2011-11-04 21:58:53Z bird $
20 ## @file
21-# kBuild Tool Config - LLVM GCC v4.2.x targeting Darwin (Mac OS X) Mach-O.
22+# kBuild Tool Config - Apple GCC v4.2.x targeting Darwin (Mac OS X) Mach-O.
23 #
24 
25 #
26@@ -31,17 +31,22 @@
27 #
28 #
29 
30-TOOL_LLVMGCC42MACHO := LLVM GCC v4.2.x targeting Darwin (Mac OS X) Mach-O.
31+TOOL_LLVMGCC42MACHO := Apple GCC v4.2.x targeting Darwin (Mac OS X) Mach-O.
32 
33 # Tool Specific Properties
34-TOOL_LLVMGCC42MACHO_PREFIX    ?= llvm-
35-TOOL_LLVMGCC42MACHO_SUFFIX    ?= -4.2$(HOSTSUFF_EXE)
36+TOOL_LLVMGCC42MACHO_PREFIX    ?=
37+TOOL_LLVMGCC42MACHO_SUFFIX    ?= -apple-4.2$(HOSTSUFF_EXE)
38 TOOL_LLVMGCC42MACHO_CC        ?= $(TOOL_LLVMGCC42MACHO_PREFIX)gcc$(TOOL_LLVMGCC42MACHO_SUFFIX)
39 TOOL_LLVMGCC42MACHO_CXX       ?= $(TOOL_LLVMGCC42MACHO_PREFIX)g++$(TOOL_LLVMGCC42MACHO_SUFFIX)
40 TOOL_LLVMGCC42MACHO_OBJC      ?= $(TOOL_LLVMGCC42MACHO_PREFIX)gcc$(TOOL_LLVMGCC42MACHO_SUFFIX)
41 TOOL_LLVMGCC42MACHO_OBJCXX    ?= $(TOOL_LLVMGCC42MACHO_PREFIX)gcc$(TOOL_LLVMGCC42MACHO_SUFFIX)
42 TOOL_LLVMGCC42MACHO_AS        ?= $(TOOL_LLVMGCC42MACHO_PREFIX)gcc$(TOOL_LLVMGCC42MACHO_SUFFIX)
43-TOOL_LLVMGCC42MACHO_LD        ?= $(TOOL_LLVMGCC42MACHO_PREFIX)gcc$(TOOL_LLVMGCC42MACHO_SUFFIX)
44+#
45+# note: this LLVMGCC42MACHO_LD differs from LLVMGCCMACHO, this is because apple-gcc-42
46+# require __personality_* symbol which might require by cpp sources processing by this
47+# tool set (e.g. filesplitter), this link issue resolve by involving g++ stack.
48+#
49+TOOL_LLVMGCC42MACHO_LD        ?= $(TOOL_LLVMGCC42MACHO_PREFIX)g++$(TOOL_LLVMGCC42MACHO_SUFFIX)
50 TOOL_LLVMGCC42MACHO_LD_SYSMOD ?= $(TOOL_LLVMGCC42MACHO_PREFIX)gcc$(TOOL_LLVMGCC42MACHO_SUFFIX)
51 ifndef TOOL_LLVMGCC42MACHO_LDFLAGS.$(KBUILD_TARGET)
52 TOOL_LLVMGCC42MACHO_LDFLAGS.dll ?= -dynamiclib
53--- kBuild/tools/LLVMGXX42MACHO.kmk.orig        2013-01-21 13:27:33.000000000 -0500
54+++ kBuild/tools/LLVMGXX42MACHO.kmk     2013-01-21 13:27:33.000000000 -0500
55@@ -1,6 +1,6 @@
56 # $Id: LLVMGXX42MACHO.kmk 2547 2011-11-04 21:58:53Z bird $
57 ## @file
58-# kBuild Tool Config - LLVM GCC v4.2.x targeting Darwin (Mac OS X) Mach-O, for building C++ code.
59+# kBuild Tool Config - Apple GCC v4.2.x targeting Darwin (Mac OS X) Mach-O, for building C++ code.
60 #
61 
62 #
63@@ -31,11 +31,11 @@
64 #
65 #
66 
67-TOOL_LLVMGXX42MACHO := LLVM GCC v4.2.x targeting Darwin (Mac OS X) Mach-O, for building C++ code.
68+TOOL_LLVMGXX42MACHO := Apple GCC v4.2.x targeting Darwin (Mac OS X) Mach-O, for building C++ code.
69 
70 # Tool Specific Properties
71-TOOL_LLVMGXX42MACHO_PREFIX    ?= llvm-
72-TOOL_LLVMGXX42MACHO_SUFFIX    ?= -4.2$(HOSTSUFF_EXE)
73+TOOL_LLVMGXX42MACHO_PREFIX    ?=
74+TOOL_LLVMGXX42MACHO_SUFFIX    ?= -apple-4.2$(HOSTSUFF_EXE)
75 TOOL_LLVMGXX42MACHO_CC        ?= $(TOOL_LLVMGXX42MACHO_PREFIX)gcc$(TOOL_LLVMGXX42MACHO_SUFFIX)
76 TOOL_LLVMGXX42MACHO_CXX       ?= $(TOOL_LLVMGXX42MACHO_PREFIX)g++$(TOOL_LLVMGXX42MACHO_SUFFIX)
77 TOOL_LLVMGXX42MACHO_OBJC      ?= $(TOOL_LLVMGXX42MACHO_PREFIX)gcc$(TOOL_LLVMGXX42MACHO_SUFFIX)
78--- src/libs/kStuff/kStuff/kLdr/kLdrModMachO.c.orig     2013-01-21 13:27:34.000000000 -0500
79+++ src/libs/kStuff/kStuff/kLdr/kLdrModMachO.c  2013-01-21 13:27:34.000000000 -0500
80@@ -967,6 +967,8 @@
81             }
82 
83             case LC_DYSYMTAB:
84+           case LC_FUNCTION_STARTS:
85+           case LC_DATA_IN_CODE:
86                 /** @todo deal with this! */
87                 break;
88 
89--- src/libs/kStuff/kStuff/include/k/kLdrFmts/mach-o.h.orig     2013-01-21 13:27:34.000000000 -0500
90+++ src/libs/kStuff/kStuff/include/k/kLdrFmts/mach-o.h  2013-01-21 13:27:34.000000000 -0500
91@@ -380,7 +380,8 @@
92 #define LC_VERSION_MIN_MACOSX KU32_C(0x24)   /**< The image requires the given Mac OS X version. See version_min_command. */
93 #define LC_VERSION_MIN_IPHONEOS KU32_C(0x25) /**< The image requires the given iOS version. See version_min_command. */
94 #define LC_FUNCTION_STARTS  KU32_C(0x26)  /**< Where to find the compress function start addresses. See linkedit_data_command. */
95-#define LC_DYLD_ENVIRONMENT KU32_C(0x26)  /**< Environment variable for the dynamic linker. See dylinker_command. */
96+#define LC_DYLD_ENVIRONMENT KU32_C(0x27)  /**< Environment variable for the dynamic linker. See dylinker_command. */
97+#define LC_DATA_IN_CODE KU32_C(0x29) /** ???? */
98 /** @} */
99 
100 
Note: See TracBrowser for help on using the repository browser.