gcc 11 needs it on i686
Signed-off-by: Khem Raj <[email protected]>
---
.../vboxguestdrivers/add__divmoddi4.patch | 36 +++++++++++++++++++
.../vboxguestdrivers_6.1.18.bb | 1 +
2 files changed, 37 insertions(+)
create mode 100644
meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/add__divmoddi4.patch
diff --git
a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/add__divmoddi4.patch
b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/add__divmoddi4.patch
new file mode 100644
index 0000000000..8dd30a20ef
--- /dev/null
+++
b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/add__divmoddi4.patch
@@ -0,0 +1,36 @@
+add __divmoddi4 builtin
+
+GCC 11 will generate it in code
+
+void foo(unsigned char *u8Second, unsigned int *u32Nanosecond, long long
timeSpec)
+{
+ long long i64Div;
+ int i32Div;
+ int i32Rem;
+ i64Div = timeSpec;
+ i32Rem = (int)(i64Div % 1000000000);
+ i64Div /= 1000000000;
+ *u32Nanosecond = i32Rem;
+ i32Rem = (int)(i64Div % 60);
+ *u8Second = i32Rem;
+}
+
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+
+--- a/src/VBox/Runtime/common/math/gcc/divdi3.c
++++ b/src/VBox/Runtime/common/math/gcc/divdi3.c
+@@ -68,3 +68,12 @@ __divdi3(a, b)
+ uq = - uq;
+ return uq;
+ }
++
++quad_t
++__divmoddi4(quad_t a, quad_t b, quad_t* rem)
++{
++ quad_t d = __divdi3(a,b);
++ *rem = a - (d*b);
++ return d;
++}
++
diff --git
a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.18.bb
b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.18.bb
index d620e9893f..1def1a3115 100644
--- a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.18.bb
+++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.18.bb
@@ -14,6 +14,7 @@ VBOX_NAME = "VirtualBox-${PV}"
SRC_URI =
"http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \
file://Makefile.utils \
file://kernel-5.10.patch \
+ file://add__divmoddi4.patch \
"
SRC_URI[md5sum] = "c61001386eb3822ab8f06d688a82e84b"
SRC_URI[sha256sum] =
"108d42b9b391b7a332a33df1662cf7b0e9d9a80f3079d16288d8b9487f427d40"
--
2.31.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#90219):
https://lists.openembedded.org/g/openembedded-devel/message/90219
Mute This Topic: https://lists.openembedded.org/mt/81450721/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-