summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-emulation/virtualbox/files')
-rw-r--r--app-emulation/virtualbox/files/virtualbox-5.2.8-paxmark-bldprogs.patch59
-rw-r--r--app-emulation/virtualbox/files/virtualbox-6.1.34-no-pam.patch22
-rw-r--r--app-emulation/virtualbox/files/virtualbox-6.1.34-python3.10.patch13
-rw-r--r--app-emulation/virtualbox/files/virtualbox-6.1.34-r3-python3.10.patch122
-rw-r--r--app-emulation/virtualbox/files/virtualbox-6.1.34-vboxr0.patch20
-rw-r--r--app-emulation/virtualbox/files/virtualbox-6.1.36-fcf-protection.patch16
-rw-r--r--app-emulation/virtualbox/files/virtualbox-6.1.44-fix-libxml2.patch25
-rw-r--r--app-emulation/virtualbox/files/virtualbox-7.0.14-libxml2-2.12.patch43
-rw-r--r--app-emulation/virtualbox/files/virtualbox-7.0.8-disable-rebuild-iPxeBiosBin.patch18
9 files changed, 102 insertions, 236 deletions
diff --git a/app-emulation/virtualbox/files/virtualbox-5.2.8-paxmark-bldprogs.patch b/app-emulation/virtualbox/files/virtualbox-5.2.8-paxmark-bldprogs.patch
deleted file mode 100644
index 7eb1e1793a7f..000000000000
--- a/app-emulation/virtualbox/files/virtualbox-5.2.8-paxmark-bldprogs.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-2017-02-20 Quentin Minster <quentin@minster.io>
-
- #https://bugs.gentoo.org/show_bug.cgi?id=591582
- * Config.kmk: add paxmark befor VBOX_VBOXTPG get run.
- * src/VBox/VMM/Makefile.kmk: add paxmark befor VBOX_VBOXCPP get run.
- * src/VBox/Main/Makefile.kmk: add paxmark befor USBIdDatabaseGenerator_1_TARGET get run.
-
---- a/Config.kmk
-+++ b/Config.kmk 2016-09-21 02:22:28
-@@ -3719,11 +3719,13 @@
- $(if-expr $(intersects $(KBUILD_TARGET_ARCH),$(KBUILD_ARCHES_64)),-64,-32) \
- -h --host-$(VBOX_HC_ARCH_BITS)-bit #-vvv
- define TOOL_VBoxTpG_DTRACE_HDR_CMDS
-+ $(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)"
- $(QUIET)$(VBOX_VBOXTPG) $(flags) -o "$(out)" -s "$(source)"
- endef
- TOOL_VBoxTpG_DTRACE_OBJ_NOT_NEEDED :=
- TOOL_VBoxTpG_DTRACE_OBJ_FLAGS := -G --host-$(VBOX_HC_ARCH_BITS)-bit #-vvv
- define TOOL_VBoxTpG_DTRACE_OBJ_CMDS
-+ $(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)"
- $(QUIET)$(VBOX_VBOXTPG) \
- $(if-expr $(intersects $(bld_trg_arch),$(KBUILD_ARCHES_64)),-64,-32) \
- $(flags) \
-@@ -3738,6 +3740,7 @@
- TOOL_VBoxTpG-Disabled_DTRACE_DEPORD = $(VBOX_VBOXTPG)
- TOOL_VBoxTpG-Disabled_DTRACE_HDR_FLAGS := -h
- define TOOL_VBoxTpG-Disabled_DTRACE_HDR_CMDS
-+ $(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)"
- $(QUIET)$(VBOX_VBOXTPG) $(flags) -o "$(out)" -s "$(source)"
- endef
- TOOL_VBoxTpG-Disabled_DTRACE_OBJ_NOT_NEEDED := $(KBUILD_OSES)
-@@ -3752,6 +3755,7 @@
- TOOL_DTraceAndVBoxTpG_DTRACE_HDR_CMDS =
- define TOOL_DTraceAndVBoxTpG_DTRACE_HDR_CMDS
- $(TOOL_StandardDTrace_DTRACE_HDR_CMDS)
-+ $(QUIET)paxmark.sh -m "$(VBOX_VBOXTPG)"
- $(QUIET)$(VBOX_VBOXTPG) --generate-wrapper-header --host-$(VBOX_HC_ARCH_BITS)-bit --ring-3-context \
- $(filter-out -C, $(filter-out -h,$(flags))) \
- -o "$(out).tmp" -s "$(source)"
---- a/src/VBox/VMM/Makefile.kmk 2018-04-10 15:26:24.622867735 +0300
-+++ b/src/VBox/VMM/Makefile.kmk 2018-04-10 15:24:35.901998796 +0300
-@@ -896,6 +896,7 @@
- $$(VMMLibDTrace_0_OUTDIR)/$1: $2 $$(VBOX_VBOXCPP) | $$$$(dir $$$$@)
- $$(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
- $$(QUIET)$$(call MSG_GENERATE,VMMLibDTrace,$$@,$2)
-+ $$(QUIET)paxmark.sh -m "$(VBOX_VBOXCPP)"
- $$(QUIET)$(VBOX_VBOXCPP) -d \
- -D VBOX_FOR_DTRACE_LIB \
- -D VBOX_FOR_DTRACE_LIB_$(toupper $(KBUILD_TARGET_ARCH)) \
---- a/src/VBox/Main/Makefile.kmk 2018-04-10 15:26:15.292793067 +0300
-+++ b/src/VBox/Main/Makefile.kmk 2018-04-10 15:25:14.042303341 +0300
-@@ -607,6 +607,7 @@
- $(PATH_SUB_CURRENT)/src-server/usb.ids $(PATH_SUB_CURRENT)/src-server/custom.ids | $$(dir $$@)
- $(call KB_FN_AUTO_CMD_DEPS_COMMANDS)
- $(call MSG_GENERATE,USBIdDatabase,$@,$(USBIdDatabaseGenerator_1_TARGET))
-+ $(QUIET)paxmark.sh -m "$(USBIdDatabaseGenerator_1_TARGET)"
- $(QUIET)$(USBIdDatabaseGenerator_1_TARGET) -o "$@" $(filter %.ids,$^)
-
- BLDPROGS += USBIdDatabaseGenerator
diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.34-no-pam.patch b/app-emulation/virtualbox/files/virtualbox-6.1.34-no-pam.patch
deleted file mode 100644
index 9266cece55bd..000000000000
--- a/app-emulation/virtualbox/files/virtualbox-6.1.34-no-pam.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-https://bugs.gentoo.org/843437
-https://www.virtualbox.org/changeset/94406/vbox
-
---- a/src/VBox/Runtime/Makefile.kmk
-+++ b/src/VBox/Runtime/Makefile.kmk
-@@ -324,4 +324,7 @@
- ifdef IPRT_WITH_FUTEX_BASED_SEMS
- RuntimeR3_DEFS.linux += IPRT_WITH_FUTEX_BASED_SEMS
-+endif
-+ifdef IPRT_WITHOUT_PAM
-+ RuntimeR3_DEFS += IPRT_WITHOUT_PAM
- endif
- RuntimeR3_INCS = \
---- a/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
-+++ b/src/VBox/Runtime/r3/posix/process-creation-posix.cpp
-@@ -86,4 +86,5 @@
-
- #if !defined(IPRT_USE_PAM) \
-+ && !defined(IPRT_WITHOUT_PAM) \
- && ( defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) || defined(RT_OS_NETBSD) || defined(RT_OS_OPENBSD) )
- # define IPRT_USE_PAM
-
diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.34-python3.10.patch b/app-emulation/virtualbox/files/virtualbox-6.1.34-python3.10.patch
deleted file mode 100644
index eacc77a7f5bc..000000000000
--- a/app-emulation/virtualbox/files/virtualbox-6.1.34-python3.10.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-https://bugs.gentoo.org/852152
-
---- VirtualBox-6.1.34/configure
-+++ VirtualBox-6.1.34/configure
-@@ -2027,7 +2027,7 @@
- }
- EOF
- found=
-- SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m python3.7 python3.7m python3.8 python3.8m python3.9 python3.9m"
-+ SUPPYTHONLIBS="python2.7 python2.6 python3.1 python3.2 python3.3 python3.4 python3.4m python3.5 python3.5m python3.6 python3.6m python3.7 python3.7m python3.8 python3.8m python3.9 python3.9m python3.10 python3.10m"
- for p in $PYTHONDIR; do
- for d in $SUPPYTHONLIBS; do
- for b in lib/x86_64-linux-gnu lib/i386-linux-gnu lib64 lib/64 lib; do
diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.34-r3-python3.10.patch b/app-emulation/virtualbox/files/virtualbox-6.1.34-r3-python3.10.patch
deleted file mode 100644
index e06e86910103..000000000000
--- a/app-emulation/virtualbox/files/virtualbox-6.1.34-r3-python3.10.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-https://github.com/archlinux/svntogit-community/blob/b103146beee8b7c70d04685033a8536aed2e5aea/trunk/002-python310.patch
-https://github.com/archlinux/svntogit-community/blob/b103146beee8b7c70d04685033a8536aed2e5aea/trunk/003-pyunicode.patch
-
-https://www.virtualbox.org/changeset/90537/vbox
-https://www.virtualbox.org/changeset/86623/vbox
---- a/src/libs/xpcom18a4/python/src/module/_xpcom.cpp
-+++ b/src/libs/xpcom18a4/python/src/module/_xpcom.cpp
-@@ -84,7 +84,11 @@
- # define MANGLE_MODULE_INIT(a_Name) RT_CONCAT(a_Name, MODULE_NAME_SUFFIX)
- # endif
- # ifdef VBOX_PYXPCOM_VERSIONED
--# if PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
-+# if PY_VERSION_HEX >= 0x030a0000 && PY_VERSION_HEX < 0x030b0000
-+# define MODULE_NAME MANGLE_MODULE_NAME("VBoxPython3_10")
-+# define initVBoxPython MANGLE_MODULE_INIT(PyInit_VBoxPython3_10)
-+
-+# elif PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
- # define MODULE_NAME MANGLE_MODULE_NAME("VBoxPython3_9")
- # define initVBoxPython MANGLE_MODULE_INIT(PyInit_VBoxPython3_9)
-
---- a/src/libs/xpcom18a4/python/Makefile.kmk
-+++ b/src/libs/xpcom18a4/python/Makefile.kmk
-@@ -4,7 +4,7 @@
- #
-
- #
--# Copyright (C) 2009-2017 Oracle Corporation
-+# Copyright (C) 2009-2021 Oracle Corporation
- #
- # This file is part of VirtualBox Open Source Edition (OSE), as
- # available from http://www.virtualbox.org. This file is free software;
-@@ -20,7 +20,7 @@
-
- #
- # List of supported Python versions, defining a number of
--# VBOX_PYTHON[26|27|31|32|32M|33|33M|34|34M|35|35M|36|36M|37|37M|38|38M|39|39M|DEF]_[INC|LIB] variables
-+# VBOX_PYTHON[26|27|31|32|32M|33|33M|34|34M|35|35M|36|36M|37|37M|38|38M|39|39M|310|310M|DEF]_[INC|LIB] variables
- # which get picked up below.
- #
- ifeq ($(KBUILD_TARGET),darwin) # Relatively predictable, don't script.
-@@ -646,6 +646,52 @@
- endif
- endif
-
-+ifdef VBOX_PYTHON310_INC
-+#
-+# Python 3.10 version
-+#
-+DLLS += VBoxPython3_10
-+VBoxPython3_10_EXTENDS = VBoxPythonBase
-+VBoxPython3_10_EXTENDS_BY = appending
-+VBoxPython3_10_TEMPLATE = XPCOM
-+VBoxPython3_10_INCS = $(VBOX_PYTHON310_INC)
-+VBoxPython3_10_LIBS = $(VBOX_PYTHON310_LIB)
-+
-+ ifdef VBOX_WITH_32_ON_64_MAIN_API
-+ ifdef VBOX_PYTHON310_LIB_X86
-+DLLS += VBoxPython3_10_x86
-+VBoxPython3_10_x86_EXTENDS = VBoxPythonBase_x86
-+VBoxPython3_10_x86_EXTENDS_BY = appending
-+VBoxPython3_10_x86_TEMPLATE = XPCOM
-+VBoxPython3_10_x86_INCS = $(VBOX_PYTHON310_INC)
-+VBoxPython3_10_x86_LIBS = $(VBOX_PYTHON310_LIB_X86)
-+ endif
-+ endif
-+endif
-+
-+ifdef VBOX_PYTHON310M_INC
-+#
-+# Python 3.10 version with pymalloc
-+#
-+DLLS += VBoxPython3_10m
-+VBoxPython3_10m_EXTENDS = VBoxPythonBase_m
-+VBoxPython3_10m_EXTENDS_BY = appending
-+VBoxPython3_10m_TEMPLATE = XPCOM
-+VBoxPython3_10m_INCS = $(VBOX_PYTHON310M_INC)
-+VBoxPython3_10m_LIBS = $(VBOX_PYTHON310M_LIB)
-+
-+ ifdef VBOX_WITH_32_ON_64_MAIN_API
-+ ifdef VBOX_PYTHON310M_LIB_X86
-+DLLS += VBoxPython3_10m_x86
-+VBoxPython3_10m_x86_EXTENDS = VBoxPythonBase_x86_m
-+VBoxPython3_10m_x86_EXTENDS_BY = appending
-+VBoxPython3_10m_x86_TEMPLATE_ = XPCOM
-+VBoxPython3_10m_x86_INCS = $(VBOX_PYTHON310M_INC)
-+VBoxPython3_10m_x86_LIBS = $(VBOX_PYTHON310M_LIB_X86)
-+ endif
-+ endif
-+endif
-+
- ifdef VBOX_PYTHONDEF_INC
- #
- # Python without versioning
-@@ -730,4 +776,3 @@
-
-
- include $(FILE_KBUILD_SUB_FOOTER)
--
-
---- a/src/libs/xpcom18a4/python/src/PyXPCOM.h
-+++ b/src/libs/xpcom18a4/python/src/PyXPCOM.h
-@@ -137,12 +137,14 @@
- # define PyInt_Check(o) PyLong_Check(o)
- # define PyInt_AsLong(o) PyLong_AsLong(o)
- # define PyNumber_Int(o) PyNumber_Long(o)
--# ifndef PyUnicode_AsUTF8
--# define PyUnicode_AsUTF8(o) _PyUnicode_AsString(o)
-+# if !defined(Py_LIMITED_API) && PY_VERSION_HEX <= 0x03030000 /* 3.3 added PyUnicode_AsUTF8AndSize */
-+# ifndef PyUnicode_AsUTF8
-+# define PyUnicode_AsUTF8(o) _PyUnicode_AsString(o)
-+# endif
-+# ifndef PyUnicode_AsUTF8AndSize
-+# define PyUnicode_AsUTF8AndSize(o,s) _PyUnicode_AsStringAndSize(o,s)
-+# endif
- # endif
--# ifndef PyUnicode_AsUTF8AndSize
--# define PyUnicode_AsUTF8AndSize(o,s) _PyUnicode_AsStringAndSize(o,s)
--# endif
- typedef struct PyMethodChain
- {
- PyMethodDef *methods;
-
diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.34-vboxr0.patch b/app-emulation/virtualbox/files/virtualbox-6.1.34-vboxr0.patch
deleted file mode 100644
index 8d8105edee9a..000000000000
--- a/app-emulation/virtualbox/files/virtualbox-6.1.34-vboxr0.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-https://www.virtualbox.org/ticket/20904
-
---- VirtualBox-6.1.34/Config.kmk
-+++ VirtualBox-6.1.34/Config.kmk
-@@ -4502,11 +4502,14 @@
- 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
diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.36-fcf-protection.patch b/app-emulation/virtualbox/files/virtualbox-6.1.36-fcf-protection.patch
new file mode 100644
index 000000000000..14b11f734c71
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-6.1.36-fcf-protection.patch
@@ -0,0 +1,16 @@
+Bug https://bugs.gentoo.org/865361
+
+gcc does not support -fcf-protection for i386 (needs i686+),
+so disable it when building iPxeBaseBin.
+
+--- a/src/VBox/Devices/PC/ipxe/Makefile.kmk
++++ b/src/VBox/Devices/PC/ipxe/Makefile.kmk
+@@ -176,6 +177,8 @@
+
+ iPxeBaseBin_TEMPLATE = iPxe
+
++ iPxeBaseBin_CFLAGS = -fcf-protection=none
++
+ iPxeBaseBin_INCS = \
+ src \
+ src/include \
diff --git a/app-emulation/virtualbox/files/virtualbox-6.1.44-fix-libxml2.patch b/app-emulation/virtualbox/files/virtualbox-6.1.44-fix-libxml2.patch
new file mode 100644
index 000000000000..c3e76e58c3f2
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-6.1.44-fix-libxml2.patch
@@ -0,0 +1,25 @@
+With dev-libs/libxml2-2.11, xi:include errors out if it can't find a file, so add an empty fallback.
+Used to work with dev-libs/libxml2-2.10.
+
+See also: https://bugs.gentoo.org/906309
+
+--- a/doc/manual/en_US/user_Frontends.xml
++++ b/doc/manual/en_US/user_Frontends.xml
+@@ -1205,6 +1205,6 @@
+
+ </sect1>
+
+- <xi:include href="user_man_VBoxHeadless.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" />
++ <xi:include href="user_man_VBoxHeadless.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include>
+
+ </chapter>
+--- b/doc/manual/en_US/user_VBoxManage.xml
++++ a/doc/manual/en_US/user_VBoxManage.xml
+@@ -8975,6 +8975,6 @@
+ <!-- TODO: Figure out how we can handle other manpages. The xml is bolted to
+ sect1, so it's not possible to have them "in place" -->
+
+- <xi:include href="user_man_vboximg-mount.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" />
++ <xi:include href="user_man_vboximg-mount.xml" xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" ><xi:fallback/></xi:include>
+
+ </chapter>
diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.14-libxml2-2.12.patch b/app-emulation/virtualbox/files/virtualbox-7.0.14-libxml2-2.12.patch
new file mode 100644
index 000000000000..a523bad41a30
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-7.0.14-libxml2-2.12.patch
@@ -0,0 +1,43 @@
+Bug: https://bugs.gentoo.org/922445
+
+The change in libxml2 is not backwards compatibe.
+A patch like the one in arch does not work with 2.11, so just cast the argument to maintain compatibility with both.
+
+The upstream change is in include/libxml/xmlerror.h:
+
+ typedef xmlError *xmlErrorPtr;
+
+-typedef void (*xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
++typedef void (*xmlStructuredErrorFunc) (void *userData, const xmlError *error);
+
+See also: https://gitlab.archlinux.org/archlinux/packaging/packages/virtualbox/-/blob/main/019-libxml-2-12.patch?ref_type=heads
+
+--- a/src/VBox/Runtime/r3/xml.cpp
++++ b/src/VBox/Runtime/r3/xml.cpp
+@@ -1870,7 +1870,7 @@
+ throw std::bad_alloc();
+ /* per-thread so it must be here */
+ xmlSetGenericErrorFunc(NULL, xmlParserBaseGenericError);
+- xmlSetStructuredErrorFunc(NULL, xmlParserBaseStructuredError);
++ xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc)xmlParserBaseStructuredError);
+ }
+
+ XmlParserBase::~XmlParserBase()
+@@ -1931,7 +1931,7 @@
+ pcszFilename,
+ NULL, // encoding = auto
+ options)))
+- throw XmlError(xmlCtxtGetLastError(m_ctxt));
++ throw XmlError((xmlErrorPtr)xmlCtxtGetLastError(m_ctxt));
+
+ doc.refreshInternals();
+ }
+@@ -2191,7 +2191,7 @@
+ pcszFilename,
+ NULL, // encoding = auto
+ options)))
+- throw XmlError(xmlCtxtGetLastError(m_ctxt));
++ throw XmlError((xmlErrorPtr)xmlCtxtGetLastError(m_ctxt));
+
+ doc.refreshInternals();
+ }
diff --git a/app-emulation/virtualbox/files/virtualbox-7.0.8-disable-rebuild-iPxeBiosBin.patch b/app-emulation/virtualbox/files/virtualbox-7.0.8-disable-rebuild-iPxeBiosBin.patch
new file mode 100644
index 000000000000..29ec3aee72c1
--- /dev/null
+++ b/app-emulation/virtualbox/files/virtualbox-7.0.8-disable-rebuild-iPxeBiosBin.patch
@@ -0,0 +1,18 @@
+When compiling with clang we get:
+
+src/VBox/Devices/PC/ipxe/src/core/settings.c:310:8: error: fields must have a constant size: 'variable length array in structure' extension will never be supported
+
+Apply this patch conditionally to disable rebuilding iPxeBiosBin.rom when using clang.
+
+--- a/src/VBox/Devices/PC/ipxe/Makefile.kmk
++++ b/src/VBox/Devices/PC/ipxe/Makefile.kmk
+@@ -45,7 +45,8 @@
+ iPxeBiosBin_CLEAN = \
+ $(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.c \
+
+-if1of ($(KBUILD_TARGET), darwin os2 solaris win)
++# Disable building on Linux if using clang
++if1of ($(KBUILD_TARGET), darwin os2 solaris win linux)
+ $$(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.c: $(PATH_SUB_CURRENT)/iPxeBiosBin.rom $(VBOX_BIN2C) | $$(dir $$@)
+ $(call MSG_TOOL,bin2c,iPxeBiosBin,$<,$@)
+ $(QUIET)$(VBOX_BIN2C) -min 32 -max 56 -mask 0x1ff -export NetBiosBinary $< $@