commit b6bd8aeb4308ae7738e241b6d377779a44d38598
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Mon Apr 25 13:32:52 2022 +0100
Fix for rfbz #6287 (won't launch any VM)
VirtualBox.spec | 7 ++++++-
ffreestanding.patch | 20 ++++++++++++++++++++
2 files changed, 26 insertions(+), 1 deletion(-)
---
diff --git a/VirtualBox.spec b/VirtualBox.spec
index a8c32fe..97974fe 100644
--- a/VirtualBox.spec
+++ b/VirtualBox.spec
@@ -39,7 +39,7 @@
Name: VirtualBox
Version: 6.1.34
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A general-purpose full virtualizer for PC hardware
License: GPLv2 or (GPLv2 and CDDL)
@@ -92,6 +92,7 @@ Patch72: virtualbox-snpritnf-buffer-overflow.patch
Patch73: vb-6.1.16-modal-dialog-parent.patch
Patch80: VirtualBox-6.1.4-gcc10.patch
+Patch81: ffreestanding.patch
Patch88: VirtualBox-lzf.patch
Patch90: 0001-libs-xpcom-Added-support-for-running-with-Python-3.1.patch
Patch91: 0002-no_ifndef.patch
@@ -342,6 +343,7 @@ rm -r src/libs/zlib-1.2.*/
%patch72 -p1 -b .snpritnf-buffer-overflow
%patch73 -p1 -b .modal-dialog-parent
%patch80 -p1 -b .gcc10
+%patch81 -p1 -b .ffreestanding
%patch88 -p1 -b .lzf
%patch90 -p2 -b .python3.10
%patch91 -p1 -b .python3.10
@@ -901,6 +903,9 @@ getent passwd vboxadd >/dev/null || \
%{_datadir}/%{name}-kmod-%{version}
%changelog
+* Mon Apr 25 2022 Sérgio Basto <sergio(a)serjux.com> - 6.1.34-2
+- Fix for rfbz #6287 (won't launch any VM)
+
* Tue Apr 19 2022 Sérgio Basto <sergio(a)serjux.com> - 6.1.34-1
- Update VirtualBox to 6.1.34
- Fix rfbz #6254
diff --git a/ffreestanding.patch b/ffreestanding.patch
new file mode 100644
index 0000000..0e22aa6
--- /dev/null
+++ b/ffreestanding.patch
@@ -0,0 +1,20 @@
+diff --git a/Config.kmk b/Config.kmk
+index 3df197404..4c6bd76bb 100644
+--- a/Config.kmk
++++ b/Config.kmk
+@@ -4503,11 +4504,14 @@ ifeq ($(VBOX_LDR_FMT),elf)
+ TEMPLATE_VBoxR0_TOOL = $(VBOX_GCC_TOOL)
+ TEMPLATE_VBoxR0_CFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe)
$(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) \
+ $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP)
-fno-strict-aliasing -fno-exceptions \
+- $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-hidden) -std=gnu99
$(VBOX_GCC_IPRT_FMT_CHECK)
++ $(VBOX_GCC_fno-stack-protector) -fno-common -ffreestanding
$(VBOX_GCC_fvisibility-hidden) -std=gnu99 $(VBOX_GCC_IPRT_FMT_CHECK)
+ TEMPLATE_VBoxR0_CXXFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe)
$(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) \
+ $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP)
-fno-strict-aliasing -fno-exceptions \
+ $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-inlines-hidden)
$(VBOX_GCC_fvisibility-hidden) \
+ -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK)
++ if $(VBOX_GCC_VERSION_CC) >= 40500 # 4.1.2 complains, 4.5.2 is okay, didn't
check which version inbetween made it okay with g++.
++TEMPLATE_VBoxR0_CXXFLAGS += -ffreestanding
++ endif
+ TEMPLATE_VBoxR0_CFLAGS.amd64 = -m64 -mno-red-zone -mno-sse -mno-mmx -mno-sse2
-mno-3dnow -fasynchronous-unwind-tables -ffreestanding
+ TEMPLATE_VBoxR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mno-sse -mno-mmx -mno-sse2
-mno-3dnow -fasynchronous-unwind-tables
+ TEMPLATE_VBoxR0_CXXFLAGS.freebsd = -ffreestanding