[packages/VirtualBox] - add fix for building with gccc 11 on ix86
baggins
baggins at pld-linux.org
Sun Jul 4 00:14:40 CEST 2021
commit 5c8fa7ad13c85efebd3ddc07c01ef6e3faf2026c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Jul 4 00:14:15 2021 +0200
- add fix for building with gccc 11 on ix86
VirtualBox.spec | 4 +++-
add__divmoddi4.patch | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 1 deletion(-)
---
diff --git a/VirtualBox.spec b/VirtualBox.spec
index e3b60d7..1a70f1f 100644
--- a/VirtualBox.spec
+++ b/VirtualBox.spec
@@ -47,7 +47,7 @@ exit 1
%define qtver 5.6.0
-%define rel 1
+%define rel 2
%define pname VirtualBox
Summary: VirtualBox - x86 hardware virtualizer
Summary(pl.UTF-8): VirtualBox - wirtualizator sprzętu x86
@@ -88,6 +88,7 @@ Patch15: %{pname}-lightdm-1.19.2.patch
Patch16: %{pname}-no-vboxvideo.patch
Patch17: qt5-gl.patch
Patch19: kernel-4.9.256.patch
+Patch20: add__divmoddi4.patch
URL: http://www.virtualbox.org/
%if %{with userspace}
%ifarch %{x8664}
@@ -548,6 +549,7 @@ echo override vboxsf %{_kernel_ver} misc >> kernel/installed/etc/depmod.d/%{_ker
%patch15 -p0
%patch16 -p0
%patch17 -p1
+%patch20 -p1
%{__sed} -i -e 's, at VBOX_DOC_PATH@,%{_docdir}/%{name}-%{version},' \
-e 's/Categories=.*/Categories=Utility;Emulator;/' src/VBox/Installer/common/virtualbox.desktop.in
diff --git a/add__divmoddi4.patch b/add__divmoddi4.patch
new file mode 100644
index 0000000..8dd30a2
--- /dev/null
+++ b/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 at 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;
++}
++
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/VirtualBox.git/commitdiff/5c8fa7ad13c85efebd3ddc07c01ef6e3faf2026c
More information about the pld-cvs-commit
mailing list