summarylogtreecommitdiffstats
path: root/009-gcc-7.patch
blob: ab76ca4de899494309f5ddb0d9b94293414dfd67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
Index: trunk/src/recompiler/Makefile.kmk
===================================================================
--- trunk/src/recompiler/Makefile.kmk	(revision 67289)
+++ trunk/src/recompiler/Makefile.kmk	(revision 67298)
@@ -320,7 +320,8 @@
 
 $$(VBoxREMImp_0_OUTDIR)/VBoxREMRes.o: $(VBOX_PATH_RECOMPILER_SRC)/VBoxREM.rc $(MAKEFILE_CURRENT) $(VBOX_VERSION_MK) | $$(dir $$@)
 	$(call MSG_GENERATE,,$@)
-	$(QUIET)$(REDIRECT) -E 'COMSPEC=$(VBOX_GOOD_COMSPEC_BS)' -- $(TOOL_MINGWW64_PREFIX)windres \
+	$(QUIET)$(REDIRECT) -E 'COMSPEC=$(VBOX_GOOD_COMSPEC_BS)' \
+	    -- $(TOOL_$(VBoxRemPrimary_TOOL.win.$(KBUILD_TARGET_ARCH))_PREFIX)windres \
 	    $(addprefix -I,$(INCS) $(PATH_SDK_$(VBOX_WINPSDK)_INC) $(PATH_TOOL_$(VBOX_VCC_TOOL)_INC)) \
 	    -DVBOX_SVN_REV=$(VBOX_SVN_REV) \
 	    -DVBOX_SVN_REV_MOD_5K=$(expr $(VBOX_SVN_REV) % 50000) \
Index: trunk/src/VBox/Runtime/common/math/gcc/udivmoddi4.c
===================================================================
--- trunk/src/VBox/Runtime/common/math/gcc/udivmoddi4.c	(nonexistent)
+++ trunk/src/VBox/Runtime/common/math/gcc/udivmoddi4.c	(revision 67298)
@@ -0,0 +1,53 @@
+/* $Id$ */
+/** @file
+ * IPRT - __udivmoddi4 implementation
+ */
+
+/*
+ * Copyright (C) 2006-2016 Oracle Corporation
+ *
+ * This file is part of VirtualBox Open Source Edition (OSE), as
+ * available from http://www.virtualbox.org. This file is free software;
+ * you can redistribute it and/or modify it under the terms of the GNU
+ * General Public License (GPL) as published by the Free Software
+ * Foundation, in version 2 as it comes in the "COPYING" file of the
+ * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+ *
+ * The contents of this file may alternatively be used under the terms
+ * of the Common Development and Distribution License Version 1.0
+ * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
+ * VirtualBox OSE distribution, in which case the provisions of the
+ * CDDL are applicable instead of those of the GPL.
+ *
+ * You may elect to license modified versions of this file under the
+ * terms and conditions of either the GPL or the CDDL or both.
+ */
+
+#include <iprt/stdint.h>
+#include <iprt/uint64.h>
+
+uint64_t __udivmoddi4(uint64_t u64A, uint64_t u64B, uint64_t *pu64R);
+
+/**
+ * __udivmoddi4() implementation to satisfy external references from 32-bit
+ * code generated by gcc-7 or later.
+ *
+ * @param   u64A        The divident value.
+ * @param   u64B        The divisor value.
+ * @param   pu64R       A pointer to the reminder. May be NULL.
+ * @returns u64A / u64B
+ */
+uint64_t __udivmoddi4(uint64_t u64A, uint64_t u64B, uint64_t *pu64R)
+{
+    RTUINT64U Divident;
+    RTUINT64U Divisor;
+    RTUINT64U Quotient;
+    RTUINT64U Reminder;
+    Divident.u = u64A;
+    Divisor.u  = u64B;
+    RTUInt64DivRem(&Quotient, &Reminder, &Divident, &Divisor);
+    if (pu64R)
+        *pu64R = Reminder.u;
+    return Quotient.u;
+}

Property changes on: trunk/src/VBox/Runtime/common/math/gcc/udivmoddi4.c
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Index: trunk/src/VBox/Runtime/Makefile.kmk
===================================================================
--- trunk/src/VBox/Runtime/Makefile.kmk	(revision 67289)
+++ trunk/src/VBox/Runtime/Makefile.kmk	(revision 67298)
@@ -1850,6 +1850,7 @@
 	common/math/gcc/subdi3.c \
 	common/math/gcc/ucmpdi2.c \
 	common/math/gcc/udivdi3.c \
