All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Armin Kuster" <akuster808@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: [dunfell 09/15] vboxguestdrivers: Add __divmoddi4 builtin support
Date: Sat, 24 Jul 2021 21:52:15 -0700	[thread overview]
Message-ID: <12bc39d8c5ee7fdec1d1f5e92812b200eeba5b7b.1627164868.git.akuster808@gmail.com> (raw)
In-Reply-To: <cover.1627164868.git.akuster808@gmail.com>

From: Khem Raj <raj.khem@gmail.com>

gcc 11 needs it on i686

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 57f7692e8ef707535ffa1683aa711de442736ec1)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 .../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 <raj.khem@gmail.com>
+
+--- 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.25.1


  parent reply	other threads:[~2021-07-25  4:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-25  4:52 [dunfell 00/15] Patch review July 24th Armin Kuster
2021-07-25  4:52 ` [dunfell 01/15] vboxguestdrivers: upgrade 6.1.6 -> 6.1.12 Armin Kuster
2021-07-25  4:52 ` [dunfell 02/15] vboxguestdrivers: fix failed to compile with kernel 5.8.0 Armin Kuster
2021-07-25  4:52 ` [dunfell 03/15] vboxguestdrivers: Fix build with kernel 5.8 Armin Kuster
2021-07-25  4:52 ` [dunfell 04/15] vboxguestdrivers: upgrade 6.1.12 -> 6.1.14 Drop kernel 5.8 compatibility patch, now part of upstream codebase Armin Kuster
2021-07-25  4:52 ` [dunfell 05/15] vboxguestdrivers: upgrade 6.1.14 -> 6.1.16 Armin Kuster
2021-07-25  4:52 ` [dunfell 06/15] vboxguestdrivers: fix build against kernel v5.10+ Armin Kuster
2021-07-25  4:52 ` [dunfell 07/15] vboxguestdrivers: upgrade 6.1.16 -> 6.1.18 Armin Kuster
2021-07-25  4:52 ` [dunfell 08/15] vboxguestdrivers: Add patch proposed upstream to fix a build failure on i386 Armin Kuster
2021-07-25  4:52 ` Armin Kuster [this message]
2021-07-25  4:52 ` [dunfell 10/15] vboxguestdrivers: upgrade 6.1.18 -> 6.1.20 Armin Kuster
2021-07-25  4:52 ` [dunfell 11/15] vboxguestdrivers: upgrade 6.1.20 -> 6.1.22 Armin Kuster
2021-07-25  4:52 ` [dunfell 12/15] vboxguestdrivers: add a fix for build failure with kernel 5.13 Armin Kuster
2021-07-25  4:52 ` [dunfell 13/15] mariadb: update to 10.4.20 Armin Kuster
2021-07-25  4:52 ` [dunfell 14/15] hiawatha: fix url Armin Kuster
2021-07-25  4:52 ` [dunfell 15/15] ufw: backport patches, update RRECOMMENDS, python3 support, tests Armin Kuster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=12bc39d8c5ee7fdec1d1f5e92812b200eeba5b7b.1627164868.git.akuster808@gmail.com \
    --to=akuster808@gmail.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.