]> git.pld-linux.org Git - packages/VirtualBox.git/commitdiff
- add fix for building with gccc 11 on ix86 auto/th/VirtualBox-6.1.22-2
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 3 Jul 2021 22:14:15 +0000 (00:14 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 3 Jul 2021 22:14:15 +0000 (00:14 +0200)
VirtualBox.spec
add__divmoddi4.patch [new file with mode: 0644]

index e3b60d7cfc371cd7a1022472f32b0c0e1e911d41..1a70f1f1669adb1173acdb0ba394f810a803615f 100644 (file)
@@ -47,7 +47,7 @@ exit 1
 
 %define                qtver   5.6.0
 
 
 %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
 %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
 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}
 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
 %patch15 -p0
 %patch16 -p0
 %patch17 -p1
+%patch20 -p1
 
 %{__sed} -i -e 's,@VBOX_DOC_PATH@,%{_docdir}/%{name}-%{version},' \
        -e 's/Categories=.*/Categories=Utility;Emulator;/' src/VBox/Installer/common/virtualbox.desktop.in
 
 %{__sed} -i -e 's,@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 (file)
index 0000000..8dd30a2
--- /dev/null
@@ -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;
++}
++
This page took 0.04278 seconds and 4 git commands to generate.