+	common/math/gcc/udivmoddi4.c \
 	common/math/gcc/umoddi3.c \
 	common/math/gcc/xordi3.c
 
@@ -1942,6 +1943,7 @@
 	common/math/gcc/subdi3.c \
 	common/math/gcc/ucmpdi2.c \
 	common/math/gcc/udivdi3.c \
+	common/math/gcc/udivmoddi4.c \
 	common/math/gcc/umoddi3.c \
 	common/math/gcc/xordi3.c
 endif
@@ -2675,6 +2677,7 @@
  	common/math/gcc/subdi3.c \
  	common/math/gcc/ucmpdi2.c \
  	common/math/gcc/udivdi3.c \
+	common/math/gcc/udivmoddi4.c \
  	common/math/gcc/umoddi3.c \
  	common/math/gcc/xordi3.c
  endif
Index: trunk/src/VBox/HostDrivers/VBoxNetAdp/linux/files_vboxnetadp
===================================================================
--- trunk/src/VBox/HostDrivers/VBoxNetAdp/linux/files_vboxnetadp	(revision 67289)
+++ trunk/src/VBox/HostDrivers/VBoxNetAdp/linux/files_vboxnetadp	(revision 67298)
@@ -49,6 +49,7 @@
     ${PATH_ROOT}/include/iprt/time.h=>include/iprt/time.h \
     ${PATH_ROOT}/include/iprt/timer.h=>include/iprt/timer.h \
     ${PATH_ROOT}/include/iprt/types.h=>include/iprt/types.h \
+    ${PATH_ROOT}/include/iprt/uint64.h=>include/iprt/uint64.h \
     ${PATH_ROOT}/include/iprt/uni.h=>include/iprt/uni.h \
     ${PATH_ROOT}/include/iprt/utf16.h=>include/iprt/utf16.h \
     ${PATH_ROOT}/include/iprt/uuid.h=>include/iprt/uuid.h \
@@ -70,6 +71,7 @@
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/qdivrem.c=>math/gcc/qdivrem.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/quad.h=>math/gcc/quad.h \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/udivdi3.c=>math/gcc/udivdi3.c \
+    ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/udivmoddi4.c=>math/gcc/udivmoddi4.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/umoddi3.c=>math/gcc/umoddi3.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/string/strformat.cpp=>common/string/strformat.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/string/strformatrt.cpp=>common/string/strformatrt.c \
Index: trunk/src/VBox/HostDrivers/VBoxNetAdp/linux/Makefile
===================================================================
--- trunk/src/VBox/HostDrivers/VBoxNetAdp/linux/Makefile	(revision 67289)
+++ trunk/src/VBox/HostDrivers/VBoxNetAdp/linux/Makefile	(revision 67298)
@@ -72,6 +72,7 @@
 	math/gcc/moddi3.o \
 	math/gcc/qdivrem.o \
 	math/gcc/udivdi3.o \
+	math/gcc/udivmoddi4.o \
         math/gcc/divdi3.o \
 	math/gcc/umoddi3.o
 endif
Index: trunk/src/VBox/HostDrivers/VBoxPci/linux/files_vboxpci
===================================================================
--- trunk/src/VBox/HostDrivers/VBoxPci/linux/files_vboxpci	(revision 67289)
+++ trunk/src/VBox/HostDrivers/VBoxPci/linux/files_vboxpci	(revision 67298)
@@ -48,6 +48,7 @@
     ${PATH_ROOT}/include/iprt/time.h=>include/iprt/time.h \
     ${PATH_ROOT}/include/iprt/timer.h=>include/iprt/timer.h \
     ${PATH_ROOT}/include/iprt/types.h=>include/iprt/types.h \
+    ${PATH_ROOT}/include/iprt/uint64.h=>include/iprt/uint64.h \
     ${PATH_ROOT}/include/iprt/uni.h=>include/iprt/uni.h \
     ${PATH_ROOT}/include/iprt/utf16.h=>include/iprt/utf16.h \
     ${PATH_ROOT}/include/iprt/uuid.h=>include/iprt/uuid.h \
@@ -75,6 +76,7 @@
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/qdivrem.c=>math/gcc/qdivrem.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/quad.h=>math/gcc/quad.h \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/udivdi3.c=>math/gcc/udivdi3.c \
+    ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/udivmoddi4.c=>math/gcc/udivmoddi4.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/umoddi3.c=>math/gcc/umoddi3.c \
     ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h=>r0drv/linux/the-linux-kernel.h \
     ${PATH_OUT}/version-generated.h=>version-generated.h \
