diff --git a/emulators/virtualbox-ose-70/Makefile b/emulators/virtualbox-ose-70/Makefile index fdd678179189..b86de1fac4d1 100644 --- a/emulators/virtualbox-ose-70/Makefile +++ b/emulators/virtualbox-ose-70/Makefile @@ -1,9 +1,11 @@ PORTNAME= virtualbox-ose -DISTVERSION= 6.1.50 -PORTREVISION?= 8 +DISTVERSION= 7.0.24 +PORTREVISION?= 0 CATEGORIES= emulators MASTER_SITES= https://download.virtualbox.org/virtualbox/${DISTVERSION}/:src \ - LOCAL/bofh/emulators/virtualbox-ose:docs + LOCAL/bofh/emulators/virtualbox-ose:docs \ + LOCAL/vvd:docs +PKGNAMESUFFIX?= -70 DISTFILES= VirtualBox-${DISTVERSION}${EXTRACT_SUFX}:src \ VirtualBox-docs-${DISTVERSION}${EXTRACT_SUFX}:docs EXTRACT_ONLY= VirtualBox-${DISTVERSION}${EXTRACT_SUFX} \ @@ -25,12 +27,13 @@ BUILD_DEPENDS= gtar:archivers/gtar \ xsltproc:textproc/libxslt LIB_DEPENDS= libpng.so:graphics/png \ libcurl.so:ftp/curl -RUN_DEPENDS= ${LOCALBASE}/etc/rc.d/vboxnet:emulators/virtualbox-ose-kmod +RUN_DEPENDS= ${LOCALBASE}/etc/rc.d/vboxnet:emulators/virtualbox-ose-kmod-70 -USES= compiler:c++14-lang cpe gnome iconv pkgconfig ssl tar:bzip2 +USES= compiler:c++14-lang cpe gnome iconv qt:5 pkgconfig ssl tar:bzip2 CPE_VENDOR= oracle CPE_PRODUCT= vm_virtualbox USE_GNOME= libxml2 +USE_QT= buildtools:build linguisttools:build USE_RC_SUBR= vboxheadless vboxwatchdog HAS_CONFIGURE= yes @@ -39,10 +42,10 @@ CONFIGURE_ARGS+= --with-gcc="${CC}" --with-g++="${CXX}" CONFLICTS_INSTALL= virtualbox-ose-legacy \ virtualbox-ose-nox11-legacy \ - virtualbox-ose-70 \ - virtualbox-ose-nox11-70 + virtualbox-ose \ + virtualbox-ose-nox11 -PORTSCOUT= limit:^6\. +PORTSCOUT= limit:^7\.0\. SUB_FILES= pkg-message SUB_LIST= VBOXDIR=${VBOX_DIR} \ VBOX_ETC=${VBOX_ETC} \ @@ -72,7 +75,7 @@ PLIST_SUB= GUEST_VER=${DISTVERSION} \ SLAVE_PORT?= no -OPTIONS_DEFINE= AIO ALSA DBUS DEBUG DOCS GUESTADDITIONS NLS OPUS PULSEAUDIO \ +OPTIONS_DEFINE= AIO ALSA DBUS DEBUG DOCS GUESTADDITIONS NLS PULSEAUDIO \ PYTHON QT5 R0LOGGING UDPTUNNEL VBOXIMG VDE VNC WEBSERVICE VPX X11 OPTIONS_DEFAULT= AIO DBUS QT5 UDPTUNNEL VNC WEBSERVICE X11 .if ${SLAVE_PORT} == no @@ -87,7 +90,6 @@ AIO_DESC= Enable Asyncronous IO support (check pkg-message) DEBUG_DESC= Debug symbols, additional logs and assertions GUESTADDITIONS_DESC= Build with Guest Additions NLS_DESC= Native language support (requires QT5) -OPUS_DESC= Use libvpx for audio recording (requires VPX) QT5_DESC= Build with QT5 frontend (requires X11) R0LOGGING_DESC= Enable R0 logging (requires DEBUG) UDPTUNNEL_DESC= Build with UDP tunnel support @@ -103,9 +105,6 @@ DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus DBUS_CONFIGURE_OFF= --disable-dbus DEBUG_CONFIGURE_ON= --build-debug NLS_IMPLIES= QT5 -OPUS_IMPLIES= VPX -OPUS_LIB_DEPENDS= libopus.so:audio/opus -OPUS_CONFIGURE_OFF= --disable-libopus PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PULSEAUDIO_CONFIGURE_OFF= --disable-pulse PYTHON_USES= python @@ -116,7 +115,7 @@ PYTHON_VARS= pydistutils_pkgname=vboxapi pydistutils_pkgversion=1.0 QT5_IMPLIES= X11 QT5_USES= gl qmake:no_env qt:5 xorg QT5_USE= QT=buildtools:build,core,dbus,gui,linguisttools:build,opengl \ - QT=printsupport,widgets,x11extras XORG=xcb GL=gl + QT=printsupport,widgets,x11extras,xml XORG=xcb GL=gl QT5_CONFIGURE_ON= --enable-qt5 QT5_CONFIGURE_OFF= --disable-qt R0LOGGING_IMPLIES= DEBUG @@ -129,8 +128,8 @@ VNC_CONFIGURE_ON= --enable-vnc VPX_LIB_DEPENDS= libvpx.so:multimedia/libvpx VPX_CONFIGURE_OFF= --disable-libvpx WEBSERVICE_BUILD_DEPENDS= soapcpp2:devel/gsoap -X11_USES= sdl xorg -X11_USE= SDL=sdl XORG=x11,xcursor,xext,xinerama,xmu,xorgproto,xt +X11_USES= gl sdl xorg +X11_USE= GL=gl SDL=sdl XORG=x11,xcursor,xext,xinerama,xmu,xorgproto,xt X11_CONFIGURE_OFF= --build-headless ENV= @@ -139,9 +138,9 @@ ENV= .include .if ${SLAVE_PORT} == no -CONFLICTS_INSTALL+= virtualbox-ose-nox11 +CONFLICTS_INSTALL+= virtualbox-ose-nox11-70 .else -CONFLICTS_INSTALL+= virtualbox-ose +CONFLICTS_INSTALL+= virtualbox-ose-70 .endif .if ${PORT_OPTIONS:MDEBUG} @@ -177,7 +176,7 @@ VBOX_UTILS+= vboxwebsrv webtest .endif .if ${PORT_OPTIONS:MX11} -VBOX_PROGS+= VBoxSDL +#VBOX_PROGS+= VBoxSDL .endif .if ${PORT_OPTIONS:MPYTHON} || ${PORT_OPTIONS:MWEBSERVICE} @@ -204,24 +203,6 @@ KMK_FLAGS+= -j${MAKE_JOBS_NUMBER} .include .if ${CHOSEN_COMPILER_TYPE} == clang -# 1) llvm10 in FreeBSD before r364284 miscompiles virtualbox 6.1 causing errors. -# 2) llvm15 in FreeBSD miscompiles virtualbox 6.1 causing errors: PR#270189. -# Force llvm from ports. -.if ${OPSYS} == FreeBSD -# USES must be before .include , but CHOSEN_COMPILER_TYPE must be after. -# This is a workaround with possibility to define different llvm via VBOX_LLVM_VER in make.conf. -#USES+= llvm:min=11,max=14 -#CC= clang${LLVM_VERSION} -#CXX= clang++${LLVM_VERSION} -BUILD_DEPENDS+= clang${VBOX_LLVM_VER}:devel/llvm${VBOX_LLVM_VER} -CC= clang${VBOX_LLVM_VER} -CXX= clang++${VBOX_LLVM_VER} -.if ${LLVM_DEFAULT} < 11 || ${LLVM_DEFAULT} > 14 -VBOX_LLVM_VER?= 14 -.else -VBOX_LLVM_VER?= ${LLVM_DEFAULT} -.endif -.endif PATCH_DEPENDS+= ${LOCALBASE}/share/kBuild/tools/GXX3.kmk:devel/kBuild .endif @@ -402,7 +383,7 @@ do-install: ${WRKSRC}/src/VBox/Frontends/VirtualBox/images/OSE/VirtualBox_48px.png \ ${STAGEDIR}${PREFIX}/share/pixmaps/VBox.png ${INSTALL_DATA} \ - ${WRKSRC}/src/VBox/Installer/freebsd/virtualbox.desktop \ + ${FILESDIR}/virtualbox.desktop \ ${STAGEDIR}${PREFIX}/share/applications/virtualbox.desktop .endif diff --git a/emulators/virtualbox-ose-70/distinfo b/emulators/virtualbox-ose-70/distinfo index 08ac88176444..774d7e8d44a7 100644 --- a/emulators/virtualbox-ose-70/distinfo +++ b/emulators/virtualbox-ose-70/distinfo @@ -1,7 +1,7 @@ -TIMESTAMP = 1716920210 -SHA256 (VirtualBox-6.1.50.tar.bz2) = 73ff603842896cb8d86ac5a817eb5037d7d225d3c46ea238e39d7ba5aaf61a57 -SIZE (VirtualBox-6.1.50.tar.bz2) = 165959648 -SHA256 (VBoxGuestAdditions_6.1.50.iso) = af53e34c5a5ec143f3418ac01d00ed5f33f6b31bfdc92eb4714c99d9bccb6602 -SIZE (VBoxGuestAdditions_6.1.50.iso) = 64051200 -SHA256 (VirtualBox-docs-6.1.50.tar.bz2) = e5dc118e8bb8352c06d5359e4f75ceb339a3917f0727fd74ad02ff07251e67db -SIZE (VirtualBox-docs-6.1.50.tar.bz2) = 4063302 +TIMESTAMP = 1738097405 +SHA256 (VirtualBox-7.0.24.tar.bz2) = 340d66f52251e23d9bc1eb4fdf70e44cb9d1db69bc5064e3f7bdfb8bc0e3a458 +SIZE (VirtualBox-7.0.24.tar.bz2) = 174663788 +SHA256 (VirtualBox-docs-7.0.24.tar.bz2) = a4005ab62ff6352b820f3aba2c5a98b4541317433afff0d58d4b8c2678e75cdd +SIZE (VirtualBox-docs-7.0.24.tar.bz2) = 4766637 +SHA256 (VBoxGuestAdditions_7.0.24.iso) = 17b01cd40bc34a7b79e4922c8f68bea3da3b2348bc4cdeadc962f84f1a63e225 +SIZE (VBoxGuestAdditions_7.0.24.iso) = 54804480 diff --git a/emulators/virtualbox-ose-70/files/extrapatch-Config.kmk b/emulators/virtualbox-ose-70/files/extrapatch-Config.kmk index 775508d23b1b..4a91ac89097b 100644 --- a/emulators/virtualbox-ose-70/files/extrapatch-Config.kmk +++ b/emulators/virtualbox-ose-70/files/extrapatch-Config.kmk @@ -1,6 +1,6 @@ --- Config.kmk.orig 2021-04-28 16:21:25 UTC +++ Config.kmk -@@ -4931,7 +4931,7 @@ define TOOL_FREEBSDKMODLD_LINK_SYSMOD_CMDS +@@ -5958,7 +5942,7 @@ define TOOL_FREEBSDKMODLD_LINK_SYSMOD_CMDS | xargs -J% objcopy % $(out) ## Strip debug info (comment out if debugging or something). diff --git a/emulators/virtualbox-ose-70/files/patch-Config.kmk b/emulators/virtualbox-ose-70/files/patch-Config.kmk index 119926c9e025..9fe5ecdc458d 100644 --- a/emulators/virtualbox-ose-70/files/patch-Config.kmk +++ b/emulators/virtualbox-ose-70/files/patch-Config.kmk @@ -1,6 +1,6 @@ ---- Config.kmk.orig 2021-01-07 15:31:21 UTC -+++ Config.kmk -@@ -469,11 +469,11 @@ ifn1of ($(KBUILD_TARGET), win darwin) +--- Config.kmk.orig 2024-10-10 20:19:24.000000000 +0200 ++++ Config.kmk 2024-12-27 17:28:48.466891000 +0100 +@@ -579,11 +579,11 @@ # Enable OSS audio support. VBOX_WITH_AUDIO_OSS = 1 endif @@ -14,7 +14,7 @@ # Enable PulseAudio audio support. VBOX_WITH_AUDIO_PULSE = 1 endif -@@ -489,11 +489,11 @@ VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT = 1 +@@ -596,11 +596,11 @@ # (disabled with 6.1, since it's not complete/useful enough) VBOX_WITH_PCI_PASSTHROUGH = # Enable statically linked dbus support. @@ -28,7 +28,7 @@ VBOX_WITH_PAM = 1 endif # Enable internal networking. -@@ -501,7 +501,7 @@ VBOX_WITH_INTERNAL_NETWORKING = 1 +@@ -608,7 +608,7 @@ # Enable vmsvga (svga2) graphics device variant, 2D part VBOX_WITH_VMSVGA = 1 # Enable vmsvga (svga2) graphics device variant, 3D part @@ -36,8 +36,8 @@ +if1of ($(KBUILD_TARGET), darwin freebsd linux win) VBOX_WITH_VMSVGA3D = 1 endif - # Enable the generic 3D settings support if at least one 3D capable solution is enabled -@@ -647,7 +647,7 @@ VBOX_WITH_MAIN_USB_ID_DATABASE = 1 + # Enable vmsvga (svga2) graphics device variant, 3D part, VGPU10 DX commands +@@ -787,7 +787,7 @@ #endif # Set this to prefix all C symbols in XPCOM, to avoid dynamic linking problems # caused by our XPCOM library polluting the symbol namespace for system libs. @@ -46,97 +46,209 @@ VBOX_WITH_XPCOM_NAMESPACE_CLEANUP = 1 endif # The webservices api. -@@ -1064,10 +1064,6 @@ ifeq ($(KBUILD_TARGET),darwin) - VBOX_WITH_VBOXSDL= +@@ -1295,10 +1295,6 @@ + endif endif -ifeq ($(KBUILD_TARGET),freebsd) -- VBOX_WITH_DOCS= +- VBOX_WITH_DOCS = -endif - ifeq ($(KBUILD_TARGET),haiku) - # Don't bother with SDL ttf for now. - VBOX_WITH_SECURELABEL= -@@ -1228,7 +1224,7 @@ ifdef VBOX_OSE - VBOX_WITH_KCHMVIEWER= - VBOX_WITH_PLUGIN_CRYPT= - VBOX_WITH_DRAG_AND_DROP_PROMISES= + VBOX_WITH_VRDP_RDESKTOP = + # Permanent (no working SDL). +@@ -1457,7 +1453,7 @@ + # not yet + VBOX_WITH_PLUGIN_CRYPT = + VBOX_WITH_DRAG_AND_DROP_PROMISES = - ifn1of ($(KBUILD_TARGET), linux) + ifn1of ($(KBUILD_TARGET), freebsd linux) - VBOX_WITH_DOCS= - VBOX_WITH_DOCS_PACKING= + VBOX_WITH_DOCS = + VBOX_WITH_DOCS_PACKING = endif -@@ -4928,7 +4924,7 @@ define TOOL_FREEBSDKMODLD_LINK_SYSMOD_CMDS +@@ -3518,19 +3514,7 @@ + # + ## @todo consider maxing this out. + ifndef VBOX_GCC_std +- if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), darwin.arm64) # Go straight for c++17 here. + VBOX_GCC_std := -std=c++17 +- # else if "$(VBOX_CLANG_VERSION_CXX)" vge 60000 # Most language features complete by v6. Lib stuff was less complete in v6, but hopefully acceptable for out purposes. +- #VBOX_GCC_std := -std=c++17 +- else if "$(VBOX_CLANG_VERSION_CXX)" vge 50000 # darwin Xcode 5 allegedly knows what C++11 is +- VBOX_GCC_std := -std=c++11 +- # else if "$(VBOX_GCC_VERSION_CXX)" vge 70000 # Language feature P0512R0 was v8, rest v7 or earlier. Most lib stuff present in 7, complete in v12. +- #VBOX_GCC_std := -std=gnu++17 +- else if "$(VBOX_GCC_VERSION_CXX)" vge 40800 +- VBOX_GCC_std := -std=c++11 +- else if "$(VBOX_GCC_VERSION_CXX)" vge 40600 +- VBOX_GCC_std := -std=c++0x +- endif + endif + ifndef VBOX_VCC_std + if $(VBOX_VCC_TOOL_STEM) >= VCC141 # since 2017 15.3 +@@ -5484,11 +5468,11 @@ + # Solaris driver signing. + TEMPLATE_VBoxR0_POST_CMDS = $(VBOX_SIGN_DRIVER_CMDS) + else +- TEMPLATE_VBoxR0_LDFLAGS = -nostdlib -Bsymbolic -g ++ TEMPLATE_VBoxR0_LDFLAGS = -nostdlib -Bsymbolic -g -fuse-ld=bfd + ## @todo WTF doesn't the globals work? Debug info is supposed to be split everywhere. GRR + TEMPLATE_VBoxR0_LD_DEBUG = split + endif +- if "$(KBUILD_TARGET)" == "linux" && !defined(VBOX_WITH_KMOD_WRAPPED_R0_MODS) ++ if ( "$(KBUILD_TARGET)" == "linux" || "$(KBUILD_TARGET)" == "freebsd") && !defined(VBOX_WITH_KMOD_WRAPPED_R0_MODS) + VBOX_WITH_VBOXR0_AS_DLL = 1 + TEMPLATE_VBoxR0_DLLSUFF = .r0 + TEMPLATE_VBoxR0_CFLAGS += -fPIC +@@ -5499,7 +5483,7 @@ + else + TEMPLATE_VBoxR0_CFLAGS.amd64 += -mcmodel=kernel + TEMPLATE_VBoxR0_CXXFLAGS.amd64 += -mcmodel=kernel +- endif ++endif + ifdef VBOX_WITH_KMOD_WRAPPED_R0_MODS # For BTF/pahold issue we use -g1 + TEMPLATE_VBoxR0_DEFS += VBOX_WITH_KMOD_WRAPPED_R0_MODS + TEMPLATE_VBoxR0_LDFLAGS.linux += $(PATH_ROOT)/src/VBox/HostDrivers/Support/linux/VBoxR0-wrapped.lds +@@ -5880,7 +5864,7 @@ + # x86 FreeBSD (6.2 or something): + # cc -O2 -fno-strict-aliasing -pipe -Werror -D_KERNEL -DKLD_MODULE \ + # -nostdinc -I- -I. -I@ -I@/contrib/altq -I@/../include -I/usr/include \ +- # -finline-limit=8000 -fno-common -mno-align-long-strings -mpreferred-stack-boundary=2 \ ++ # -fno-common -mno-align-long-strings \ + # -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -ffreestanding -Wall -Wredundant-decls -Wnested-externs \ + # -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions \ + # -std=c99 -c ../my.c +@@ -5891,7 +5875,7 @@ + # + # AMD64 FreeBSD (7.1): + # cc -O2 -fno-strict-aliasing -pipe -D_KERNEL -DKLD_MODULE -std=c99 -nostdinc -I. -I@ -I@/contrib/altq \ +- # -finline-limit=8000 --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common \ ++ # --param inline-unit-growth=100 --param large-function-growth=1000 -fno-common \ + # -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx \ + # -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding \ + # -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign \ +@@ -5973,7 +5957,7 @@ | xargs -J% objcopy % $(outbase).kld - # Link the final .ko (a shared object). + # Link the final .ko (a shared object). - ld $(flags) -Bshareable -o $(out) $(outbase).kld -+ ld $(flags) -Bshareable -znotext -o $(out) $(outbase).kld - endef ++ ld $(flags) -Bshareable -znotext -o $(out) $(outbase).kld + endef endif # x86 -@@ -5205,6 +5201,7 @@ TEMPLATE_VBOXR3EXE_LDFLAGS.x86 = -m32 - TEMPLATE_VBOXR3EXE_LDFLAGS.amd64 = -m64 - TEMPLATE_VBOXR3EXE_LDFLAGS.sparc32 = -m32 - TEMPLATE_VBOXR3EXE_LDFLAGS.sparc64 = -m64 -+TEMPLATE_VBOXR3EXE_LDFLAGS.freebsd = -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) - TEMPLATE_VBOXR3EXE_LDFLAGS.linux = -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) - TEMPLATE_VBOXR3EXE_LDFLAGS.solaris = -Wl,-z,ignore # same as VBOX_LD_as_needed - TEMPLATE_VBOXR3EXE_LDFLAGS.debug = $(VBOX_GCC_SANITIZER_FLAGS) $(VBOX_GCC_SANITIZER_LDFLAGS) -@@ -5238,10 +5235,18 @@ TEMPLATE_VBOXR3EXE_LIBPATH += \ - TEMPLATE_VBOXR3EXE_CFLAGS += -fno-pic - TEMPLATE_VBOXR3EXE_CXXFLAGS += -fno-pic - TEMPLATE_VBOXR3EXE_LDFLAGS += -fno-pic +@@ -6008,7 +5992,7 @@ + $(VBOX_GCC_fdiagnostics-show-option) \ + -Wstrict-prototypes -Wmissing-prototypes -Wstrict-prototypes \ + -Wimplicit-function-declaration -Werror-implicit-function-declaration \ +- -O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \ ++ -O2 -ffreestanding -fno-strict-aliasing -fno-common \ + $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ + -nostdinc -std=c99 -msoft-float + TEMPLATE_VBoxR0Drv_CFLAGS.x86 = -m32 -mno-mmx -mno-sse -mno-avx \ +@@ -6019,7 +6003,7 @@ + -fno-asynchronous-unwind-tables -mno-fp-ret-in-387 + TEMPLATE_VBoxR0Drv_CXXFLAGS = -fno-exceptions -fno-rtti \ + $(VBOX_GCC_WARN) -Wpointer-arith -Winline \ +- -O2 -fno-strict-aliasing -fno-common -finline-limit=8000 \ ++ -O2 -fno-strict-aliasing -fno-common \ + $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ + -nostdinc -msoft-float + TEMPLATE_VBoxR0Drv_CXXFLAGS.x86 = $(TEMPLATE_VBoxR0Drv_CFLAGS.x86) +@@ -6318,11 +6302,11 @@ + TEMPLATE_VBoxR3Exe_LIBS = pthread m rt dl + else ifeq ($(KBUILD_TARGET),os2) + TEMPLATE_VBoxR3Exe_TOOL = GXX3OMF +- TEMPLATE_VBoxR3Exe_LIBS = socket iconv ++ TEMPLATE_VBoxR3Exe_LIBS = socket + else ifeq ($(KBUILD_TARGET),darwin) + TEMPLATE_VBoxR3Exe_TOOL = $(VBOX_GCC_TOOL) + TEMPLATE_VBoxR3Exe_LIBS = +- TEMPLATE_VBoxR3Exe_DEFS += LIBICONV_PLUG # Avoid 3rd party libiconv (from macports). ++ TEMPLATE_VBoxR3Exe_DEFS += LIBICONV_PLUG # Avoid 3rd party lib (from macports). + TEMPLATE_VBoxR3Exe_SDKS.darwin = $(VBOX_DARWIN_DEF_SDK_SDKS) + TEMPLATE_VBoxR3Exe_DEFS.darwin = $(VBOX_DARWIN_DEF_SDK_DEFS) + TEMPLATE_VBoxR3Exe_CFLAGS.darwin = $(VBOX_DARWIN_DEF_SDK_CFLAGS) -fno-common +@@ -6339,17 +6323,26 @@ + else ifeq ($(KBUILD_TARGET),haiku) + TEMPLATE_VBoxR3Exe_TOOL = GXX3 + TEMPLATE_VBoxR3Exe_POST_CMDS = $(VBOX_HAIKU_XRES_SETVER_CMDS) +- TEMPLATE_VBoxR3Exe_LIBS = network iconv stdc++ supc++ ++ TEMPLATE_VBoxR3Exe_LIBS = network stdc++ supc++ + TEMPLATE_VBoxR3Exe_LIBPATH += \ + /boot/common/lib + # Haiku uses PIC by default... + TEMPLATE_VBoxR3Exe_CFLAGS += -fno-pic + TEMPLATE_VBoxR3Exe_CXXFLAGS += -fno-pic + TEMPLATE_VBoxR3Exe_LDFLAGS += -fno-pic - else if1of ($(KBUILD_TARGET), freebsd openbsd) -+ else ifeq ($(KBUILD_TARGET),freebsd) - TEMPLATE_VBOXR3EXE_TOOL = GXX3 - TEMPLATE_VBOXR3EXE_LIBS = pthread -+TEMPLATE_VBOXR3EXE_LDFLAGS.freebsd.x86 = -Wl,-z,notext - TEMPLATE_VBOXR3EXE_INCS += \ -+ /usr/local/include -+TEMPLATE_VBOXR3EXE_LIBPATH += \ -+ /usr/local/lib -+ else ifeq ($(KBUILD_TARGET),openbsd) -+TEMPLATE_VBOXR3EXE_TOOL = GXX3 -+TEMPLATE_VBOXR3EXE_LIBS = pthread -+TEMPLATE_VBOXR3EXE_INCS += \ - /usr/include \ - /usr/X11R6/include \ - /usr/local/include -@@ -5273,6 +5278,7 @@ TEMPLATE_VBOXR3EXE_CXXFLAGS.kprofile = $(TEMPLATE_VB - TEMPLATE_VBOXR3EXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)' ++ else ifeq ($(KBUILD_TARGET), freebsd) + TEMPLATE_VBoxR3Exe_TOOL = GXX3 + TEMPLATE_VBoxR3Exe_LIBS = pthread ++ TEMPLATE_VBoxR3Exe_LDFLAGS = -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) ++ TEMPLATE_VBoxR3Exe_LDFLAGS.freebsd.x86 = -Wl,-z,notext + TEMPLATE_VBoxR3Exe_INCS += \ ++ /usr/local/include ++ TEMPLATE_VBoxR3Exe_LIBPATH += \ ++ /usr/local/lib ++ else ifeq ($(KBUILD_TARGET), openbsd) ++ TEMPLATE_VBoxR3Exe_TOOL = GXX3 ++ TEMPLATE_VBoxR3Exe_LIBS = pthread ++ TEMPLATE_VBoxR3Exe_INCS += \ + /usr/include \ + /usr/X11R6/include \ + /usr/local/include +@@ -6368,7 +6361,7 @@ + /usr/X11R7/lib + else ifeq ($(KBUILD_TARGET),solaris) + TEMPLATE_VBoxR3Exe_TOOL = GXX3PLAIN +- TEMPLATE_VBoxR3Exe_DEFS += LIBICONV_PLUG _REENTRANT # Avoid the GNU libiconv, for now at least. ++ TEMPLATE_VBoxR3Exe_DEFS += LIBICONV_PLUG _REENTRANT # Avoid the GNU lib, for now at least. + if $(VBOX_GCC_VERSION_CC) < 30500 + TEMPLATE_VBoxR3Exe_CFLAGS += -std=gnu99 + endif +@@ -6384,6 +6377,7 @@ + TEMPLATE_VBoxR3Exe_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)' endif ifdef VBOX_WITH_ORIGIN -+ TEMPLATE_VBOXR3EXE_LDFLAGS.freebsd += $(VBOX_GCC_ORIGIN_OPT) - TEMPLATE_VBOXR3EXE_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT) ++ TEMPLATE_VBoxR3Exe_LDFLAGS.freebsd += $(VBOX_GCC_ORIGIN_OPT) + TEMPLATE_VBoxR3Exe_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT) endif endif -@@ -5412,7 +5418,7 @@ ifeq ($(KBUILD_TARGET),win) - $(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL.win.amd64)_LIB)/libcmt$(VBOX_VCC_CRT_TYPE).lib \ - $(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL.win.amd64)_LIB)/libcpmt$(VBOX_VCC_CRT_TYPE).lib \ - $(PATH_TOOL_$(TEMPLATE_VBOXR3STATIC_TOOL.win.amd64)_LIB)/oldnames.lib --else ifn1of ($(KBUILD_TARGET), darwin linux solaris) -+else ifn1of ($(KBUILD_TARGET), darwin freebsd linux solaris) - # The gcc guys sans darwin, linux and solaris (don't depend on statically compiled system libs there) - TEMPLATE_VBOXR3STATIC_CFLAGS = $(TEMPLATE_VBOXR3EXE_CFLAGS) -static - TEMPLATE_VBOXR3STATIC_CXXFLAGS = $(TEMPLATE_VBOXR3EXE_CXXFLAGS) -static -@@ -5557,6 +5563,7 @@ ifeq ($(KBUILD_TARGET),win) # No CRT! - else ifn1of ($(KBUILD_TARGET), os2 solaris) - # We want to keep the RPATH on Solaris to be able to find libgcc_1/libstdc++ within $(VBOX_WITH_RUNPATH) - TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBOXR3EXE_LDFLAGS)) -+ TEMPLATE_VBoxR3HardenedTstDll_LDFLAGS.freebsd = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBoxR3TstDll_LDFLAGS.freebsd)) - TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux)) +@@ -6590,7 +6584,7 @@ + ifdef VBOX_WITH_NOCRT_STATIC + TEMPLATE_VBoxR3StaticBase_DEFS += RT_WITH_NOCRT_WRAPPERS + endif +- ifn1of ($(KBUILD_TARGET), darwin linux solaris) ++ ifn1of ($(KBUILD_TARGET), darwin freebsd linux solaris) + # The gcc guys sans darwin, linux and solaris (don't depend on statically compiled system libs there) + TEMPLATE_VBoxR3StaticBase_CFLAGS = $(TEMPLATE_VBoxR3Exe_CFLAGS) -static + TEMPLATE_VBoxR3StaticBase_CXXFLAGS = $(TEMPLATE_VBoxR3Exe_CXXFLAGS) -static +@@ -6656,7 +6650,7 @@ + $(SDK_VBoxLzf_LIBS) \ + $(SDK_VBoxZlib_LIBS) + if1of ($(KBUILD_TARGET), darwin freebsd) +- TEMPLATE_VBoxR3Static_LIBS += iconv ++ TEMPLATE_VBoxR3Static_LIBS += + else ifeq ($(KBUILD_TARGET),solaris) + TEMPLATE_VBoxR3Static_LIBS += kstat + endif +@@ -6830,6 +6824,7 @@ + else ifn1of ($(KBUILD_TARGET), os2) + ifneq ($(KBUILD_TYPE),asan) # Keep RPATH in asan builds so we can find libasan.so.X and libubsan.so.Y. + TEMPLATE_VBoxR3HardenedExe_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBoxR3Exe_LDFLAGS)) ++ TEMPLATE_VBoxR3HardenedExe_LDFLAGS.freebsd = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBoxR3Exe_LDFLAGS.freebsd)) + TEMPLATE_VBoxR3HardenedExe_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBoxR3Exe_LDFLAGS.linux)) + endif endif - -@@ -5584,6 +5591,7 @@ TEMPLATE_VBoxR3HardenedTstDll_INST = $(INST_TESTCASE) - TEMPLATE_VBoxR3HardenedTstDll_LDFLAGS.win = $(TEMPLATE_VBoxR3TstDll_LDFLAGS.win) -IntegrityCheck +@@ -6861,6 +6856,7 @@ + $(if-expr !defined(VBOX_WITHOUT_WINDOWS_KERNEL_CODE_SIGNING_CERT),-IntegrityCheck,) ifn1of ($(KBUILD_TARGET), win os2) TEMPLATE_VBoxR3HardenedTstDll_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBoxR3TstDll_LDFLAGS)) + TEMPLATE_VBoxR3HardenedTstDll_LDFLAGS.freebsd = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBoxR3TstDll_LDFLAGS.freebsd)) TEMPLATE_VBoxR3HardenedTstDll_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBoxR3TstDll_LDFLAGS.linux)) endif -@@ -5606,6 +5614,7 @@ ifndef VBOX_WITH_HARDENING +@@ -6884,6 +6880,7 @@ TEMPLATE_VBoxR3SetUidToRoot_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)' endif ifdef VBOX_WITH_ORIGIN @@ -144,91 +256,145 @@ TEMPLATE_VBoxR3SetUidToRoot_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT) endif endif -@@ -6132,10 +6141,19 @@ TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTI +@@ -7208,7 +7205,7 @@ + endif + TEMPLATE_VBoxMainExe_CXXFLAGS = -g $(VBOX_GCC_pipe) \ + $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_Wno-multistatement-macros) $(VBOX_GCC_Wno-class-memaccess) -Wshadow \ +- -fshort-wchar -fpermissive -fexceptions -frtti $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing \ ++ -fshort-wchar -fexceptions -frtti $(VBOX_GCC_OPT) $(VBOX_GCC_FP) -fno-strict-aliasing \ + $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_std) $(VBOX_GCC_IPRT_FMT_CHECK) \ + $(VBOX_GCC_SANITIZER_FLAGS) + if !defined("VBOX_GCC_Wno-delete-non-virtual-dtor") && defined("VBOX_GCC_Wno-non-virtual-dtor") +@@ -7272,10 +7269,19 @@ else ifeq ($(KBUILD_TARGET),haiku) - TEMPLATE_VBOXMAINEXE_TOOL = GXX3 - TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME) network stdc++ supc++ + TEMPLATE_VBoxMainExe_TOOL = GXX3 + TEMPLATE_VBoxMainExe_LIBS = $(LIB_RUNTIME) network stdc++ supc++ - else if1of ($(KBUILD_TARGET), freebsd openbsd) -+ else ifeq ($(KBUILD_TARGET),freebsd) - TEMPLATE_VBOXMAINEXE_TOOL = GXX3 - TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME) -+TEMPLATE_VBOXMAINEXE_LDFLAGS.freebsd = -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) -+TEMPLATE_VBOXMAINEXE_LDFLAGS.freebsd.x86 = -Wl,-z,notext - TEMPLATE_VBOXMAINEXE_INCS += \ -+ /usr/local/include -+TEMPLATE_VBOXMAINEXE_LIBPATH += \ -+ /usr/local/lib -+ else ifeq ($(KBUILD_TARGET),openbsd) -+TEMPLATE_VBOXMAINEXE_TOOL = GXX3 -+TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTIME) -+TEMPLATE_VBOXMAINEXE_INCS += \ - /usr/include \ - /usr/X11R6/include \ - /usr/local/include -@@ -6167,6 +6185,7 @@ TEMPLATE_VBOXMAINEXE_LDFLAGS += '$(VBOX_GCC - TEMPLATE_VBOXMAINEXE_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)' ++ else ifeq ($(KBUILD_TARGET), freebsd) + TEMPLATE_VBoxMainExe_TOOL = GXX3 + TEMPLATE_VBoxMainExe_LIBS = $(LIB_RUNTIME) ++ TEMPLATE_VBoxMainExe_LDFLAGS = -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) ++ TEMPLATE_VBoxMainExe_LDFLAGS.freebsd.x86 = -Wl,-z,notext + TEMPLATE_VBoxMainExe_INCS += \ ++ /usr/local/include ++ TEMPLATE_VBoxMainExe_LIBPATH += \ ++ /usr/local/lib ++ else ifeq ($(KBUILD_TARGET), openbsd) ++ TEMPLATE_VBoxMainExe_TOOL = GXX3 ++ TEMPLATE_VBoxMainExe_LIBS = $(LIB_RUNTIME) ++ TEMPLATE_VBoxMainExe_INCS += \ + /usr/include \ + /usr/X11R6/include \ + /usr/local/include +@@ -7307,6 +7313,7 @@ + TEMPLATE_VBoxMainExe_LDFLAGS += '$(VBOX_GCC_RPATH_OPT)$(VBOX_WITH_RELATIVE_RUNPATH)' endif ifdef VBOX_WITH_ORIGIN -+TEMPLATE_VBOXMAINEXE_LDFLAGS.freebsd += $(VBOX_GCC_ORIGIN_OPT) - TEMPLATE_VBOXMAINEXE_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT) ++ TEMPLATE_VBoxMainExe_LDFLAGS.freebsd += $(VBOX_GCC_ORIGIN_OPT) + TEMPLATE_VBoxMainExe_LDFLAGS.linux += $(VBOX_GCC_ORIGIN_OPT) endif -@@ -6735,13 +6754,11 @@ ifdef VBOX_WITH_QTGUI - TEMPLATE_VBOXQTGUIEXE_LIBPATH += \ - $(VBOX_LIBPATH_X11) +@@ -7943,13 +7950,11 @@ + TEMPLATE_VBoxQtGuiExe_LIBPATH += \ + $(VBOX_LIBPATH_X11) ifeq ($(KBUILD_TARGET),freebsd) -+ TEMPLATE_VBOXQTGUIEXE_LDFLAGS += -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) -+ TEMPLATE_VBOXQTGUIEXE_LDFLAGS.freebsd.x86 = -Wl,-z,notext - TEMPLATE_VBOXQTGUIEXE_INCS += \ -- /usr/include \ -- /usr/X11R6/include \ - /usr/local/include - TEMPLATE_VBOXQTGUIEXE_LIBPATH += \ -- /usr/lib \ -- /usr/X11R6/lib \ - /usr/local/lib ++ TEMPLATE_VBoxQtGuiExe_LDFLAGS += -Wl,-z,noexecstack,-z,relro $(VBOX_LD_as_needed) ++ TEMPLATE_VBoxQtGuiExe_LDFLAGS.freebsd.x86 = -Wl,-z,notext + TEMPLATE_VBoxQtGuiExe_INCS += \ +- /usr/include \ +- /usr/X11R6/include \ + /usr/local/include + TEMPLATE_VBoxQtGuiExe_LIBPATH += \ +- /usr/lib \ +- /usr/X11R6/lib \ + /usr/local/lib endif ifeq ($(KBUILD_TARGET),solaris) -@@ -6988,10 +7005,17 @@ TEMPLATE_VBoxBldProg_TOOL = GXX3 - TEMPLATE_VBoxBldProg_LIBS = network iconv - TEMPLATE_VBoxBldProg_LIBPATH += \ - /boot/common/lib +@@ -8231,7 +8236,7 @@ + TEMPLATE_VBoxBldProg_LIBS = pthread m rt dl + else ifeq ($(KBUILD_HOST),os2) + TEMPLATE_VBoxBldProg_TOOL = GXX3OMF +- TEMPLATE_VBoxBldProg_LIBS = socket iconv ++ TEMPLATE_VBoxBldProg_LIBS = socket + else ifeq ($(KBUILD_HOST),darwin) + TEMPLATE_VBoxBldProg_TOOL = $(VBOX_GCC_TOOL) + if "$(VBOX_DEF_MACOSX_VERSION_MIN)" == "10.7" || "$(VBOX_DARWIN_HOST_VERSION_MAJOR)" == "7" +@@ -8271,13 +8276,20 @@ + TEMPLATE_VBoxBldProg_LIBS = + else ifeq ($(KBUILD_HOST),haiku) + TEMPLATE_VBoxBldProg_TOOL = GXX3 +- TEMPLATE_VBoxBldProg_LIBS = network iconv ++ TEMPLATE_VBoxBldProg_LIBS = network + TEMPLATE_VBoxBldProg_LIBPATH += \ + /boot/common/lib - else if1of ($(KBUILD_HOST), freebsd openbsd) -+ else ifeq ($(KBUILD_HOST),freebsd) - TEMPLATE_VBoxBldProg_TOOL = GXX3 - TEMPLATE_VBoxBldProg_LIBS = pthread - TEMPLATE_VBoxBldProg_INCS += \ -+ /usr/local/include -+TEMPLATE_VBoxBldProg_LIBPATH += \ -+ /usr/local/lib -+ else ifeq ($(KBUILD_HOST),openbsd) -+TEMPLATE_VBoxBldProg_TOOL = GXX3 -+TEMPLATE_VBoxBldProg_LIBS = pthread -+TEMPLATE_VBoxBldProg_INCS += \ - /usr/include \ - /usr/X11R6/include \ - /usr/local/include -@@ -7115,6 +7139,7 @@ else # the gcc guys - # Do not inherit sanitizer flags from VBOXR3EXE in guest executables. Deal with them separately. - TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS.debug = $(NO_SUCH_VARIABLE) - TEMPLATE_VBOXGUESTR3EXE_CFLAGS.debug = $(NO_SUCH_VARIABLE) -+ TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.freebsd = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.freebsd)) - TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux)) - TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.debug = $(NO_SUCH_VARIABLE) - TEMPLATE_VBOXGUESTR3EXE_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_VBOXR3EXE_LDFLAGS)) -@@ -7138,6 +7163,7 @@ TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS.linux = \ ++ else ifeq ($(KBUILD_HOST), freebsd) + TEMPLATE_VBoxBldProg_TOOL = $(VBOX_GCC_TOOL) + TEMPLATE_VBoxBldProg_LIBS = pthread + TEMPLATE_VBoxBldProg_INCS += \ ++ /usr/local/include ++ TEMPLATE_VBoxBldProg_LIBPATH += \ ++ /usr/local/lib ++ else ifeq ($(KBUILD_HOST), openbsd) ++ TEMPLATE_VBoxBldProg_TOOL = $(VBOX_GCC_TOOL) ++ TEMPLATE_VBoxBldProg_LIBS = pthread ++ TEMPLATE_VBoxBldProg_INCS += \ + /usr/include \ + /usr/X11R6/include \ + /usr/local/include +@@ -8324,11 +8336,11 @@ + $(TEMPLATE_VBoxBldProg_LIBS) + TEMPLATE_VBoxAdvBldProg_LIBS.darwin = \ + $(TEMPLATE_VBoxAdvBldProg_LIBS) \ +- iconv \ ++ \ + $(TEMPLATE_VBoxBldProg_LIBS.darwin) + TEMPLATE_VBoxAdvBldProg_LIBS.freebsd = \ + $(TEMPLATE_VBoxAdvBldProg_LIBS) \ +- iconv \ ++ \ + rt \ + $(TEMPLATE_VBoxBldProg_LIBS.freebsd) + TEMPLATE_VBoxAdvBldProg_LIBS.linux = \ +@@ -8419,6 +8431,7 @@ + # Do not inherit sanitizer flags from VBoxR3Exe in guest executables. Deal with them separately. + TEMPLATE_VBoxGuestR3ExeBase_CXXFLAGS.debug = $(NO_SUCH_VARIABLE) + TEMPLATE_VBoxGuestR3ExeBase_CFLAGS.debug = $(NO_SUCH_VARIABLE) ++ TEMPLATE_VBoxGuestR3ExeBase_LDFLAGS.freebsd = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_$(TEMPLATE_VBoxGuestR3ExeBase_EXTENDS)_LDFLAGS.freebsd)) + TEMPLATE_VBoxGuestR3ExeBase_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_$(TEMPLATE_VBoxGuestR3ExeBase_EXTENDS)_LDFLAGS.linux)) + TEMPLATE_VBoxGuestR3ExeBase_LDFLAGS.debug = $(NO_SUCH_VARIABLE) + TEMPLATE_VBoxGuestR3ExeBase_LDFLAGS = $(filter-out '$(VBOX_GCC_RPATH_OPT)%,$(TEMPLATE_$(TEMPLATE_VBoxGuestR3ExeBase_EXTENDS)_LDFLAGS)) +@@ -8442,7 +8455,7 @@ + ifeq ($(KBUILD_TARGET),linux) # As few libs as possible on linux. + TEMPLATE_VBoxGuestR3ExeBase_LIBS = pthread rt m dl + else if1of ($(KBUILD_TARGET), darwin freebsd openbsd) +- TEMPLATE_VBoxGuestR3ExeBase_LIBS = $(TEMPLATE_$(TEMPLATE_VBoxGuestR3ExeBase_EXTENDS)_LIBS) iconv ++ TEMPLATE_VBoxGuestR3ExeBase_LIBS = $(TEMPLATE_$(TEMPLATE_VBoxGuestR3ExeBase_EXTENDS)_LIBS) + else ifeq ($(KBUILD_TARGET),solaris) + TEMPLATE_VBoxGuestR3ExeBase_LIBS = $(TEMPLATE_$(TEMPLATE_VBoxGuestR3ExeBase_EXTENDS)_LIBS) nsl + endif +@@ -8455,6 +8468,7 @@ $(VBOX_GCC_fno-stack-protector) - TEMPLATE_VBOXGUESTR3EXE_CFLAGS.linux = $(TEMPLATE_VBOXGUESTR3EXE_CXXFLAGS.linux) + TEMPLATE_VBoxGuestR3ExeBase_CFLAGS.linux = $(TEMPLATE_VBoxGuestR3ExeBase_CXXFLAGS.linux) # The GNU_HASH ELF tag is not supported by older systems. -+TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.freebsd += $(VBOX_LD_hash_style_sysv) - TEMPLATE_VBOXGUESTR3EXE_LDFLAGS.linux += $(VBOX_LD_hash_style_sysv) ++TEMPLATE_VBoxGuestR3ExeBase_LDFLAGS.freebsd += $(VBOX_LD_hash_style_sysv) + TEMPLATE_VBoxGuestR3ExeBase_LDFLAGS.linux += $(VBOX_LD_hash_style_sysv) + + +@@ -8684,6 +8698,7 @@ + TEMPLATE_VBoxGuestR3XFree86Mod_CXXFLAGS.linux = $(VBOX_GCC_fno-stack-protector) # Remove symvers.h + TEMPLATE_VBoxGuestR3XFree86Mod_LDFLAGS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE) + # The GNU_HASH ELF tag is not supported by older glibc dynamic linkers. ++TEMPLATE_VBoxGuestR3XFree86Mod_LDFLAGS.freebsd = $(subst -Wl$(COMMA),,$(VBOX_LD_hash_style_sysv)) + TEMPLATE_VBoxGuestR3XFree86Mod_LDFLAGS.linux = $(subst -Wl$(COMMA),,$(VBOX_LD_hash_style_sysv)) + TEMPLATE_VBoxGuestR3XFree86Mod_LDFLAGS.$(KBUILD_TYPE) = $(NO_SUCH_VARIABLE) + TEMPLATE_VBoxGuestR3XFree86Mod_LDFLAGS := -r +@@ -8725,7 +8740,7 @@ + TEMPLATE_VBoxGuestR3XOrgMod_LIBS = $(VBOX_LIB_VBGL_R3_XORG) + TEMPLATE_VBoxGuestR3XOrgMod_LIBS.$(KBUILD_TYPE) = $(NO_SUCH_VARIABLE) + TEMPLATE_VBoxGuestR3XOrgMod_LIBS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE) +-TEMPLATE_VBoxGuestR3XOrgMod_LIBS.freebsd += iconv ++TEMPLATE_VBoxGuestR3XOrgMod_LIBS.freebsd += + # -@@ -7345,6 +7371,7 @@ TEMPLATE_VBOXGUESTR3XF86MOD_LIBS.$(KBUILD_TYPE) = - TEMPLATE_VBOXGUESTR3XF86MOD_LIBS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE) - TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.$(KBUILD_TARGET) = $(NO_SUCH_VARIABLE) - # The GNU_HASH ELF tag is not supported by older glibc dynamic linkers. -+TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.freebsd = $(subst -Wl$(COMMA),,$(VBOX_LD_hash_style_sysv)) - TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.linux = $(subst -Wl$(COMMA),,$(VBOX_LD_hash_style_sysv)) - TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS.$(KBUILD_TYPE) = $(NO_SUCH_VARIABLE) - TEMPLATE_VBOXGUESTR3XF86MOD_LDFLAGS = -r diff --git a/emulators/virtualbox-ose-70/files/patch-configure b/emulators/virtualbox-ose-70/files/patch-configure index 25015e642bc1..fe0f4247089b 100644 --- a/emulators/virtualbox-ose-70/files/patch-configure +++ b/emulators/virtualbox-ose-70/files/patch-configure @@ -1,6 +1,6 @@ ---- configure.orig 2021-10-18 17:47:25 UTC -+++ configure -@@ -139,10 +139,14 @@ CXX_FLAGS="" +--- configure.orig 2024-10-10 20:19:24.000000000 +0200 ++++ configure 2024-12-27 13:12:46.010746000 +0100 +@@ -154,10 +154,14 @@ if [ "$OS" = "freebsd" ]; then INCCURL="-I/usr/local/include" LIBCURL="-L/usr/local/lib -lcurl" @@ -15,7 +15,7 @@ else INCCURL="" LIBCURL="-lcurl" -@@ -1173,6 +1177,9 @@ extern "C" int main(int argc, char** arg +@@ -1207,6 +1211,9 @@ printf("found version %d.%d.%d", SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL); #if SDL_VERSION_ATLEAST(1,2,7) @@ -25,7 +25,7 @@ printf(", OK.\n"); return 0; #else -@@ -1257,7 +1264,7 @@ extern "C" int main(void) +@@ -1291,7 +1298,7 @@ #endif } EOF @@ -34,7 +34,7 @@ test_execute fi } -@@ -1564,6 +1571,7 @@ EOF +@@ -1605,6 +1612,7 @@ FLGQT5=`pkg-config Qt5Core --cflags` # gcc 4.8 is able to compile with C++11 (see also VBOX_GCC_std in Config.kmk) [ $(($cc_maj * 100 + $cc_min)) -ge 408 ] && FLGQT5="$FLGQT5 -std=c++11" @@ -42,16 +42,7 @@ INCQT5=`strip_I "$FLGQT5"` LIBDIR5=`pkg-config Qt5Core --variable=libdir` LIBQT5=`pkg-config Qt5Core Qt5Gui --libs` -@@ -1702,7 +1710,7 @@ check_libopus() - fi - cat > $ODIR.tmp_src.cc << EOF - #include --#include -+#include - extern "C" int main(void) - { - OpusEncoder *test; -@@ -2034,8 +2042,8 @@ EOF +@@ -2180,8 +2188,8 @@ echo "compiling the following source file:" >> $LOG cat $ODIR.tmp_src.cc >> $LOG echo "using the following command line:" >> $LOG @@ -62,7 +53,7 @@ if [ $? -eq 0 ]; then found=1 break -@@ -2151,7 +2159,7 @@ check_gsoap() +@@ -2297,7 +2305,7 @@ else cnf_append "VBOX_GSOAP_CXX_SOURCES" "" fi @@ -71,16 +62,16 @@ gsoap_version=`pkg-config gsoapssl++ --modversion` log_success "found version $gsoap_version" return -@@ -2519,7 +2527,7 @@ for option in "$@"; do +@@ -2661,7 +2669,7 @@ --with-openssl-dir=*) OPENSSLDIR=`echo $option | cut -d'=' -f2` INCCRYPTO="-I${OPENSSLDIR}/include" - LIBCRYPTO="${OPENSSLDIR}/lib/libssl.a ${OPENSSLDIR}/lib/libcrypto.a" + LIBCRYPTO="-L${OPENSSLDIR}/lib -lssl -lcrypto" + # On Darwin (at least for macports) static OpenSSL also needs zlib. + [ "$OS" = "darwin" ] && LIBCRYPTO="$LIBCRYPTO ${OPENSSLDIR}/lib/libz.a" # On Linux static OpenSSL typically needs a few additional libraries. - [ "$OS" = "linux" ] && LIBCRYPTO="-ldl $LIBPTHREAD -lm" - ;; -@@ -2865,12 +2873,22 @@ if [ $ONLY_ADDITIONS -eq 0 ]; then +@@ -3028,12 +3036,22 @@ [ $WITH_JAVA -eq 1 ] && check_java # PulseAudio @@ -109,7 +100,7 @@ fi fi -@@ -2886,14 +2904,6 @@ if [ "$OS" = "linux" ]; then +@@ -3049,14 +3067,6 @@ cnf_append "VBOX_WITHOUT_LINUX_TEST_BUILDS" "1" fi if [ $ONLY_ADDITIONS -eq 0 ]; then diff --git a/emulators/virtualbox-ose-70/files/patch-include_VBox_sup.h b/emulators/virtualbox-ose-70/files/patch-include_VBox_sup.h new file mode 100644 index 000000000000..9cf3fabe63f1 --- /dev/null +++ b/emulators/virtualbox-ose-70/files/patch-include_VBox_sup.h @@ -0,0 +1,11 @@ +--- include/VBox/sup.h.orig 2024-12-27 04:08:45.986426000 +0100 ++++ include/VBox/sup.h 2024-12-27 04:09:08.925387000 +0100 +@@ -2248,7 +2248,7 @@ + + SUPR0DECL(void) SUPR0BadContext(PSUPDRVSESSION pSession, const char *pszFile, uint32_t uLine, const char *pszExpr); + +-#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) ++#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) + /** + * Translates a physical address to a virtual mapping (valid up to end of page). + * @returns VBox status code. diff --git a/emulators/virtualbox-ose-70/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c b/emulators/virtualbox-ose-70/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c index 8fd24bda91f1..e790f372f95f 100644 --- a/emulators/virtualbox-ose-70/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c +++ b/emulators/virtualbox-ose-70/files/patch-src-VBox-Additions-common-VBoxGuest-VBoxGuest-freebsd.c @@ -1,6 +1,6 @@ ---- src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c.orig 2022-03-22 23:37:46 UTC -+++ src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c -@@ -45,6 +45,7 @@ +--- src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c.orig 2022-10-06 19:03:06.000000000 +0200 ++++ src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c 2024-12-26 15:28:38.066230000 +0100 +@@ -55,6 +55,7 @@ #include #include #include @@ -8,7 +8,7 @@ #include #include #include -@@ -61,6 +62,7 @@ +@@ -71,6 +72,7 @@ #include #include #include @@ -16,7 +16,7 @@ #include #include #include -@@ -102,8 +104,6 @@ struct VBoxGuestDeviceState +@@ -112,8 +114,6 @@ struct resource *pIrqRes; /** Pointer to the IRQ handler. */ void *pfnIrqHandler; @@ -25,7 +25,7 @@ }; -@@ -113,8 +113,7 @@ struct VBoxGuestDeviceState +@@ -123,8 +123,7 @@ /* * Character device file handlers. */ @@ -35,7 +35,7 @@ static d_ioctl_t vgdrvFreeBSDIOCtl; static int vgdrvFreeBSDIOCtlSlow(PVBOXGUESTSESSION pSession, u_long ulCmd, caddr_t pvData, struct thread *pTd); static d_write_t vgdrvFreeBSDWrite; -@@ -145,8 +144,7 @@ static struct cdevsw g_vgdrvFreeBSDChrDevSW = +@@ -155,8 +154,7 @@ { .d_version = D_VERSION, .d_flags = D_TRACKCLOSE | D_NEEDMINOR, @@ -45,7 +45,7 @@ .d_ioctl = vgdrvFreeBSDIOCtl, .d_read = vgdrvFreeBSDRead, .d_write = vgdrvFreeBSDWrite, -@@ -154,81 +152,28 @@ static struct cdevsw g_vgdrvFreeBSDChrDevSW = +@@ -164,81 +162,28 @@ .d_name = "vboxguest" }; @@ -134,7 +134,7 @@ { int rc; PVBOXGUESTSESSION pSession; -@@ -240,12 +185,6 @@ static int vgdrvFreeBSDOpen(struct cdev *pDev, int fOp +@@ -250,12 +195,6 @@ LogFlow(("vgdrvFreeBSDOpen:\n")); /* @@ -147,7 +147,7 @@ * Create a new session. */ fRequestor = VMMDEV_REQUESTOR_USERMODE | VMMDEV_REQUESTOR_TRUST_NOT_GIVEN; -@@ -262,14 +201,13 @@ static int vgdrvFreeBSDOpen(struct cdev *pDev, int fOp +@@ -272,47 +211,20 @@ rc = VGDrvCommonCreateUserSession(&g_DevExt, fRequestor, &pSession); if (RT_SUCCESS(rc)) { @@ -168,10 +168,10 @@ } LogRel(("vgdrvFreeBSDOpen: failed. rc=%d\n", rc)); -@@ -277,33 +215,6 @@ static int vgdrvFreeBSDOpen(struct cdev *pDev, int fOp + return RTErrConvertToErrno(rc); } - /** +-/** - * File close handler - * - */ @@ -179,11 +179,11 @@ -{ - PVBOXGUESTSESSION pSession = (PVBOXGUESTSESSION)pDev->si_drv1; - Log(("vgdrvFreeBSDClose: fFile=%#x pSession=%p\n", fFile, pSession)); -- + - /* - * Close the session if it's still hanging on to the device... - */ -- if (VALID_PTR(pSession)) +- if (RT_VALID_PTR(pSession)) - { - VGDrvCommonCloseSession(&g_DevExt, pSession); - if (!ASMAtomicCmpXchgPtr(&pDev->si_drv1, NULL, pSession)) @@ -198,11 +198,10 @@ -} - - --/** + /** * I/O control request. * - * @returns depends... -@@ -316,8 +227,12 @@ static int vgdrvFreeBSDIOCtl(struct cdev *pDev, u_long +@@ -326,8 +238,12 @@ static int vgdrvFreeBSDIOCtl(struct cdev *pDev, u_long ulCmd, caddr_t pvData, int fFile, struct thread *pTd) { PVBOXGUESTSESSION pSession; @@ -216,25 +215,20 @@ /* * Deal with the fast ioctl path first. */ -@@ -512,12 +427,14 @@ static int vgdrvFreeBSDPoll(struct cdev *pDev, int fEv - - static int vgdrvFreeBSDPoll(struct cdev *pDev, int fEvents, struct thread *td) - { -- int fEventsProcessed; -+ PVBOXGUESTSESSION pSession; -+ int fEventsProcessed, rc; +@@ -526,8 +442,10 @@ LogFlow(("vgdrvFreeBSDPoll: fEvents=%d\n", fEvents)); - PVBOXGUESTSESSION pSession = (PVBOXGUESTSESSION)pDev->si_drv1; -- if (RT_UNLIKELY(!VALID_PTR(pSession))) { +- if (RT_UNLIKELY(!RT_VALID_PTR(pSession))) { ++ + rc = devfs_get_cdevpriv((void **)&pSession); + if (rc) -+ { ++ { Log(("vgdrvFreeBSDPoll: no state data for %s\n", devtoname(pDev))); return (fEvents & (POLLHUP|POLLIN|POLLRDNORM|POLLOUT|POLLWRNORM)); } -@@ -558,11 +475,8 @@ static int vgdrvFreeBSDDetach(device_t pDevice) +@@ -568,11 +486,8 @@ /* * Reverse what we did in vgdrvFreeBSDAttach. */ @@ -247,7 +241,7 @@ vgdrvFreeBSDRemoveIRQ(pDevice, pState); if (pState->pVMMDevMemRes) -@@ -727,18 +641,21 @@ static int vgdrvFreeBSDAttach(device_t pDevice) +@@ -737,18 +652,21 @@ VGDrvCommonProcessOptionsFromHost(&g_DevExt); /* @@ -275,7 +269,7 @@ vgdrvFreeBSDRemoveIRQ(pDevice, pState); } else -@@ -782,8 +699,12 @@ static driver_t vgdrvFreeBSDDriver = +@@ -792,8 +710,12 @@ sizeof(struct VBoxGuestDeviceState), }; diff --git a/emulators/virtualbox-ose-70/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-files_vboxnetflt b/emulators/virtualbox-ose-70/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-files_vboxnetflt index eb3b623f7299..dc4e779fb6b0 100644 --- a/emulators/virtualbox-ose-70/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-files_vboxnetflt +++ b/emulators/virtualbox-ose-70/files/patch-src-VBox-HostDrivers-VBoxNetFlt-freebsd-files_vboxnetflt @@ -1,10 +1,10 @@ ---- src/VBox/HostDrivers/VBoxNetFlt/freebsd/files_vboxnetflt.orig 2021-01-07 15:41:28 UTC -+++ src/VBox/HostDrivers/VBoxNetFlt/freebsd/files_vboxnetflt -@@ -62,6 +62,7 @@ VBOX_VBOXNETFLT_SOURCES=" \ +--- src/VBox/HostDrivers/VBoxNetFlt/freebsd/files_vboxnetflt.orig 2022-10-06 19:11:15.000000000 +0200 ++++ src/VBox/HostDrivers/VBoxNetFlt/freebsd/files_vboxnetflt 2024-12-26 15:41:50.870345000 +0100 +@@ -72,6 +72,7 @@ ${PATH_ROOT}/include/iprt/uni.h=>include/iprt/uni.h \ ${PATH_ROOT}/include/iprt/utf16.h=>include/iprt/utf16.h \ ${PATH_ROOT}/include/iprt/uuid.h=>include/iprt/uuid.h \ + ${PATH_ROOT}/include/iprt/x86.h=>include/iprt/x86.h \ + ${PATH_ROOT}/include/iprt/x86-helpers.h=>include/iprt/x86-helpers.h \ ${PATH_ROOT}/include/iprt/nocrt/limits.h=>include/iprt/nocrt/limits.h \ ${PATH_ROOT}/include/VBox/cdefs.h=>include/VBox/cdefs.h \ - ${PATH_ROOT}/include/VBox/err.h=>include/VBox/err.h \ diff --git a/emulators/virtualbox-ose-70/files/patch-src-VBox-Installer-freebsd-virtualbox.desktop b/emulators/virtualbox-ose-70/files/patch-src-VBox-Installer-freebsd-virtualbox.desktop deleted file mode 100644 index ae2253daf847..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src-VBox-Installer-freebsd-virtualbox.desktop +++ /dev/null @@ -1,10 +0,0 @@ ---- src/VBox/Installer/freebsd/virtualbox.desktop.orig 2020-05-13 19:44:01 UTC -+++ src/VBox/Installer/freebsd/virtualbox.desktop -@@ -7,7 +7,6 @@ GenericName=Virtual Machine - Type=Application - Exec=VirtualBox - TryExec=VirtualBox --DocPath=file://$VBOX_DOC_PATH/UserManual.pdf - Icon=VBox - Categories=Emulator;System; - Comment=Run several virtual systems on a single host computer diff --git a/emulators/virtualbox-ose-70/files/patch-src-VBox-Main-webservice-Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src-VBox-Main-webservice-Makefile.kmk deleted file mode 100644 index 6725f67e1923..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src-VBox-Main-webservice-Makefile.kmk +++ /dev/null @@ -1,39 +0,0 @@ ---- src/VBox/Main/webservice/Makefile.kmk.orig 2021-01-07 15:41:45 UTC -+++ src/VBox/Main/webservice/Makefile.kmk -@@ -158,7 +158,6 @@ VBOX_PATH_IDL := $(abspath $(PATH_SUB_ - RECOMPILE_ON_MAKEFILE_CURRENT := $(MAKEFILE_CURRENT) - - PATH_TARGET_SOAPDEMOXML := $(VBOXWEB_OUT_DIR)/demo_soapxml --PATH_TARGET_SOAPDEMOHEADERS := $(VBOXWEB_OUT_DIR)/demo_headers - PATH_TARGET_SOAPDEMONSMAPS := $(VBOXWEB_OUT_DIR)/demo_namespacemaps - PATH_TARGET_WEBTEST := $(VBOXWEB_OUT_DIR)/webtest - -@@ -565,8 +564,6 @@ $$(VBOX_JWSSRC_JAR): $$(VBOX_JWS_JAR) | $$(dir $$@) - $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts \ - $(wildcard $(PATH_TARGET_SOAPDEMOXML)/*) \ - $(PATH_TARGET_SOAPDEMOXML)/dummy_file \ -- $(wildcard $(PATH_TARGET_SOAPDEMOHEADERS)/*) \ -- $(PATH_TARGET_SOAPDEMOHEADERS)/dummy_file \ - $(wildcard $(PATH_TARGET_SOAPDEMONSMAPS)/*) \ - $(PATH_TARGET_SOAPDEMONSMAPS)/dummy_file - -@@ -786,17 +783,14 @@ endif - # any more. Ignoring the exit code is the simple solution, accepting the error. - $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts: $(VBOXWEB_OUT_DIR)/gsoap_generate_all_ts | $$(dir $$@) - $(RM) -f $@ -- $(MKDIR) -p $(PATH_TARGET_SOAPDEMOXML) $(PATH_TARGET_SOAPDEMOHEADERS) $(PATH_TARGET_SOAPDEMONSMAPS) -+ $(MKDIR) -p $(PATH_TARGET_SOAPDEMOXML) $(PATH_TARGET_SOAPDEMONSMAPS) - ifdef VBOX_GSOAP_VERBOSE - $(MV_EXT) -f -- $(VBOXWEB_OUT_DIR)/*.req.xml $(VBOXWEB_OUT_DIR)/*.res.xml $(PATH_TARGET_SOAPDEMOXML)/ - endif -- -$(MV_EXT) -f -- $(VBOXWEB_OUT_DIR)/soapvbox*.h $(PATH_TARGET_SOAPDEMOHEADERS)/ - $(MV_EXT) -f -- $(VBOXWEB_OUT_DIR)/vboxBinding.nsmap $(PATH_TARGET_SOAPDEMONSMAPS)/ - $(APPEND) $@ done - --$(PATH_TARGET_SOAPDEMONSMAPS) \ --$(PATH_TARGET_SOAPDEMOHEADERS)/soapvboxBindingProxy.h \ --$(PATH_TARGET_SOAPDEMOHEADERS)/soapvboxBindingObject.h: $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts -+$(PATH_TARGET_SOAPDEMONSMAPS): $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts - - # soapcpp2 -2: generate SOAP 1.2 calls - # soapcpp2 -S: server-side code only diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_vboxvfs_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_vboxvfs_Makefile.kmk deleted file mode 100644 index 9494bd970456..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_freebsd_vboxvfs_Makefile.kmk +++ /dev/null @@ -1,50 +0,0 @@ ---- src/VBox/Additions/freebsd/vboxvfs/Makefile.kmk.orig 2021-01-07 15:34:22 UTC -+++ src/VBox/Additions/freebsd/vboxvfs/Makefile.kmk -@@ -33,32 +33,37 @@ vboxvfs_INCS = \ - $(vboxvfs_0_OUTDIR) - vboxvfs_SOURCES = \ - vboxvfs_vfsops.c \ -- vboxvfs_vnops.c -+ bcmp.c \ -+ vboxvfs_vnops.c \ -+ vboxvfs_prov.c - vboxvfs_LIBS = \ - $(VBOX_LIB_VBGL_R0) \ - $(VBOX_LIB_IPRT_GUEST_R0) - vboxvfs_DEPS = \ -- $$(vboxvfs_0_OUTDIR)/vnode_if.h \ -- $$(vboxvfs_0_OUTDIR)/vnode_if_newproto.h \ -- $$(vboxvfs_0_OUTDIR)/vnode_if_typedef.h -+ $(vboxvfs_0_OUTDIR)/vnode_if.h \ -+ $(vboxvfs_0_OUTDIR)/vnode_if_newproto.h \ -+ $(vboxvfs_0_OUTDIR)/vnode_if_typedef.h - vboxvfs_CLEAN += $(vboxvfs_DEPS) - - VBOX_AWK := /usr/bin/awk - --$$(vboxvfs_0_OUTDIR)/vnode_if.h: $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -+$$(vboxvfs_0_OUTDIR): -+ $(QUIET)$(MKDIR) -p $(vboxvfs_0_OUTDIR) -+ -+$$(vboxvfs_0_OUTDIR)/vnode_if.h: $$(vboxvfs_0_OUTDIR) $(VBOX_FREEBSD_SRC)/kern/vnode_if.src - $(call MSG_TOOL,awk,VBoxGuest,$<,$@) - $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/vnode_if.awk $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -h -- $(QUIET)$(MV) $(vboxvfs_0_OUTDIR)/vnode_if.h $(vboxvfs_0_OUTDIR)/vnode_if.h -+ $(QUIET)$(MV) vnode_if.h $(vboxvfs_0_OUTDIR)/vnode_if.h - --$$(vboxvfs_0_OUTDIR)/vnode_if_newproto.h: $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -+$$(vboxvfs_0_OUTDIR)/vnode_if_newproto.h: $$(vboxvfs_0_OUTDIR) $(VBOX_FREEBSD_SRC)/kern/vnode_if.src - $(call MSG_TOOL,awk,VBoxGuest,$<,$@) - $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/vnode_if.awk $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -p -- $(QUIET)$(MV) $(vboxvfs_0_OUTDIR)/vnode_if_newproto.h $(vboxvfs_0_OUTDIR)/vnode_if_newproto.h -+ $(QUIET)$(MV) vnode_if_newproto.h $(vboxvfs_0_OUTDIR)/vnode_if_newproto.h - --$$(vboxvfs_0_OUTDIR)/vnode_if_typedef.h: $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -+$$(vboxvfs_0_OUTDIR)/vnode_if_typedef.h: $$(vboxvfs_0_OUTDIR) $(VBOX_FREEBSD_SRC)/kern/vnode_if.src - $(call MSG_TOOL,awk,VBoxGuest,$<,$@) - $(QUIET)$(VBOX_AWK) -f $(VBOX_FREEBSD_SRC)/tools/vnode_if.awk $(VBOX_FREEBSD_SRC)/kern/vnode_if.src -q -- $(QUIET)$(MV) $(vboxvfs_0_OUTDIR)/vnode_if_typedef.h $(vboxvfs_0_OUTDIR)/vnode_if_typedef.h -+ $(QUIET)$(MV) vnode_if_typedef.h $(vboxvfs_0_OUTDIR)/vnode_if_typedef.h - - include $(FILE_KBUILD_SUB_FOOTER) - diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_VBoxClient_logging.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_VBoxClient_logging.cpp deleted file mode 100644 index ad756a686569..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_VBoxClient_logging.cpp +++ /dev/null @@ -1,10 +0,0 @@ ---- src/VBox/Additions/x11/VBoxClient/logging.cpp.orig 2021-01-07 15:34:30 UTC -+++ src/VBox/Additions/x11/VBoxClient/logging.cpp -@@ -17,6 +17,7 @@ - - - #include -+#include - #include - #include - #include diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_vboxvideo_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_vboxvideo_Makefile.kmk deleted file mode 100644 index 398c835b4b43..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_vboxvideo_Makefile.kmk +++ /dev/null @@ -1,15 +0,0 @@ ---- src/VBox/Additions/x11/vboxvideo/Makefile.kmk.orig 2019-01-25 18:24:30 UTC -+++ src/VBox/Additions/x11/vboxvideo/Makefile.kmk -@@ -406,9 +406,10 @@ ifdef VBOX_USE_SYSTEM_XORG_HEADERS - vboxvideo_drv_system_INCS += \ - $(PATH_ROOT)/src/VBox/Runtime/include \ - $(VBOX_GRAPHICS_INCS) \ -- /usr/include/xorg \ -- /usr/include/pixman-1 -+ /usr/local/include/xorg \ -+ /usr/local/include/pixman-1 - vboxvideo_drv_system_SOURCES := $(vboxvideo_drv_17_SOURCES) -+ vboxvideo_drv_system_LIBS += $(vboxvideo_drv_70_LIBS) - endif - - diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_x11include_xproto-7.0.18_X11_Xfuncproto.h b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_x11include_xproto-7.0.18_X11_Xfuncproto.h deleted file mode 100644 index ee9a615ab5c8..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_x11_x11include_xproto-7.0.18_X11_Xfuncproto.h +++ /dev/null @@ -1,230 +0,0 @@ ---- src/VBox/Additions/x11/x11include/xproto-7.0.18/X11/Xfuncproto.h.orig 2021-01-07 15:37:10 UTC -+++ src/VBox/Additions/x11/x11include/xproto-7.0.18/X11/Xfuncproto.h -@@ -48,6 +48,227 @@ in this Software without prior written authorization f - #endif /* _Xconst */ - - /* Function prototype configuration (see configure for more info) */ -+#if !defined(NARROWPROTO) && \ -+ (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) -+#define NARROWPROTO -+#endif -+#ifndef FUNCPROTO -+#define FUNCPROTO 15 -+#endif -+ -+#ifndef NeedWidePrototypes -+#ifdef NARROWPROTO -+#define NeedWidePrototypes 0 -+#else -+#define NeedWidePrototypes 1 /* default to make interropt. easier */ -+#endif -+#endif /* NeedWidePrototypes */ -+ -+#endif /* NeedFunctionPrototypes */ -+ -+#ifndef _XFUNCPROTOBEGIN -+#if defined(__cplusplus) || defined(c_plusplus) /* for C++ V2.0 */ -+#define _XFUNCPROTOBEGIN extern "C" { /* do not leave open across includes */ -+#define _XFUNCPROTOEND } -+#else -+#define _XFUNCPROTOBEGIN -+#define _XFUNCPROTOEND -+#endif -+#endif /* _XFUNCPROTOBEGIN */ -+ -+/* http://clang.llvm.org/docs/LanguageExtensions.html#has-attribute */ -+#ifndef __has_attribute -+# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */ -+#endif -+#ifndef __has_feature -+# define __has_feature(x) 0 /* Compatibility with non-clang compilers. */ -+#endif -+#ifndef __has_extension -+# define __has_extension(x) 0 /* Compatibility with non-clang compilers. */ -+#endif -+ -+/* Added in X11R6.9, so available in any version of modular xproto */ -+#if __has_attribute(__sentinel__) || (defined(__GNUC__) && (__GNUC__ >= 4)) -+# define _X_SENTINEL(x) __attribute__ ((__sentinel__(x))) -+#else -+# define _X_SENTINEL(x) -+#endif /* GNUC >= 4 */ -+ -+/* Added in X11R6.9, so available in any version of modular xproto */ -+#if (__has_attribute(visibility) || (defined(__GNUC__) && (__GNUC__ >= 4))) \ -+ && !defined(__CYGWIN__) && !defined(__MINGW32__) -+# define _X_EXPORT __attribute__((visibility("default"))) -+# define _X_HIDDEN __attribute__((visibility("hidden"))) -+# define _X_INTERNAL __attribute__((visibility("internal"))) -+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550) -+# define _X_EXPORT __global -+# define _X_HIDDEN __hidden -+# define _X_INTERNAL __hidden -+#else /* not gcc >= 4 and not Sun Studio >= 8 */ -+# define _X_EXPORT -+# define _X_HIDDEN -+# define _X_INTERNAL -+#endif /* GNUC >= 4 */ -+ -+/* Branch prediction hints for individual conditionals */ -+/* requires xproto >= 7.0.9 */ -+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303) -+# define _X_LIKELY(x) __builtin_expect(!!(x), 1) -+# define _X_UNLIKELY(x) __builtin_expect(!!(x), 0) -+#else /* not gcc >= 3.3 */ -+# define _X_LIKELY(x) (x) -+# define _X_UNLIKELY(x) (x) -+#endif -+ -+/* Bulk branch prediction hints via marking error path functions as "cold" */ -+/* requires xproto >= 7.0.25 */ -+#if __has_attribute(__cold__) || \ -+ (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403)) /* 4.3+ */ -+# define _X_COLD __attribute__((__cold__)) -+#else -+# define _X_COLD /* nothing */ -+#endif -+ -+/* Added in X11R6.9, so available in any version of modular xproto */ -+#if __has_attribute(deprecated) \ -+ || (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)) \ -+ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5130)) -+# define _X_DEPRECATED __attribute__((deprecated)) -+#else /* not gcc >= 3.1 */ -+# define _X_DEPRECATED -+#endif -+ -+/* requires xproto >= 7.0.30 */ -+#if __has_extension(attribute_deprecated_with_message) || \ -+ (defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)))) -+# define _X_DEPRECATED_MSG(_msg) __attribute__((deprecated(_msg))) -+#else -+# define _X_DEPRECATED_MSG(_msg) _X_DEPRECATED -+#endif -+ -+/* requires xproto >= 7.0.17 */ -+#if __has_attribute(noreturn) \ -+ || (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205)) \ -+ || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) -+# define _X_NORETURN __attribute((noreturn)) -+#else -+# define _X_NORETURN -+#endif /* GNUC */ -+ -+/* Added in X11R6.9, so available in any version of modular xproto */ -+#if __has_attribute(__format__) \ -+ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 203) -+# define _X_ATTRIBUTE_PRINTF(x,y) __attribute__((__format__(__printf__,x,y))) -+#else /* not gcc >= 2.3 */ -+# define _X_ATTRIBUTE_PRINTF(x,y) -+#endif -+ -+/* requires xproto >= 7.0.22 - since this uses either gcc or C99 variable -+ argument macros, must be only used inside #ifdef _X_NONNULL guards, as -+ many legacy X clients are compiled in C89 mode still. */ -+#if __has_attribute(nonnull) \ -+ && defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */ -+#define _X_NONNULL(...) __attribute__((nonnull(__VA_ARGS__))) -+#elif __has_attribute(nonnull) \ -+ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303) -+#define _X_NONNULL(args...) __attribute__((nonnull(args))) -+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */ -+#define _X_NONNULL(...) /* */ -+#endif -+ -+/* requires xproto >= 7.0.22 */ -+#if __has_attribute(__unused__) \ -+ || defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 205) -+#define _X_UNUSED __attribute__((__unused__)) -+#else -+#define _X_UNUSED /* */ -+#endif -+ -+/* C99 keyword "inline" or equivalent extensions in pre-C99 compilers */ -+/* requires xproto >= 7.0.9 -+ (introduced in 7.0.8 but didn't support all compilers until 7.0.9) */ -+#if defined(inline) /* assume autoconf set it correctly */ || \ -+ (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L)) /* C99 */ || \ -+ (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)) -+# define _X_INLINE inline -+#elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */ -+# define _X_INLINE __inline__ -+#else -+# define _X_INLINE -+#endif -+ -+/* C99 keyword "restrict" or equivalent extensions in pre-C99 compilers */ -+/* requires xproto >= 7.0.21 */ -+#ifndef _X_RESTRICT_KYWD -+# if defined(restrict) /* assume autoconf set it correctly */ || \ -+ (defined(__STDC_VERSION__) && (__STDC_VERSION__ - 0 >= 199901L) /* C99 */ \ -+ && !defined(__cplusplus)) /* Workaround g++ issue on Solaris */ -+# define _X_RESTRICT_KYWD restrict -+# elif defined(__GNUC__) && !defined(__STRICT_ANSI__) /* gcc w/C89+extensions */ -+# define _X_RESTRICT_KYWD __restrict__ -+# else -+# define _X_RESTRICT_KYWD -+# endif -+#endif -+ -+/* requires xproto >= 7.0.30 */ -+#if __has_attribute(no_sanitize_thread) -+# define _X_NOTSAN __attribute__((no_sanitize_thread)) -+#else -+# define _X_NOTSAN -+#endif -+ -+#endif /* _XFUNCPROTO_H_ */ -+/* -+ * -+Copyright 1989, 1991, 1998 The Open Group -+ -+Permission to use, copy, modify, distribute, and sell this software and its -+documentation for any purpose is hereby granted without fee, provided that -+the above copyright notice appear in all copies and that both that -+copyright notice and this permission notice appear in supporting -+documentation. -+ -+The above copyright notice and this permission notice shall be included in -+all copies or substantial portions of the Software. -+ -+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -+ -+Except as contained in this notice, the name of The Open Group shall not be -+used in advertising or otherwise to promote the sale, use or other dealings -+in this Software without prior written authorization from The Open Group. -+ * -+ */ -+ -+/* Definitions to make function prototypes manageable */ -+ -+#ifndef _XFUNCPROTO_H_ -+#define _XFUNCPROTO_H_ -+ -+#ifndef NeedFunctionPrototypes -+#define NeedFunctionPrototypes 1 -+#endif /* NeedFunctionPrototypes */ -+ -+#ifndef NeedVarargsPrototypes -+#define NeedVarargsPrototypes 1 -+#endif /* NeedVarargsPrototypes */ -+ -+#if NeedFunctionPrototypes -+ -+#ifndef NeedNestedPrototypes -+#define NeedNestedPrototypes 1 -+#endif /* NeedNestedPrototypes */ -+ -+#ifndef _Xconst -+#define _Xconst const -+#endif /* _Xconst */ -+ -+/* Function prototype configuration (see configure for more info) */ - #ifndef NARROWPROTO - #undef NARROWPROTO - #endif diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Debugger_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Debugger_Makefile.kmk deleted file mode 100644 index 11d20783bf83..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Debugger_Makefile.kmk +++ /dev/null @@ -1,10 +0,0 @@ ---- src/VBox/Debugger/Makefile.kmk.orig 2021-01-07 15:37:12 UTC -+++ src/VBox/Debugger/Makefile.kmk -@@ -110,6 +110,7 @@ VBoxDbg_SOURCES = \ - VBoxDbgBase.cpp \ - VBoxDbgConsole.cpp \ - VBoxDbgStatsQt.cpp -+VBoxDbg_CXXFLAGS.freebsd += -std=c++11 - VBoxDbg_LIBS = \ - $(VBOX_LIB_VMM_LAZY) - VBoxDbg_LDFLAGS.darwin = \ diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_Makefile.kmk index 257e61da679d..021d004d5a00 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_Makefile.kmk +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_Makefile.kmk @@ -1,6 +1,6 @@ ---- src/VBox/Devices/Makefile.kmk.orig 2021-01-07 15:39:35 UTC -+++ src/VBox/Devices/Makefile.kmk -@@ -112,6 +112,7 @@ if !defined(VBOX_ONLY_EXTPACKS) +--- src/VBox/Devices/Makefile.kmk.orig 2024-10-10 20:29:17.000000000 +0200 ++++ src/VBox/Devices/Makefile.kmk 2024-12-27 13:26:17.132294000 +0100 +@@ -132,6 +132,7 @@ VBoxDDU_LDFLAGS.darwin += -framework IOKit endif @@ -8,7 +8,7 @@ VBoxDDU_LDFLAGS.linux = $(VBOX_GCC_NO_UNDEFINED) $(call VBOX_SET_VER_INFO_DLL,VBoxDDU,VirtualBox VMM Devices and Drivers Utilities) -@@ -245,6 +246,7 @@ if !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBU +@@ -286,6 +287,7 @@ -framework SystemConfiguration \ -framework AVFoundation \ -framework Foundation @@ -16,24 +16,24 @@ VBoxDD_LDFLAGS.linux = $(VBOX_GCC_NO_UNDEFINED) # --- Tracing bits. --- -@@ -287,7 +289,7 @@ if !defined(VBOX_ONLY_EXTPACKS) && "$(intersects $(KBU - VBoxDD_SOURCES += Graphics/DevVGA-SVGA.cpp +@@ -331,7 +333,7 @@ + Graphics/DevVGA-SVGA-cmd.cpp endif ifdef VBOX_WITH_VMSVGA3D - if1of ($(KBUILD_TARGET), linux win) -+ if1of ($(KBUILD_TARGET), freebsd linux win) - # Dynamically load 3D library (opengl32, libGL). - # This is a temporary solution. In future the 3D backend will be in a separate library. - VBOX_WITH_VMSVGA3D_DYNAMIC_LOAD = 1 -@@ -329,6 +331,7 @@ VBOX_WITH_VMSVGA3D_DYNAMIC_LOAD = 1 - VBoxDD_SOURCES += \ - Graphics/DevVGA-SVGA3d-glLdr.cpp ++ if1of ($(KBUILD_TARGET), linux win freebsd) + # Dynamically load 3D library (opengl32, libGL). + # This is a temporary solution. In future the 3D backend will be in a separate library. + VBOX_WITH_VMSVGA3D_DYNAMIC_LOAD = 1 +@@ -390,6 +392,7 @@ + Graphics/DevVGA-SVGA3d-glLdr.cpp else -+ VBoxDD_LIBS.freebsd += X11 GL - VBoxDD_LIBS.linux += X11 GL - VBoxDD_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib + VBoxDD_LIBS.linux += X11 GL ++ VBoxDD_LIBS.freebsd += X11 GL + VBoxDD_LIBS.win += $(PATH_SDK_$(VBOX_WINPSDK)_LIB)/Opengl32.lib endif -@@ -1526,6 +1529,8 @@ if defined(VBOX_WITH_VMSVGA3D) && !defined(VBOX_ONLY_E + VBoxDD_LDFLAGS.darwin += -framework OpenGL +@@ -1701,6 +1704,8 @@ VBoxSVGA3D_INCS = $(VBOX_GRAPHICS_INCS) VBoxSVGA3D_INCS.win := \ Graphics/shaderlib/libWineStub/include diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_PC_ipxe_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_PC_ipxe_Makefile.kmk index 86fda6974519..df7052d7049a 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_PC_ipxe_Makefile.kmk +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Devices_PC_ipxe_Makefile.kmk @@ -1,15 +1,15 @@ ---- src/VBox/Devices/PC/ipxe/Makefile.kmk.orig 2024-01-11 12:19:38 UTC -+++ src/VBox/Devices/PC/ipxe/Makefile.kmk -@@ -35,7 +35,7 @@ iPxeBiosBin_CLEAN = \ +--- src/VBox/Devices/PC/ipxe/Makefile.kmk.orig 2024-10-10 20:29:25.000000000 +0200 ++++ src/VBox/Devices/PC/ipxe/Makefile.kmk 2024-12-27 13:50:35.036241000 +0100 +@@ -45,7 +45,7 @@ iPxeBiosBin_CLEAN = \ $(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.c \ -if1of ($(KBUILD_TARGET), darwin os2 solaris win) -+if1of ($(KBUILD_TARGET), darwin freebsd os2 solaris win) ++if1of ($(KBUILD_TARGET), darwin os2 solaris win linux freebsd) $$(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 $< $@ -@@ -121,7 +121,7 @@ endif +@@ -131,7 +131,7 @@ -falign-loops=1 \ -Os \ -falign-functions=1 \ @@ -18,7 +18,7 @@ -mregparm=3 \ -mrtd \ -freg-struct-return \ -@@ -144,7 +144,7 @@ endif +@@ -154,7 +154,7 @@ -falign-jumps=1 \ -falign-loops=1 \ -falign-functions=1 \ diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxHeadless_VBoxHeadless.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxHeadless_VBoxHeadless.cpp new file mode 100644 index 000000000000..ca03e57922b4 --- /dev/null +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxHeadless_VBoxHeadless.cpp @@ -0,0 +1,11 @@ +--- src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp.orig 2024-12-26 22:32:13.106542000 +0100 ++++ src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp 2024-12-26 22:32:32.805126000 +0100 +@@ -61,7 +61,7 @@ + # include + #endif + +-#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) ++#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) + # include + #endif + diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageHelp.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageHelp.cpp deleted file mode 100644 index 925c6ca2157d..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageHelp.cpp +++ /dev/null @@ -1,43 +0,0 @@ ---- src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp.orig 2021-01-07 15:40:48 UTC -+++ src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp -@@ -646,7 +646,7 @@ void printUsage(USAGECATEGORY enmCommand, uint64_t fSu - " file |\n" - " ]\n" - " [--uarttype<1-N> 16450|16550A|16750]\n" --#if defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS) -+#if defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS) - " [--lpt<1-N> off| ]\n" - " [--lptmode<1-N> ]\n" - #endif -@@ -661,7 +661,7 @@ void printUsage(USAGECATEGORY enmCommand, uint64_t fSu - RTStrmPrintf(pStrm, "|dsound"); - #endif - } -- if (fLinux || fSolaris) -+ if (fLinux || fFreeBSD || fSolaris) - { - RTStrmPrintf(pStrm, "" - #ifdef VBOX_WITH_AUDIO_OSS -@@ -674,22 +674,6 @@ void printUsage(USAGECATEGORY enmCommand, uint64_t fSu - "|pulse" - #endif - ); -- } -- if (fFreeBSD) -- { --#ifdef VBOX_WITH_AUDIO_OSS -- /* Get the line break sorted when dumping all option variants. */ -- if (fDumpOpts) -- { -- RTStrmPrintf(pStrm, "|\n" -- " oss"); -- } -- else -- RTStrmPrintf(pStrm, "|oss"); --#endif --#ifdef VBOX_WITH_AUDIO_PULSE -- RTStrmPrintf(pStrm, "|pulse"); --#endif - } - if (fDarwin) - { diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageModifyVM.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageModifyVM.cpp index adc5217b88f3..fc1639b58302 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageModifyVM.cpp +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VBoxManage_VBoxManageModifyVM.cpp @@ -1,6 +1,6 @@ ---- src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp.orig 2021-01-07 15:40:49 UTC -+++ src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp -@@ -153,7 +153,7 @@ enum +--- src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp.orig 2022-10-06 19:10:28.000000000 +0200 ++++ src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp 2024-12-26 16:08:30.624183000 +0100 +@@ -170,7 +170,7 @@ MODIFYVM_UARTMODE, MODIFYVM_UARTTYPE, MODIFYVM_UART, @@ -9,16 +9,16 @@ MODIFYVM_LPTMODE, MODIFYVM_LPT, #endif -@@ -348,7 +348,7 @@ static const RTGETOPTDEF g_aModifyVMOptions[] = - { "--uartmode", MODIFYVM_UARTMODE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX }, - { "--uarttype", MODIFYVM_UARTTYPE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX }, - { "--uart", MODIFYVM_UART, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX }, +@@ -382,7 +382,7 @@ + OPT2("--uart-mode", "--uartmode", MODIFYVM_UARTMODE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX), + OPT2("--uart-type", "--uarttype", MODIFYVM_UARTTYPE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX), + OPT1("--uart", MODIFYVM_UART, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX), -#if defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS) -+#if defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS) - { "--lptmode", MODIFYVM_LPTMODE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX }, - { "--lpt", MODIFYVM_LPT, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX }, ++#if defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS) || defined(RT_OS_FREEBSD) + OPT2("--lpt-mode", "--lptmode", MODIFYVM_LPTMODE, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX), + OPT1("--lpt", MODIFYVM_LPT, RTGETOPT_REQ_STRING | RTGETOPT_FLAG_INDEX), #endif -@@ -2278,7 +2278,7 @@ RTEXITCODE handleModifyVM(HandlerArg *a) +@@ -2496,7 +2496,7 @@ break; } diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VirtualBox_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VirtualBox_Makefile.kmk deleted file mode 100644 index c339a8b87443..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Frontends_VirtualBox_Makefile.kmk +++ /dev/null @@ -1,18 +0,0 @@ ---- src/VBox/Frontends/VirtualBox/Makefile.kmk.orig 2021-01-07 15:40:49 UTC -+++ src/VBox/Frontends/VirtualBox/Makefile.kmk -@@ -1186,6 +1186,7 @@ if defined(VBOX_WITH_VIDEOHWACCEL) || defined(VBOX_GUI - src/VBox2DHelpers.cpp \ - src/VBoxFBOverlay.cpp \ - src/VBoxGLSupportInfo.cpp -+ VirtualBox_CXXFLAGS.freebsd += -std=c++11 - endif - - $(call VBOX_SET_VER_INFO_EXE,VirtualBox,VirtualBox Manager,$(VBOX_WINDOWS_ICON_FILE)) -@@ -1862,6 +1863,7 @@ if defined(VBOX_WITH_VIDEOHWACCEL) - VBoxOGL2D_SOURCES = \ - src/VBoxGLSupportInfo.cpp - VBoxOGL2D_INCS = include -+ VBoxOGL2D_CXXFLAGS.freebsd += -std=c++11 - endif - endif - diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_SUPDrv.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_SUPDrv.cpp index e34783734251..4139a88a9929 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_SUPDrv.cpp +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_SUPDrv.cpp @@ -1,11 +1,13 @@ ---- src/VBox/HostDrivers/Support/SUPDrv.cpp.orig 2018-10-15 14:30:56 UTC -+++ src/VBox/HostDrivers/Support/SUPDrv.cpp -@@ -104,7 +104,7 @@ - /** @def SUPDRV_CHECK_SMAP_CHECK - * Checks that the AC flag is set if SMAP is enabled. If AC is not set, it - * will be logged and @a a_BadExpr is executed. */ --#if (defined(RT_OS_DARWIN) || defined(RT_OS_LINUX)) && !defined(VBOX_WITHOUT_EFLAGS_AC_SET_IN_VBOXDRV) -+#if (defined(RT_OS_DARWIN) || defined(RT_OS_FREEBSD) || defined(RT_OS_LINUX)) && !defined(VBOX_WITHOUT_EFLAGS_AC_SET_IN_VBOXDRV) - # define SUPDRV_CHECK_SMAP_SETUP() uint32_t const fKernelFeatures = SUPR0GetKernelFeatures() - # define SUPDRV_CHECK_SMAP_CHECK(a_pDevExt, a_BadExpr) \ - do { \ +--- src/VBox/HostDrivers/Support/SUPDrv.cpp.orig 2024-12-27 08:34:02.157677000 +0100 ++++ src/VBox/HostDrivers/Support/SUPDrv.cpp 2024-12-27 08:34:25.419134000 +0100 +@@ -317,8 +317,8 @@ + SUPEXP_STK_BACK( 2, SUPR0PageFree), + SUPEXP_STK_BACK( 6, SUPR0PageMapKernel), + SUPEXP_STK_BACK( 6, SUPR0PageProtect), +-#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) || defined(RT_OS_FREEBSD) +- SUPEXP_STK_OKAY( 2, SUPR0HCPhysToVirt), /* only-linux, only-solaris, only-freebsd */ ++#if defined(RT_OS_LINUX) || defined(RT_OS_SOLARIS) ++ SUPEXP_STK_OKAY( 2, SUPR0HCPhysToVirt), /* only-linux, only-solaris */ + #endif + SUPEXP_STK_BACK( 2, SUPR0PrintfV), + SUPEXP_STK_BACK( 1, SUPR0GetSessionGVM), diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_Makefile b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_Makefile index e41829d41114..646c16a3617d 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_Makefile +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_Makefile @@ -1,6 +1,6 @@ ---- src/VBox/HostDrivers/Support/freebsd/Makefile.orig 2021-10-18 17:58:03 UTC -+++ src/VBox/HostDrivers/Support/freebsd/Makefile -@@ -82,6 +82,7 @@ SRCS += \ +--- src/VBox/HostDrivers/Support/freebsd/Makefile.orig 2022-10-06 19:11:13.000000000 +0200 ++++ src/VBox/HostDrivers/Support/freebsd/Makefile 2024-12-26 16:15:26.678480000 +0100 +@@ -93,6 +93,7 @@ assert.c \ handletable.c \ handletablectx.c \ @@ -8,23 +8,13 @@ once.c \ term.c \ thread.c -@@ -94,16 +95,17 @@ SRCS += \ - RTStrCopy.c \ - RTStrCopyEx.c \ - RTStrCopyP.c \ -+ memchr.c \ - strformat.c \ - RTStrFormat.c \ - strformatnum.c \ - strformatrt.c \ - strformattype.c \ -+ stringalloc.c \ - strprintf.c \ - strprintf-ellipsis.c \ +@@ -117,7 +118,8 @@ + strprintf2-ellipsis.c \ strtonum.c \ -- memchr.c \ + memchr.c \ - stringalloc.c -+ utf-8.c ++ stringalloc.c \ ++ utf-8.c .PATH: ${.CURDIR}/common/rand SRCS += \ diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c index 7dd580efb0a0..7faa07739f14 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPDrv-freebsd.c @@ -1,9 +1,11 @@ ---- src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c.orig 2022-07-19 20:58:42 UTC +--- src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c.orig 2025-01-21 14:06:14 UTC +++ src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c -@@ -44,8 +44,11 @@ +@@ -44,9 +44,13 @@ #include #include #include ++#include + #include /* for pmap_map() */ +#include +#include /* mp_maxcpus */ @@ -12,12 +14,13 @@ #include #include #include -@@ -57,7 +60,14 @@ +@@ -58,7 +62,15 @@ #include #include #include +#include ++ +#ifdef VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV +# include +# include @@ -27,7 +30,7 @@ #ifdef VBOX_WITH_HARDENING # define VBOXDRV_PERM 0600 #else -@@ -76,7 +86,9 @@ static d_ioctl_t VBoxDrvFreeBSDIOCtl; +@@ -77,7 +89,9 @@ static d_ioctl_t VBoxDrvFreeBSDIOCtl; static d_open_t VBoxDrvFreeBSDOpenSys; static void vboxdrvFreeBSDDtr(void *pvData); static d_ioctl_t VBoxDrvFreeBSDIOCtl; @@ -37,7 +40,7 @@ /********************************************************************************************************************************* -@@ -93,7 +105,8 @@ static moduledata_t g_VBoxDrvFreeBSDModule = +@@ -94,7 +108,8 @@ static moduledata_t g_VBoxDrvFreeBSDModule = }; /** Declare the module as a pseudo device. */ @@ -47,7 +50,7 @@ MODULE_VERSION(vboxdrv, 1); /** -@@ -140,6 +153,13 @@ static int VBoxDrvFreeBSDModuleEvent(struct module *pM +@@ -141,6 +156,13 @@ static int VBoxDrvFreeBSDModuleEvent(struct module *pM static int VBoxDrvFreeBSDModuleEvent(struct module *pMod, int enmEventType, void *pvArg) { int rc; @@ -61,7 +64,7 @@ switch (enmEventType) { case MOD_LOAD: -@@ -182,6 +202,13 @@ static int VBoxDrvFreeBSDLoad(void) +@@ -183,6 +205,13 @@ static int VBoxDrvFreeBSDLoad(void) rc = supdrvInitDevExt(&g_VBoxDrvFreeBSDDevExt, sizeof(SUPDRVSESSION)); if (RT_SUCCESS(rc)) { @@ -75,10 +78,11 @@ /* * Configure character devices. Add symbolic links for compatibility. */ -@@ -324,6 +351,45 @@ static int VBoxDrvFreeBSDIOCtl(struct cdev *pDev, u_lo +@@ -322,7 +351,45 @@ static int VBoxDrvFreeBSDIOCtl(struct cdev *pDev, u_lo + return VBoxDrvFreeBSDIOCtlSlow(pSession, ulCmd, pvData, pTd); + } - - /** ++/** + * Alternative Device I/O Control entry point on hosts with SMAP support. + * + * @returns depends... @@ -95,7 +99,7 @@ + * SMAP check. + */ + RTCCUINTREG fSavedEfl = ASMAddFlags(X86_EFL_AC); -+ + + int rc = VBoxDrvFreeBSDIOCtl(pDev, ulCmd, pvData, fFile, pTd); + +#ifdef VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV @@ -117,11 +121,10 @@ +} + + -+/** + /** * Deal with the 'slow' I/O control requests. * - * @returns 0 on success, appropriate errno on failure. -@@ -372,11 +438,10 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes +@@ -372,11 +439,10 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes */ SUPREQHDR Hdr; pvUser = *(void **)pvData; @@ -136,7 +139,7 @@ } if (RT_UNLIKELY((Hdr.fFlags & SUPREQHDR_FLAGS_MAGIC_MASK) != SUPREQHDR_FLAGS_MAGIC)) { -@@ -401,13 +466,12 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes +@@ -401,13 +467,12 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes OSDBGPRINT(("VBoxDrvFreeBSDIOCtlSlow: failed to allocate buffer of %d bytes; ulCmd=%#lx\n", cbReq, ulCmd)); return ENOMEM; } @@ -154,7 +157,7 @@ } if (Hdr.cbIn < cbReq) RT_BZERO((uint8_t *)pHdr + Hdr.cbIn, cbReq - Hdr.cbIn); -@@ -435,9 +499,8 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes +@@ -435,9 +500,8 @@ static int VBoxDrvFreeBSDIOCtlSlow(PSUPDRVSESSION pSes OSDBGPRINT(("VBoxDrvFreeBSDIOCtlSlow: too much output! %#x > %#x; uCmd=%#lx!\n", cbOut, cbReq, ulCmd)); cbOut = cbReq; } @@ -166,7 +169,7 @@ Log(("VBoxDrvFreeBSDIOCtlSlow: returns %d / %d ulCmd=%lx\n", 0, pHdr->rc, ulCmd)); -@@ -540,8 +603,7 @@ bool VBOXCALL supdrvOSAreCpusOfflinedOnSuspend(void) +@@ -540,8 +604,7 @@ bool VBOXCALL supdrvOSAreCpusOfflinedOnSuspend(void) bool VBOXCALL supdrvOSAreCpusOfflinedOnSuspend(void) { @@ -176,23 +179,30 @@ } -@@ -624,20 +686,44 @@ int VBOXCALL supdrvOSMsrProberModify(RTCPUID idCpu, +@@ -637,31 +700,44 @@ int VBOXCALL supdrvOSMsrProberModify(RTCPUID idCpu, #endif /* SUPDRV_WITH_MSR_PROBER */ +-#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_ARM64) +-SUPR0DECL(int) SUPR0HCPhysToVirt(RTHCPHYS HCPhys, void **ppv) +/** + * Check if the CPU has SMAP support. + */ +static bool VBoxDrvFreeBSDCpuHasSMAP(void) -+{ + { +- AssertReturn(!(HCPhys & PAGE_OFFSET_MASK), VERR_INVALID_POINTER); +- AssertReturn(HCPhys != NIL_RTHCPHYS, VERR_INVALID_POINTER); +- *ppv = (void *)(uintptr_t)pmap_map(NULL, HCPhys, (HCPhys | PAGE_OFFSET_MASK) + 1, VM_PROT_WRITE | VM_PROT_READ); +- return VINF_SUCCESS; +-} +#ifdef VBOX_WITH_EFLAGS_AC_SET_IN_VBOXDRV + if ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0) + return true; -+#endif + #endif + return false; +} -+ -+ + + SUPR0DECL(int) SUPR0PrintfV(const char *pszFormat, va_list va) { char szMsg[256]; diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPLib-freebsd.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPLib-freebsd.cpp new file mode 100644 index 000000000000..95cbe0e2a32c --- /dev/null +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_SUPLib-freebsd.cpp @@ -0,0 +1,11 @@ +--- src/VBox/HostDrivers/Support/freebsd/SUPLib-freebsd.cpp.orig 2024-10-10 20:31:28.000000000 +0200 ++++ src/VBox/HostDrivers/Support/freebsd/SUPLib-freebsd.cpp 2024-11-17 18:27:46.400938000 +0100 +@@ -88,7 +88,7 @@ + /* + * Try open the BSD device. + */ +- const char * const *pszDeviceNm = fFlags & SUPR3INIT_F_UNRESTRICTED ? DEVICE_NAME_SYS : DEVICE_NAME_USR; ++ const char * pszDeviceNm = fFlags & SUPR3INIT_F_UNRESTRICTED ? DEVICE_NAME_SYS : DEVICE_NAME_USR; + int hDevice = open(pszDeviceNm, O_RDWR, 0); + if (hDevice < 0) + { diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_files__vboxdrv b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_files__vboxdrv index 6a6ac9839efc..ef7f483fa00d 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_files__vboxdrv +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_Support_freebsd_files__vboxdrv @@ -1,6 +1,6 @@ ---- src/VBox/HostDrivers/Support/freebsd/files_vboxdrv.orig 2021-10-18 17:58:03 UTC -+++ src/VBox/HostDrivers/Support/freebsd/files_vboxdrv -@@ -119,6 +119,7 @@ FILES_VBOXDRV_NOBIN=" \ +--- src/VBox/HostDrivers/Support/freebsd/files_vboxdrv.orig 2022-10-06 19:11:13.000000000 +0200 ++++ src/VBox/HostDrivers/Support/freebsd/files_vboxdrv 2024-12-26 16:21:34.761238000 +0100 +@@ -132,6 +132,7 @@ ${PATH_ROOT}/src/VBox/Runtime/common/misc/handletable.cpp=>common/misc/handletable.c \ ${PATH_ROOT}/src/VBox/Runtime/common/misc/handletable.h=>common/misc/handletable.h \ ${PATH_ROOT}/src/VBox/Runtime/common/misc/handletablectx.cpp=>common/misc/handletablectx.c \ @@ -8,23 +8,11 @@ ${PATH_ROOT}/src/VBox/Runtime/common/misc/once.cpp=>common/misc/once.c \ ${PATH_ROOT}/src/VBox/Runtime/common/misc/term.cpp=>common/misc/term.c \ ${PATH_ROOT}/src/VBox/Runtime/common/misc/thread.cpp=>common/misc/thread.c \ -@@ -128,16 +129,17 @@ FILES_VBOXDRV_NOBIN=" \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrCopyEx.cpp=>common/string/RTStrCopyEx.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrNCmp.cpp=>common/string/RTStrNCmp.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrNLen.cpp=>common/string/RTStrNLen.c \ -+ ${PATH_ROOT}/src/VBox/Runtime/common/string/memchr.cpp=>common/string/memchr.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/strformat.cpp=>common/string/strformat.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/RTStrFormat.cpp=>common/string/RTStrFormat.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/strformatnum.cpp=>common/string/strformatnum.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/strformatrt.cpp=>common/string/strformatrt.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/strformattype.cpp=>common/string/strformattype.c \ -+ ${PATH_ROOT}/src/VBox/Runtime/common/string/stringalloc.cpp=>common/string/stringalloc.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/strprintf.cpp=>common/string/strprintf.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/string/strprintf-ellipsis.cpp=>common/string/strprintf-ellipsis.c \ +@@ -153,6 +154,7 @@ + ${PATH_ROOT}/src/VBox/Runtime/common/string/strprintf2-ellipsis.cpp=>common/string/strprintf2-ellipsis.c \ ${PATH_ROOT}/src/VBox/Runtime/common/string/strtonum.cpp=>common/string/strtonum.c \ -- ${PATH_ROOT}/src/VBox/Runtime/common/string/memchr.cpp=>common/string/memchr.c \ -- ${PATH_ROOT}/src/VBox/Runtime/common/string/stringalloc.cpp=>common/string/stringalloc.c \ + ${PATH_ROOT}/src/VBox/Runtime/common/string/memchr.cpp=>common/string/memchr.c \ + ${PATH_ROOT}/src/VBox/Runtime/common/string/utf-8.cpp=>common/string/utf-8.c \ + ${PATH_ROOT}/src/VBox/Runtime/common/string/stringalloc.cpp=>common/string/stringalloc.c \ ${PATH_ROOT}/src/VBox/Runtime/common/rand/rand.cpp=>common/rand/rand.c \ ${PATH_ROOT}/src/VBox/Runtime/common/rand/randadv.cpp=>common/rand/randadv.c \ - ${PATH_ROOT}/src/VBox/Runtime/common/rand/randparkmiller.cpp=>common/rand/randparkmiller.c \ diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_VBoxNetFlt_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_VBoxNetFlt_Makefile.kmk index 9c7ab624c52a..690d27be2bfd 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_VBoxNetFlt_Makefile.kmk +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_HostDrivers_VBoxNetFlt_Makefile.kmk @@ -1,6 +1,6 @@ ---- src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk.orig 2019-05-13 13:33:07 UTC +--- src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk.orig 2025-01-21 14:06:16 UTC +++ src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk -@@ -565,7 +565,7 @@ $(PATH_OUT)/opt_netgraph.h: +@@ -543,7 +543,7 @@ ifeq ($(KBUILD_TARGET),freebsd) $(QUIET)$(RM) -f -- $@ $(QUIET)$(CP) -f $< $@ ifndef VBOX_WITH_HARDENING diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Main_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Main_Makefile.kmk index 173a896547a1..f5693ffb72b4 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Main_Makefile.kmk +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Main_Makefile.kmk @@ -1,10 +1,10 @@ ---- src/VBox/Main/Makefile.kmk.orig 2021-01-07 15:41:36 UTC -+++ src/VBox/Main/Makefile.kmk -@@ -646,6 +646,7 @@ VBoxSVC_SOURCES.os2 = \ +--- src/VBox/Main/Makefile.kmk.orig 2024-10-10 20:31:38.000000000 +0200 ++++ src/VBox/Main/Makefile.kmk 2024-12-27 13:32:31.610875000 +0100 +@@ -761,6 +761,7 @@ - VBoxSVC_SOURCES.freebsd = \ - src-server/freebsd/HostHardwareFreeBSD.cpp \ + VBoxSVC_SOURCES.freebsd = \ + src-server/freebsd/HostHardwareFreeBSD.cpp \ + $(if $(VBOX_WITH_DBUS),src-server/linux/HostPowerLinux.cpp) \ - src-server/HostDnsServiceResolvConf.cpp - + src-server/HostDnsServiceResolvConf.cpp + VBoxSVC_LDFLAGS.freebsd += -lcam diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_NetworkServices_Dhcpd_VBoxNetDhcpd.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_NetworkServices_Dhcpd_VBoxNetDhcpd.cpp deleted file mode 100644 index fb84e7344504..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_NetworkServices_Dhcpd_VBoxNetDhcpd.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/VBox/NetworkServices/Dhcpd/VBoxNetDhcpd.cpp.orig 2021-01-07 15:41:46 UTC -+++ src/VBox/NetworkServices/Dhcpd/VBoxNetDhcpd.cpp -@@ -394,7 +394,7 @@ void VBoxNetDhcpd::ifPump() - WaitReq.Hdr.cbReq = sizeof(WaitReq); - WaitReq.pSession = m_pSession; - WaitReq.hIf = m_hIf; -- WaitReq.cMillies = RT_INDEFINITE_WAIT; -+ WaitReq.cMillies = 2000; - int rc = CALL_VMMR0(VMMR0_DO_INTNET_IF_WAIT, WaitReq); - - /* diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_RDP_client-1.8.4_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_RDP_client-1.8.4_Makefile.kmk deleted file mode 100644 index c23a6e6fbb16..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_RDP_client-1.8.4_Makefile.kmk +++ /dev/null @@ -1,13 +0,0 @@ ---- src/VBox/RDP/client-1.8.4/Makefile.kmk.orig 2021-01-07 15:41:47 UTC -+++ src/VBox/RDP/client-1.8.4/Makefile.kmk -@@ -117,8 +117,8 @@ rdesktop-vrdp_SOURCES.solaris = \ - rdesktop-vrdp_SOURCES.freebsd = \ - rdpsnd_oss.c - rdesktop-vrdp_LIBPATH = \ -- /usr/lib \ -- $(VBOX_LIBPATH_X11) -+ $(VBOX_LIBPATH_X11)/lib \ -+ /usr/lib - rdesktop-vrdp_LIBS = \ - X11 \ - $(LIB_RUNTIME) diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_Makefile.kmk b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_Makefile.kmk new file mode 100644 index 000000000000..05a94f714549 --- /dev/null +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_Makefile.kmk @@ -0,0 +1,12 @@ +--- src/VBox/Runtime/Makefile.kmk.orig 2024-11-20 20:11:05.667725000 +0100 ++++ src/VBox/Runtime/Makefile.kmk 2024-11-20 20:12:40.904599000 +0100 +@@ -220,6 +220,9 @@ + $(QUIET)$(oiddb2c_1_TARGET) "$@" $(filter %.cfg,$^) + $(QUIET)$(CP) --changed -fv "$@" "$(IPRT_OUT_DIR)/oiddb.h" + ++# Set the defines that utf8-posix.cpp needs. It's used by several targets. ++# ++r3/posix/utf8-posix.cpp_DEFS.freebsd = $(VBOX_ICONV_DEFS) + + # + # Unicode Specification reader used to regenerate unidata-*.cpp. diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_alloc-r0drv-freebsd.c b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_alloc-r0drv-freebsd.c index 9424293d8fb6..0ae2d847c0f6 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_alloc-r0drv-freebsd.c +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_alloc-r0drv-freebsd.c @@ -1,48 +1,33 @@ ---- src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c.orig 2021-01-07 15:42:08 UTC -+++ src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c -@@ -78,6 +78,7 @@ MALLOC_DEFINE(M_IPRTCONT, "iprtcont", "IPRT - contiguo +--- src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c.orig 2024-10-10 20:32:14.000000000 +0200 ++++ src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c 2024-12-27 13:39:49.059878000 +0100 +@@ -88,6 +88,7 @@ DECLHIDDEN(int) rtR0MemAllocEx(size_t cb, uint32_t fFlags, PRTMEMHDR *ppHdr) { + IPRT_FREEBSD_SAVE_EFL_AC(); size_t cbAllocated = cb; - PRTMEMHDR pHdr = NULL; - -@@ -100,8 +101,10 @@ DECLHIDDEN(int) rtR0MemAllocEx(size_t cb, uint32_t fFl - cbAllocated = RT_ALIGN_Z(cb + sizeof(*pHdr), PAGE_SIZE); - - pVmObject = vm_object_allocate(OBJT_DEFAULT, cbAllocated >> PAGE_SHIFT); -- if (!pVmObject) -+ if (!pVmObject) { -+ IPRT_FREEBSD_RESTORE_EFL_AC(); - return VERR_NO_EXEC_MEMORY; -+ } - - /* Addr contains a start address vm_map_find will start searching for suitable space at. */ - #if __FreeBSD_version >= 1000055 -@@ -138,6 +141,8 @@ DECLHIDDEN(int) rtR0MemAllocEx(size_t cb, uint32_t fFl - fFlags & RTMEMHDR_FLAG_ZEROED ? M_NOWAIT | M_ZERO : M_NOWAIT); - } + PRTMEMHDR pHdr = (PRTMEMHDR)malloc(cb + sizeof(RTMEMHDR), M_IPRTHEAP, + fFlags & RTMEMHDR_FLAG_ZEROED ? M_NOWAIT | M_ZERO : M_NOWAIT); +@@ -99,21 +100,28 @@ + pHdr->cbReq = cb; + *ppHdr = pHdr; ++ IPRT_FREEBSD_RESTORE_EFL_AC(); + return VINF_SUCCESS; +- } ++ } ++ + IPRT_FREEBSD_RESTORE_EFL_AC(); -+ - if (RT_UNLIKELY(!pHdr)) - return VERR_NO_MEMORY; + return VERR_NO_MEMORY; + } -@@ -153,6 +158,8 @@ DECLHIDDEN(int) rtR0MemAllocEx(size_t cb, uint32_t fFl DECLHIDDEN(void) rtR0MemFree(PRTMEMHDR pHdr) { + IPRT_FREEBSD_SAVE_EFL_AC(); + pHdr->u32Magic += 1; - - #ifdef RT_ARCH_AMD64 -@@ -165,11 +172,14 @@ DECLHIDDEN(void) rtR0MemFree(PRTMEMHDR pHdr) - else - #endif - free(pHdr, M_IPRTHEAP); -+ + free(pHdr, M_IPRTHEAP); + IPRT_FREEBSD_RESTORE_EFL_AC(); } @@ -53,7 +38,7 @@ void *pv; /* -@@ -194,6 +204,7 @@ RTR0DECL(void *) RTMemContAlloc(PRTCCPHYS pPhys, size_ +@@ -138,6 +146,7 @@ *pPhys = vtophys(pv); Assert(!(*pPhys & PAGE_OFFSET_MASK)); } @@ -61,7 +46,7 @@ return pv; } -@@ -203,7 +214,9 @@ RTR0DECL(void) RTMemContFree(void *pv, size_t cb) +@@ -147,7 +156,9 @@ if (pv) { AssertMsg(!((uintptr_t)pv & PAGE_OFFSET_MASK), ("pv=%p\n", pv)); diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c index 7e0f92ad6468..d8bfcc464dc0 100644 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c +++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r0drv_freebsd_memobj-r0drv-freebsd.c @@ -1,36 +1,26 @@ ---- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2021-10-18 17:58:41 UTC -+++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c -@@ -129,6 +129,7 @@ static vm_map_t rtR0MemObjFreeBSDGetMap(PRTR0MEMOBJINT +--- src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c.orig 2024-11-22 11:30:43.777055000 +0100 ++++ src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c 2024-11-22 22:12:10.608369000 +0100 +@@ -139,8 +139,10 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem) { + IPRT_FREEBSD_SAVE_EFL_AC(); PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)pMem; int rc; ++ vm_map_t pMap; -@@ -145,16 +146,15 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem) + switch (pMemFreeBSD->Core.enmType) + { +@@ -155,8 +157,6 @@ case RTR0MEMOBJTYPE_LOCK: { - vm_map_t pMap = kernel_map; -+ if (pMemFreeBSD->Core.u.Lock.R0Process != NIL_RTR0PROCESS) { -+ vm_map_t pMap = &((struct proc *)pMemFreeBSD->Core.u.Lock.R0Process)->p_vmspace->vm_map; - -- if (pMemFreeBSD->Core.u.Lock.R0Process != NIL_RTR0PROCESS) -- pMap = &((struct proc *)pMemFreeBSD->Core.u.Lock.R0Process)->p_vmspace->vm_map; - -- rc = vm_map_unwire(pMap, -+ rc = vm_map_unwire(pMap, - (vm_offset_t)pMemFreeBSD->Core.pv, - (vm_offset_t)pMemFreeBSD->Core.pv + pMemFreeBSD->Core.cb, - VM_MAP_WIRE_SYSTEM | VM_MAP_WIRE_NOHOLES); -- AssertMsg(rc == KERN_SUCCESS, ("%#x", rc)); -+ AssertMsg(rc == KERN_SUCCESS, ("%#x", rc)); -+ } - break; - } + if (pMemFreeBSD->Core.u.Lock.R0Process != NIL_RTR0PROCESS) + pMap = &((struct proc *)pMemFreeBSD->Core.u.Lock.R0Process)->p_vmspace->vm_map; -@@ -210,6 +210,7 @@ DECLHIDDEN(int) rtR0MemObjNativeFree(RTR0MEMOBJ pMem) +@@ -220,6 +220,7 @@ return VERR_INTERNAL_ERROR; } @@ -38,7 +28,7 @@ return VINF_SUCCESS; } -@@ -320,8 +321,10 @@ static int rtR0MemObjFreeBSDAllocHelper(PRTR0MEMOBJFRE +@@ -329,7 +330,8 @@ size_t cPages = atop(pMemFreeBSD->Core.cb); int rc; @@ -46,151 +36,121 @@ + pMemFreeBSD->pObject = vm_pager_allocate(OBJT_PHYS, NULL, + pMemFreeBSD->Core.cb, VM_PROT_ALL, 0, curthread->td_ucred); -+ /* No additional object reference for auto-deallocation upon unmapping. */ #if __FreeBSD_version >= 1000055 - rc = vm_map_find(kernel_map, pMemFreeBSD->pObject, 0, -@@ -361,19 +364,25 @@ static int rtR0MemObjFreeBSDAllocHelper(PRTR0MEMOBJFRE - } - DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) +@@ -371,6 +373,7 @@ + + DECLHIDDEN(int) rtR0MemObjNativeAllocPage(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable, const char *pszTag) { + IPRT_FREEBSD_SAVE_EFL_AC(); - PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), - RTR0MEMOBJTYPE_PAGE, NULL, cb); - if (!pMemFreeBSD) -+ { -+ IPRT_FREEBSD_RESTORE_EFL_AC(); - return VERR_NO_MEMORY; -+ } - - int rc = rtR0MemObjFreeBSDAllocHelper(pMemFreeBSD, fExecutable, ~(vm_paddr_t)0, false, VERR_NO_MEMORY); - if (RT_FAILURE(rc)) - { - rtR0MemObjDelete(&pMemFreeBSD->Core); + PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_PAGE, + NULL, cb, pszTag); + if (pMemFreeBSD) +@@ -380,8 +383,10 @@ + *ppMem = &pMemFreeBSD->Core; + else + rtR0MemObjDelete(&pMemFreeBSD->Core); + IPRT_FREEBSD_RESTORE_EFL_AC(); return rc; } - - *ppMem = &pMemFreeBSD->Core; + IPRT_FREEBSD_RESTORE_EFL_AC(); - return rc; + return VERR_NO_MEMORY; } -@@ -387,39 +396,51 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocLarge(PPRTR0MEMOB +@@ -395,6 +400,7 @@ - DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) + DECLHIDDEN(int) rtR0MemObjNativeAllocLow(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable, const char *pszTag) { + IPRT_FREEBSD_SAVE_EFL_AC(); - PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), - RTR0MEMOBJTYPE_LOW, NULL, cb); - if (!pMemFreeBSD) -+ { -+ IPRT_FREEBSD_RESTORE_EFL_AC(); - return VERR_NO_MEMORY; -+ } - - int rc = rtR0MemObjFreeBSDAllocHelper(pMemFreeBSD, fExecutable, _4G - 1, false, VERR_NO_LOW_MEMORY); - if (RT_FAILURE(rc)) + PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_LOW, NULL, cb, pszTag); + if (pMemFreeBSD) { - rtR0MemObjDelete(&pMemFreeBSD->Core); +@@ -403,14 +409,17 @@ + *ppMem = &pMemFreeBSD->Core; + else + rtR0MemObjDelete(&pMemFreeBSD->Core); + IPRT_FREEBSD_RESTORE_EFL_AC(); return rc; } - - *ppMem = &pMemFreeBSD->Core; + IPRT_FREEBSD_RESTORE_EFL_AC(); - return rc; + return VERR_NO_MEMORY; } - DECLHIDDEN(int) rtR0MemObjNativeAllocCont(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable) + DECLHIDDEN(int) rtR0MemObjNativeAllocCont(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, bool fExecutable, const char *pszTag) { + IPRT_FREEBSD_SAVE_EFL_AC(); - PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), - RTR0MEMOBJTYPE_CONT, NULL, cb); - if (!pMemFreeBSD) -+ { -+ IPRT_FREEBSD_RESTORE_EFL_AC(); - return VERR_NO_MEMORY; -+ } - - int rc = rtR0MemObjFreeBSDAllocHelper(pMemFreeBSD, fExecutable, _4G - 1, true, VERR_NO_CONT_MEMORY); - if (RT_FAILURE(rc)) - { - rtR0MemObjDelete(&pMemFreeBSD->Core); + PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_CONT, + NULL, cb, pszTag); + if (pMemFreeBSD) +@@ -423,8 +432,10 @@ + } + else + rtR0MemObjDelete(&pMemFreeBSD->Core); + IPRT_FREEBSD_RESTORE_EFL_AC(); return rc; } - - pMemFreeBSD->Core.u.Cont.Phys = vtophys(pMemFreeBSD->Core.pv); - *ppMem = &pMemFreeBSD->Core; + IPRT_FREEBSD_RESTORE_EFL_AC(); - return rc; + return VERR_NO_MEMORY; } -@@ -429,6 +450,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB - RTHCPHYS PhysHighest, size_t uAlignment, - bool fContiguous, int rcNoMem) +@@ -432,6 +443,7 @@ + static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJTYPE enmType, size_t cb, RTHCPHYS PhysHighest, + size_t uAlignment, bool fContiguous, int rcNoMem, const char *pszTag) { + IPRT_FREEBSD_SAVE_EFL_AC(); - uint32_t cPages = atop(cb); - vm_paddr_t VmPhysAddrHigh; + /* create the object. */ + PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), enmType, NULL, cb, pszTag); + if (pMemFreeBSD) +@@ -439,7 +451,8 @@ + vm_paddr_t const VmPhysAddrHigh = PhysHighest != NIL_RTHCPHYS ? PhysHighest : ~(vm_paddr_t)0; + u_long const cPages = atop(cb); -@@ -436,9 +458,13 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB - PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), - enmType, NULL, cb); - if (!pMemFreeBSD) -+ { -+ IPRT_FREEBSD_RESTORE_EFL_AC(); - return VERR_NO_MEMORY; -+ } - -- pMemFreeBSD->pObject = vm_object_allocate(OBJT_PHYS, atop(cb)); -+ pMemFreeBSD->pObject = vm_pager_allocate(OBJT_PHYS, NULL, +- pMemFreeBSD->pObject = vm_object_allocate(OBJT_PHYS, cPages); ++ pMemFreeBSD->pObject = vm_pager_allocate(OBJT_PHYS, NULL, + pMemFreeBSD->Core.cb, VM_PROT_ALL, 0, curthread->td_ucred); - if (PhysHighest != NIL_RTHCPHYS) - VmPhysAddrHigh = PhysHighest; -@@ -466,6 +492,7 @@ static int rtR0MemObjFreeBSDAllocPhysPages(PPRTR0MEMOB - rtR0MemObjDelete(&pMemFreeBSD->Core); + int rc = rtR0MemObjFreeBSDPhysAllocHelper(pMemFreeBSD->pObject, cPages, VmPhysAddrHigh, + uAlignment, fContiguous, true, rcNoMem); +@@ -462,8 +475,10 @@ + vm_object_deallocate(pMemFreeBSD->pObject); + rtR0MemObjDelete(&pMemFreeBSD->Core); + } ++ IPRT_FREEBSD_RESTORE_EFL_AC(); + return rc; } - + IPRT_FREEBSD_RESTORE_EFL_AC(); - return rc; + return VERR_NO_MEMORY; } -@@ -485,17 +512,22 @@ DECLHIDDEN(int) rtR0MemObjNativeAllocPhysNC(PPRTR0MEMO - DECLHIDDEN(int) rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, uint32_t uCachePolicy) +@@ -486,6 +501,7 @@ + const char *pszTag) { AssertReturn(uCachePolicy == RTMEM_CACHE_POLICY_DONT_CARE, VERR_NOT_SUPPORTED); + IPRT_FREEBSD_SAVE_EFL_AC(); /* create the object. */ - PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_PHYS, NULL, cb); - if (!pMemFreeBSD) -+ { + PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(*pMemFreeBSD), RTR0MEMOBJTYPE_PHYS, +@@ -497,8 +513,10 @@ + pMemFreeBSD->Core.u.Phys.PhysBase = Phys; + pMemFreeBSD->Core.u.Phys.uCachePolicy = uCachePolicy; + *ppMem = &pMemFreeBSD->Core; + IPRT_FREEBSD_RESTORE_EFL_AC(); - return VERR_NO_MEMORY; -+ } - - /* there is no allocation here, it needs to be mapped somewhere first. */ - pMemFreeBSD->Core.u.Phys.fAllocated = false; - pMemFreeBSD->Core.u.Phys.PhysBase = Phys; - pMemFreeBSD->Core.u.Phys.uCachePolicy = uCachePolicy; - *ppMem = &pMemFreeBSD->Core; + return VINF_SUCCESS; + } + IPRT_FREEBSD_RESTORE_EFL_AC(); - return VINF_SUCCESS; + return VERR_NO_MEMORY; } -@@ -507,6 +539,7 @@ static int rtR0MemObjNativeLockInMap(PPRTR0MEMOBJINTER +@@ -510,6 +528,7 @@ vm_offset_t AddrStart, size_t cb, uint32_t fAccess, - RTR0PROCESS R0Process, int fFlags) + RTR0PROCESS R0Process, int fFlags, const char *pszTag) { + IPRT_FREEBSD_SAVE_EFL_AC(); int rc; NOREF(fAccess); -@@ -515,21 +548,28 @@ static int rtR0MemObjNativeLockInMap(PPRTR0MEMOBJINTER +@@ -519,21 +538,28 @@ if (!pMemFreeBSD) return VERR_NO_MEMORY; @@ -227,15 +187,15 @@ return VERR_NO_MEMORY;/** @todo fix mach -> vbox error conversion for freebsd. */ } -@@ -565,6 +605,7 @@ DECLHIDDEN(int) rtR0MemObjNativeLockKernel(PPRTR0MEMOB - */ - static int rtR0MemObjNativeReserveInMap(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process, vm_map_t pMap) +@@ -573,6 +599,7 @@ + static int rtR0MemObjNativeReserveInMap(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment, + RTR0PROCESS R0Process, vm_map_t pMap, const char *pszTag) { + IPRT_FREEBSD_SAVE_EFL_AC(); int rc; /* -@@ -622,11 +663,13 @@ static int rtR0MemObjNativeReserveInMap(PPRTR0MEMOBJIN +@@ -631,11 +658,13 @@ pMemFreeBSD->Core.pv = (void *)MapAddress; pMemFreeBSD->Core.u.ResVirt.R0Process = R0Process; *ppMem = &pMemFreeBSD->Core; @@ -249,16 +209,16 @@ return rc; } -@@ -648,6 +691,8 @@ DECLHIDDEN(int) rtR0MemObjNativeReserveUser(PPRTR0MEMO +@@ -659,6 +688,8 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment, - unsigned fProt, size_t offSub, size_t cbSub) + unsigned fProt, size_t offSub, size_t cbSub, const char *pszTag) { + IPRT_FREEBSD_SAVE_EFL_AC(); + // AssertMsgReturn(!offSub && !cbSub, ("%#x %#x\n", offSub, cbSub), VERR_NOT_SUPPORTED); AssertMsgReturn(pvFixed == (void *)-1, ("%p\n", pvFixed), VERR_NOT_SUPPORTED); -@@ -704,6 +749,7 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ +@@ -713,6 +744,7 @@ Assert((vm_offset_t)pMemFreeBSD->Core.pv == Addr); pMemFreeBSD->Core.u.Mapping.R0Process = NIL_RTR0PROCESS; *ppMem = &pMemFreeBSD->Core; @@ -266,7 +226,7 @@ return VINF_SUCCESS; } rc = vm_map_remove(kernel_map, Addr, Addr + cbSub); -@@ -712,6 +758,7 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ +@@ -721,6 +753,7 @@ else vm_object_deallocate(pMemToMapFreeBSD->pObject); @@ -274,37 +234,33 @@ return VERR_NO_MEMORY; } -@@ -719,6 +766,8 @@ DECLHIDDEN(int) rtR0MemObjNativeMapKernel(PPRTR0MEMOBJ +@@ -728,6 +761,8 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment, - unsigned fProt, RTR0PROCESS R0Process, size_t offSub, size_t cbSub) + unsigned fProt, RTR0PROCESS R0Process, size_t offSub, size_t cbSub, const char *pszTag) { + IPRT_FREEBSD_SAVE_EFL_AC(); + /* * Check for unsupported stuff. */ -@@ -775,47 +824,53 @@ DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJIN - 0); /* copy-on-write and similar flags */ +@@ -785,44 +820,50 @@ if (rc == KERN_SUCCESS) -+ rc = vm_map_wire(pProcMap, AddrR3, AddrR3 + cbSub, VM_MAP_WIRE_USER|VM_MAP_WIRE_NOHOLES); -+ if (rc == KERN_SUCCESS) { - rc = vm_map_wire(pProcMap, AddrR3, AddrR3 + pMemToMap->cb, VM_MAP_WIRE_USER|VM_MAP_WIRE_NOHOLES); -+ rc = vm_map_inherit(pProcMap, AddrR3, AddrR3 + cbSub, VM_INHERIT_SHARE); ++ rc = vm_map_wire(pProcMap, AddrR3, AddrR3 + cbSub, VM_MAP_WIRE_USER|VM_MAP_WIRE_NOHOLES); AssertMsg(rc == KERN_SUCCESS, ("%#x\n", rc)); - rc = vm_map_inherit(pProcMap, AddrR3, AddrR3 + pMemToMap->cb, VM_INHERIT_SHARE); -- AssertMsg(rc == KERN_SUCCESS, ("%#x\n", rc)); -- ++ rc = vm_map_inherit(pProcMap, AddrR3, AddrR3 + cbSub, VM_INHERIT_SHARE); + AssertMsg(rc == KERN_SUCCESS, ("%#x\n", rc)); + /* * Create a mapping object for it. */ - PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(RTR0MEMOBJFREEBSD), - RTR0MEMOBJTYPE_MAPPING, - (void *)AddrR3, -- pMemToMap->cb); -+ cbSub); + PRTR0MEMOBJFREEBSD pMemFreeBSD = (PRTR0MEMOBJFREEBSD)rtR0MemObjNew(sizeof(RTR0MEMOBJFREEBSD), RTR0MEMOBJTYPE_MAPPING, +- (void *)AddrR3, pMemToMap->cb, pszTag); ++ (void *)AddrR3, cbSub, pszTag); if (pMemFreeBSD) { Assert((vm_offset_t)pMemFreeBSD->Core.pv == AddrR3); @@ -315,7 +271,7 @@ } - rc = vm_map_remove(pProcMap, AddrR3, AddrR3 + pMemToMap->cb); -+ rc = vm_map_remove(pProcMap, AddrR3, AddrR3 + cbSub /* XXX pMemToMap->cb*/ ); ++ rc = vm_map_remove(pProcMap, AddrR3, AddrR3 + cbSub); AssertMsg(rc == KERN_SUCCESS, ("Deleting mapping failed\n")); } else @@ -329,7 +285,6 @@ DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINTERNAL pMem, size_t offSub, size_t cbSub, uint32_t fProt) { + IPRT_FREEBSD_SAVE_EFL_AC(); -+ vm_prot_t ProtectionFlags = 0; vm_offset_t AddrStart = (uintptr_t)pMem->pv + offSub; vm_offset_t AddrEnd = AddrStart + cbSub; @@ -343,7 +298,7 @@ if ((fProt & RTMEM_PROT_NONE) == RTMEM_PROT_NONE) ProtectionFlags = VM_PROT_NONE; -@@ -826,7 +881,12 @@ DECLHIDDEN(int) rtR0MemObjNativeProtect(PRTR0MEMOBJINT +@@ -833,7 +874,12 @@ if ((fProt & RTMEM_PROT_EXEC) == RTMEM_PROT_EXEC) ProtectionFlags |= VM_PROT_EXECUTE; @@ -356,7 +311,7 @@ if (krc == KERN_SUCCESS) return VINF_SUCCESS; -@@ -851,11 +911,19 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P +@@ -858,11 +904,19 @@ vm_offset_t pb = (vm_offset_t)pMemFreeBSD->Core.pv + ptoa(iPage); @@ -380,7 +335,7 @@ } case RTR0MEMOBJTYPE_MAPPING: -@@ -864,11 +932,16 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P +@@ -871,11 +925,15 @@ if (pMemFreeBSD->Core.u.Mapping.R0Process != NIL_RTR0PROCESS) { @@ -394,11 +349,10 @@ + addr = pmap_extract(pPhysicalMap, pb); + IPRT_FREEBSD_RESTORE_EFL_AC(); + return addr; -+ } return vtophys(pb); } -@@ -879,9 +952,11 @@ DECLHIDDEN(RTHCPHYS) rtR0MemObjNativeGetPagePhysAddr(P +@@ -886,9 +944,11 @@ { RTHCPHYS addr; diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r3_freebsd_systemmem-freebsd.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r3_freebsd_systemmem-freebsd.cpp deleted file mode 100644 index 92af93646dd6..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Runtime_r3_freebsd_systemmem-freebsd.cpp +++ /dev/null @@ -1,39 +0,0 @@ ---- src/VBox/Runtime/r3/freebsd/systemmem-freebsd.cpp.orig 2017-07-27 13:18:46 UTC -+++ src/VBox/Runtime/r3/freebsd/systemmem-freebsd.cpp -@@ -65,7 +65,6 @@ RTDECL(int) RTSystemQueryAvailableRam(uint64_t *pcb) - u_int cPagesMemFree = 0; - u_int cPagesMemInactive = 0; - u_int cPagesMemCached = 0; -- u_int cPagesMemUsed = 0; - int cbPage = 0; - size_t cbParameter; - int cProcessed = 0; -@@ -73,25 +72,23 @@ RTDECL(int) RTSystemQueryAvailableRam(uint64_t *pcb) - cbParameter = sizeof(cPagesMemFree); - if (sysctlbyname("vm.stats.vm.v_free_count", &cPagesMemFree, &cbParameter, NULL, 0)) - rc = RTErrConvertFromErrno(errno); -- cbParameter = sizeof(cPagesMemUsed); -- if ( RT_SUCCESS(rc) -- && sysctlbyname("vm.stats.vm.v_active_count", &cPagesMemUsed, &cbParameter, NULL, 0)) -- rc = RTErrConvertFromErrno(errno); - cbParameter = sizeof(cPagesMemInactive); - if ( RT_SUCCESS(rc) - && sysctlbyname("vm.stats.vm.v_inactive_count", &cPagesMemInactive, &cbParameter, NULL, 0)) - rc = RTErrConvertFromErrno(errno); -+#if __FreeBSD_version < 1200016 - cbParameter = sizeof(cPagesMemCached); - if ( RT_SUCCESS(rc) - && sysctlbyname("vm.stats.vm.v_cache_count", &cPagesMemCached, &cbParameter, NULL, 0)) - rc = RTErrConvertFromErrno(errno); -+#endif - cbParameter = sizeof(cbPage); - if ( RT_SUCCESS(rc) - && sysctlbyname("hw.pagesize", &cbPage, &cbParameter, NULL, 0)) - rc = RTErrConvertFromErrno(errno); - - if (RT_SUCCESS(rc)) -- *pcb = (cPagesMemFree + cPagesMemInactive + cPagesMemCached ) * cbPage; -+ *pcb = ((uint64_t)cPagesMemFree + cPagesMemInactive + cPagesMemCached) * cbPage; - - return rc; - } diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_VMM_VMMR3_PGMPhys.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_VMM_VMMR3_PGMPhys.cpp deleted file mode 100644 index 9080ee4b8e87..000000000000 --- a/emulators/virtualbox-ose-70/files/patch-src_VBox_VMM_VMMR3_PGMPhys.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/VBox/VMM/VMMR3/PGMPhys.cpp.orig 2022-01-13 18:58:38 UTC -+++ src/VBox/VMM/VMMR3/PGMPhys.cpp -@@ -3179,7 +3179,7 @@ VMMR3_INT_DECL(int) PGMR3PhysMmio2Register(PVM pVM, PP - else - #endif - { --#ifndef VBOX_WITH_LINEAR_HOST_PHYS_MEM -+#if defined(VBOX_WITH_RAM_IN_KERNEL) && !defined(VBOX_WITH_LINEAR_HOST_PHYS_MEM) - rc = SUPR3PageAllocEx(cPages, 0 /*fFlags*/, &pvPages, &pvPagesR0, paPages); - #else - rc = SUPR3PageAllocEx(cPages, 0 /*fFlags*/, &pvPages, NULL /*pR0Ptr*/, paPages); diff --git a/emulators/virtualbox-ose-70/files/patch-src_VMM_Config.kmk b/emulators/virtualbox-ose-70/files/patch-src_VMM_Config.kmk new file mode 100644 index 000000000000..1c44352c9409 --- /dev/null +++ b/emulators/virtualbox-ose-70/files/patch-src_VMM_Config.kmk @@ -0,0 +1,11 @@ +--- src/VBox/VMM/Config.kmk.orig 2024-12-27 03:55:34.269311000 +0100 ++++ src/VBox/VMM/Config.kmk 2024-12-27 03:42:41.858673000 +0100 +@@ -91,7 +91,7 @@ + VMM_COMMON_DEFS += VBOX_WITH_NATIVE_NEM VBOX_WITH_NEM_R0 + endif + endif +-if1of ($(KBUILD_TARGET), freebsd linux solaris) # Hosts that implements SUPR0HCPhysToVirt. ++if1of ($(KBUILD_TARGET), linux solaris) # Hosts that implements SUPR0HCPhysToVirt. + VMM_COMMON_DEFS += VBOX_WITH_LINEAR_HOST_PHYS_MEM + endif + diff --git a/emulators/virtualbox-ose-70/files/virtualbox.desktop b/emulators/virtualbox-ose-70/files/virtualbox.desktop new file mode 100644 index 000000000000..b0d09e2128b7 --- /dev/null +++ b/emulators/virtualbox-ose-70/files/virtualbox.desktop @@ -0,0 +1,17 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=Oracle VM VirtualBox +GenericName=Virtual Machine +Type=Application +Exec=VirtualBox +TryExec=VirtualBox +Icon=VBox +Categories=Emulator;System; +Comment=Run several virtual systems on a single host computer +Comment[de]=Windows und andere Betriebssysteme unter FreeBSD ausführen +Comment[it]=Esegui più macchine virtuali su un singolo computer +Comment[ko]=가상 머신 +Comment[pl]=Uruchamianie wielu systemów wirtualnych na jednym komputerze gospodarza +Comment[ru]=Запуск нескольких виртуальных машин на одном компьютере +Comment[sv]=Kör flera virtuella system på en enda värddator diff --git a/emulators/virtualbox-ose-70/pkg-plist b/emulators/virtualbox-ose-70/pkg-plist index 93a4dcd48c29..e1bfb5206b85 100644 --- a/emulators/virtualbox-ose-70/pkg-plist +++ b/emulators/virtualbox-ose-70/pkg-plist @@ -3,7 +3,6 @@ bin/VBoxBalloonCtrl bin/VBoxBugReport bin/VBoxHeadless bin/VBoxManage -%%X11%%bin/VBoxSDL bin/VBoxVRDP %%QT%%bin/VirtualBox %%QT%%bin/VirtualBoxVM @@ -13,7 +12,6 @@ bin/vboxbugreport bin/vboxheadless %%VBOXIMG%%bin/vboximg-mount bin/vboxmanage -%%X11%%bin/vboxsdl %%WEBSERVICE%%bin/vboxwebsrv %%QT%%bin/virtualbox %%QT%%bin/virtualboxvm @@ -396,7 +394,7 @@ lib/virtualbox/VBoxGuestPropSvc.so @(root,%%VBOXGROUP%%,4510) lib/virtualbox/VBoxHeadless lib/virtualbox/VBoxHeadless.so lib/virtualbox/VBoxHostChannel.so -%%X11%%lib/virtualbox/VBoxKeyboard.so +%%QT%%lib/virtualbox/VBoxKeyboard.so lib/virtualbox/VBoxManage @(root,%%VBOXGROUP%%,4510) lib/virtualbox/VBoxNetAdpCtl @(root,%%VBOXGROUP%%,4510) lib/virtualbox/VBoxNetDHCP @@ -404,8 +402,6 @@ lib/virtualbox/VBoxNetDHCP.so @(root,%%VBOXGROUP%%,4510) lib/virtualbox/VBoxNetNAT lib/virtualbox/VBoxNetNAT.so lib/virtualbox/VBoxRT.so -%%X11%%@(root,%%VBOXGROUP%%,4510) lib/virtualbox/VBoxSDL -%%X11%%lib/virtualbox/VBoxSDL.so lib/virtualbox/VBoxSVC %%X11%%lib/virtualbox/VBoxSVGA3D.so lib/virtualbox/VBoxSharedClipboard.so diff --git a/emulators/virtualbox-ose-kmod-70/Makefile b/emulators/virtualbox-ose-kmod-70/Makefile index 9bbd0e6d5fa6..2e992ea771bc 100644 --- a/emulators/virtualbox-ose-kmod-70/Makefile +++ b/emulators/virtualbox-ose-kmod-70/Makefile @@ -1,9 +1,8 @@ PORTNAME= virtualbox-ose -DISTVERSION= 6.1.50 -PORTREVISION= 1 +DISTVERSION= 7.0.24 CATEGORIES= emulators MASTER_SITES= https://download.virtualbox.org/virtualbox/${DISTVERSION}/ -PKGNAMESUFFIX= -kmod +PKGNAMESUFFIX= -kmod-70 DISTNAME= VirtualBox-${DISTVERSION} MAINTAINER= vbox@FreeBSD.org @@ -34,11 +33,11 @@ CONFIGURE_ARGS+= --disable-alsa \ --disable-xpcom CONFIGURE_ARGS+= --nofatal --with-gcc="${CC}" --with-g++="${CXX}" -CONFLICTS_INSTALL= virtualbox-ose-kmod-legacy \ - virtualbox-ose-kmod-70 +CONFLICTS_INSTALL= virtualbox-ose-kmod \ + virtualbox-ose-kmod-legacy -PATCHDIR= ${.CURDIR}/../${PORTNAME}/files -PORTSCOUT= limit:^6\. +PATCHDIR= ${.CURDIR}/../${PORTNAME}-70/files +PORTSCOUT= limit:^7\.0\. SUB_FILES= pkg-message SUB_LIST= OPSYS=${OPSYS} OSREL=${OSREL} diff --git a/emulators/virtualbox-ose-kmod-70/distinfo b/emulators/virtualbox-ose-kmod-70/distinfo index f00e6ab0a7da..abcb5fb32c6c 100644 --- a/emulators/virtualbox-ose-kmod-70/distinfo +++ b/emulators/virtualbox-ose-kmod-70/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1705518738 -SHA256 (VirtualBox-6.1.50.tar.bz2) = 73ff603842896cb8d86ac5a817eb5037d7d225d3c46ea238e39d7ba5aaf61a57 -SIZE (VirtualBox-6.1.50.tar.bz2) = 165959648 +TIMESTAMP = 1738067736 +SHA256 (VirtualBox-7.0.24.tar.bz2) = 340d66f52251e23d9bc1eb4fdf70e44cb9d1db69bc5064e3f7bdfb8bc0e3a458 +SIZE (VirtualBox-7.0.24.tar.bz2) = 174663788 diff --git a/emulators/virtualbox-ose-nox11-70/Makefile b/emulators/virtualbox-ose-nox11-70/Makefile index c396083ebf7c..b1f9189a1bd4 100644 --- a/emulators/virtualbox-ose-nox11-70/Makefile +++ b/emulators/virtualbox-ose-nox11-70/Makefile @@ -1,7 +1,7 @@ -PORTREVISION= 8 -PKGNAMESUFFIX= -nox11 +PORTREVISION= 0 +PKGNAMESUFFIX= -nox11-70 -MASTERDIR= ${.CURDIR}/../virtualbox-ose +MASTERDIR= ${.CURDIR}/../virtualbox-ose-70 OPTIONS_EXCLUDE= ALSA DBUS DEBUG GUESTADDITIONS DOCS NLS PULSEAUDIO \ QT5 VPX X11