Index: trunk/src/VBox/HostDrivers/VBoxPci/linux/Makefile
===================================================================
--- trunk/src/VBox/HostDrivers/VBoxPci/linux/Makefile	(revision 67289)
+++ trunk/src/VBox/HostDrivers/VBoxPci/linux/Makefile	(revision 67298)
@@ -76,6 +76,7 @@
 	math/gcc/moddi3.o 	\
 	math/gcc/qdivrem.o 	\
 	math/gcc/udivdi3.o 	\
+	math/gcc/udivmoddi4.o 	\
         math/gcc/divdi3.o 	\
 	math/gcc/umoddi3.o
 endif
Index: trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/Makefile
===================================================================
--- trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/Makefile	(revision 67289)
+++ trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/Makefile	(revision 67298)
@@ -76,6 +76,7 @@
 	math/gcc/moddi3.o \
 	math/gcc/qdivrem.o \
 	math/gcc/udivdi3.o \
+	math/gcc/udivmoddi4.o \
         math/gcc/divdi3.o \
 	math/gcc/umoddi3.o
 endif
Index: trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/files_vboxnetflt
===================================================================
--- trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/files_vboxnetflt	(revision 67289)
+++ trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/files_vboxnetflt	(revision 67298)
@@ -49,6 +49,7 @@
     ${PATH_ROOT}/include/iprt/time.h=>include/iprt/time.h \
     ${PATH_ROOT}/include/iprt/timer.h=>include/iprt/timer.h \
     ${PATH_ROOT}/include/iprt/types.h=>include/iprt/types.h \
+    ${PATH_ROOT}/include/iprt/uint64.h=>include/iprt/uint64.h \
     ${PATH_ROOT}/include/iprt/uni.h=>include/iprt/uni.h \
     ${PATH_ROOT}/include/iprt/utf16.h=>include/iprt/utf16.h \
     ${PATH_ROOT}/include/iprt/uuid.h=>include/iprt/uuid.h \
@@ -77,6 +78,7 @@
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/qdivrem.c=>math/gcc/qdivrem.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/quad.h=>math/gcc/quad.h \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/udivdi3.c=>math/gcc/udivdi3.c \
+    ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/udivmoddi4.c=>math/gcc/udivmoddi4.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/umoddi3.c=>math/gcc/umoddi3.c \
     ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h=>r0drv/linux/the-linux-kernel.h \
     ${PATH_OUT}/version-generated.h=>version-generated.h \
Index: trunk/src/VBox/HostDrivers/Support/linux/files_vboxdrv
===================================================================
--- trunk/src/VBox/HostDrivers/Support/linux/files_vboxdrv	(revision 67289)
+++ trunk/src/VBox/HostDrivers/Support/linux/files_vboxdrv	(revision 67298)
@@ -65,6 +65,7 @@
     ${PATH_ROOT}/include/iprt/timer.h=>include/iprt/timer.h \
     ${PATH_ROOT}/include/iprt/types.h=>include/iprt/types.h \
     ${PATH_ROOT}/include/iprt/uint128.h=>include/iprt/uint128.h \
+    ${PATH_ROOT}/include/iprt/uint64.h=>include/iprt/uint64.h \
     ${PATH_ROOT}/include/iprt/uni.h=>include/iprt/uni.h \
     ${PATH_ROOT}/include/iprt/utf16.h=>include/iprt/utf16.h \
     ${PATH_ROOT}/include/iprt/uuid.h=>include/iprt/uuid.h \
@@ -108,6 +109,7 @@
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/qdivrem.c=>math/gcc/qdivrem.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/quad.h=>math/gcc/quad.h \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/udivdi3.c=>math/gcc/udivdi3.c \
+    ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/udivmoddi4.c=>math/gcc/udivmoddi4.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/umoddi3.c=>math/gcc/umoddi3.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/misc/RTAssertMsg1Weak.cpp=>common/misc/RTAssertMsg1Weak.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/misc/RTAssertMsg2.cpp=>common/misc/RTAssertMsg2.c \
Index: trunk/src/VBox/HostDrivers/Support/linux/Makefile
===================================================================
--- trunk/src/VBox/HostDrivers/Support/linux/Makefile	(revision 67289)
+++ trunk/src/VBox/HostDrivers/Support/linux/Makefile	(revision 67298)
@@ -162,6 +162,7 @@
 	math/gcc/moddi3.o \
 	math/gcc/qdivrem.o \
 	math/gcc/udivdi3.o \
+	math/gcc/udivmoddi4.o \
 	math/gcc/divdi3.o \
 	math/gcc/umoddi3.o
 endif
Index: trunk/src/VBox/Additions/linux/sharedfolders/Makefile.module
===================================================================
--- trunk/src/VBox/Additions/linux/sharedfolders/Makefile.module	(revision 67289)
+++ trunk/src/VBox/Additions/linux/sharedfolders/Makefile.module	(revision 67298)
@@ -38,6 +38,7 @@
 	divdi3.o \
 	moddi3.o \
 	udivdi3.o \
+	udivmoddi4.o \
 	umoddi3.o \
 	qdivrem.o
 endif
Index: trunk/src/VBox/Additions/linux/sharedfolders/files_vboxsf
===================================================================
--- trunk/src/VBox/Additions/linux/sharedfolders/files_vboxsf	(revision 67289)
+++ trunk/src/VBox/Additions/linux/sharedfolders/files_vboxsf	(revision 67298)
@@ -38,6 +38,7 @@
     ${PATH_ROOT}/include/iprt/string.h=>include/iprt/string.h \
     ${PATH_ROOT}/include/iprt/time.h=>include/iprt/time.h \
     ${PATH_ROOT}/include/iprt/types.h=>include/iprt/types.h \
+    ${PATH_ROOT}/include/iprt/uint64.h=>include/iprt/uint64.h \
     ${PATH_ROOT}/include/iprt/uni.h=>include/iprt/uni.h \
     ${PATH_ROOT}/include/iprt/utf16.h=>include/iprt/utf16.h \
     ${PATH_ROOT}/include/VBox/cdefs.h=>include/VBox/cdefs.h \
@@ -73,6 +74,7 @@
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/qdivrem.c=>qdivrem.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/quad.h=>quad.h \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/udivdi3.c=>udivdi3.c \
+    ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/udivmoddi4.c=>udivmoddi4.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/umoddi3.c=>umoddi3.c \
     ${PATH_ROOT}/src/VBox/Runtime/r0drv/linux/the-linux-kernel.h=>r0drv/linux/the-linux-kernel.h \
     ${PATH_ROOT}/src/VBox/Additions/linux/sharedfolders/Makefile.module=>Makefile \
Index: trunk/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest
===================================================================
--- trunk/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest	(revision 67289)
+++ trunk/src/VBox/Additions/common/VBoxGuest/linux/files_vboxguest	(revision 67298)
@@ -54,6 +54,7 @@
     ${PATH_ROOT}/include/iprt/time.h=>include/iprt/time.h \
     ${PATH_ROOT}/include/iprt/timer.h=>include/iprt/timer.h \
     ${PATH_ROOT}/include/iprt/types.h=>include/iprt/types.h \
+    ${PATH_ROOT}/include/iprt/uint64.h=>include/iprt/uint64.h \
     ${PATH_ROOT}/include/iprt/uni.h=>include/iprt/uni.h \
     ${PATH_ROOT}/include/iprt/utf16.h=>include/iprt/utf16.h \
     ${PATH_ROOT}/include/iprt/x86.h=>include/iprt/x86.h \
@@ -113,6 +114,7 @@
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/qdivrem.c=>common/math/gcc/qdivrem.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/quad.h=>common/math/gcc/quad.h \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/udivdi3.c=>common/math/gcc/udivdi3.c \
+    ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/udivmoddi4.c=>common/math/gcc/udivmoddi4.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/math/gcc/umoddi3.c=>common/math/gcc/umoddi3.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/misc/RTAssertMsg1Weak.cpp=>common/misc/RTAssertMsg1Weak.c \
     ${PATH_ROOT}/src/VBox/Runtime/common/misc/RTAssertMsg2.cpp=>common/misc/RTAssertMsg2.c \
Index: trunk/src/VBox/Additions/common/VBoxGuest/linux/Makefile
===================================================================
--- trunk/src/VBox/Additions/common/VBoxGuest/linux/Makefile	(revision 67289)
+++ trunk/src/VBox/Additions/common/VBoxGuest/linux/Makefile	(revision 67298)
@@ -100,6 +100,7 @@
 	common/math/gcc/divdi3.o \
 	common/math/gcc/moddi3.o \
 	common/math/gcc/udivdi3.o \
+	common/math/gcc/udivmoddi4.o \
 	common/math/gcc/umoddi3.o \
 	common/math/gcc/qdivrem.o
 endif