Index: branches/2020Q2/emulators/virtualbox-ose/Makefile =================================================================== --- branches/2020Q2/emulators/virtualbox-ose/Makefile (revision 531689) +++ branches/2020Q2/emulators/virtualbox-ose/Makefile (revision 531690) @@ -1,405 +1,400 @@ # Created by: Bernhard Froehlich # $FreeBSD$ PORTNAME= virtualbox-ose PORTVERSION= 5.2.34 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= emulators MASTER_SITES= https://download.oracle.com/virtualbox/${PORTVERSION}/ DISTFILES= VirtualBox-${PORTVERSION}${EXTRACT_SUFX} ${GUESTADDITIONS} EXTRACT_ONLY= VirtualBox-${PORTVERSION}${EXTRACT_SUFX} MAINTAINER= vbox@FreeBSD.org COMMENT= General-purpose full virtualizer for x86 hardware LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING PATCH_DEPENDS+= ${LOCALBASE}/share/kBuild/tools/GXX3.kmk:devel/kBuild BUILD_DEPENDS= yasm:devel/yasm \ xsltproc:textproc/libxslt \ kmk:devel/kBuild \ gtar:archivers/gtar LIB_DEPENDS= libpng.so:graphics/png \ libxslt.so:textproc/libxslt \ libcurl.so:ftp/curl RUN_DEPENDS= ${LOCALBASE}/etc/rc.d/vboxnet:emulators/virtualbox-ose-kmod CPE_VENDOR= oracle CPE_PRODUCT= vm_virtualbox WRKSRC= ${WRKDIR}/VirtualBox-${PORTVERSION} ONLY_FOR_ARCHS= i386 amd64 -USES= cpe gnome iconv pkgconfig ssl tar:bzip2 +USES= compiler:c++14-lang cpe gnome iconv pkgconfig ssl tar:bzip2 USE_GNOME= libidl libxml2 -# machine/atomic.h may use features that are only available in GCC9. This is -# a workaround, anyways- we should be expressing USES= compiler:c++14-lang, but -# contemporary clang miscompiles virtualbox in some fashion and yields runtime -# breakage. -USE_GCC= any HAS_CONFIGURE= yes CONFIGURE_ARGS= --disable-java --passive-mesa CONFIGURE_ARGS+= --with-gcc="${CC}" --with-g++="${CXX}" CONFLICTS_INSTALL= virtualbox-ose-additions-* \ virtualbox-ose-devel-[0-9]* \ virtualbox-ose-legacy-[0-9]* \ virtualbox-ose-lite-[0-9]* LDFLAGS= -lpthread VBOXUSER?= vboxusers VBOXWSUSER?= vboxusers VBOXGROUP?= vboxusers USERS= ${VBOXUSER} GROUPS= ${VBOXGROUP} VBOX_DIR= ${PREFIX}/${VBOX_DIR_REL} VBOX_DIR_REL= lib/virtualbox VBOX_LINKS= VBoxVRDP VBOX_PROGS= VBoxAutostart VBoxBalloonCtrl VBoxBugReport VBoxHeadless \ VBoxManage VBOX_UTILS= VBoxExtPackHelperApp VBoxNetAdpCtl VBoxNetDHCP VBoxNetNAT \ VBoxSVC VBoxXPCOMIPCD OPTIONS_DEFINE= ALSA DBUS DEBUG GUESTADDITIONS MANUAL NLS PULSEAUDIO \ PYTHON QT5 R0LOGGING UDPTUNNEL VDE VNC WEBSERVICE VPX X11 OPTIONS_DEFAULT= DBUS QT5 UDPTUNNEL VNC WEBSERVICE X11 OPTIONS_SUB= yes DEBUG_DESC= Debug symbols, additional logs and assertions GUESTADDITIONS_DESC= Build with Guest Additions MANUAL_DESC= Build with user manual NLS_DESC= Native language support (requires QT5) QT5_DESC= Build with QT5 frontend (requires X11) R0LOGGING_DESC= Enable R0 logging (requires DEBUG) UDPTUNNEL_DESC= Build with UDP tunnel support VDE_DESC= Build with VDE support VNC_DESC= Build with VNC support VPX_DESC= Use libvpx for video recording WEBSERVICE_DESC= Build Webservice ALSA_CONFIGURE_OFF= --disable-alsa ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib DBUS_CONFIGURE_OFF= --disable-dbus DBUS_LIB_DEPENDS= libdbus-1.so:devel/dbus DEBUG_CONFIGURE_ON= --build-debug MANUAL_BUILD_DEPENDS= ${LOCALBASE}/share/xml/docbook/4.4/docbookx.dtd:textproc/docbook-xml MANUAL_CONFIGURE_OFF= --disable-docs NLS_IMPLIES= QT5 PULSEAUDIO_CONFIGURE_OFF= --disable-pulse PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio PYTHON_CONFIGURE_OFF= --disable-python QT5_IMPLIES= X11 R0LOGGING_IMPLIES= DEBUG UDPTUNNEL_CONFIGURE_OFF= --disable-udptunnel VDE_CONFIGURE_ON= --enable-vde VDE_RUN_DEPENDS= vde_switch:net/vde2 VNC_CONFIGURE_ON= --enable-vnc VNC_LIB_DEPENDS= libvncserver.so:net/libvncserver VPX_CONFIGURE_OFF= --disable-libvpx VPX_LIB_DEPENDS= libvpx.so:multimedia/libvpx X11_CONFIGURE_OFF= --build-headless ENV= .export ENV PLIST_SUB= GUEST_VER=${PORTVERSION} \ PYTHON_VERU=${PYTHON_VER:S/./_/}${PYTHON_ABIVER} \ VBOXGROUP=${VBOXGROUP} SUB_LIST= VBOXDIR=${VBOX_DIR} \ VBOXGROUP=${VBOXGROUP} \ VBOXUSER=${VBOXUSER} \ VBOXWSUSER=${VBOXWSUSER} USE_RC_SUBR= vboxheadless vboxwatchdog .include .if ${SLAVE_PORT} == no CONFLICTS_INSTALL+= virtualbox-ose-nox11-[0-9]* OPTIONS_DEFAULT+= PYTHON .else CONFLICTS_INSTALL+= virtualbox-ose-[0-9]* .endif .if ${ARCH} == "amd64" _ELF32!= kldstat -q -m elf32 && echo yes || echo no .endif .if ${PORT_OPTIONS:MDEBUG} KMK_BUILDTYPE= debug KMK_FLAGS+= BUILD_TYPE=debug .else KMK_BUILDTYPE= release .endif .if ${PORT_OPTIONS:MGUESTADDITIONS} GUESTADDITIONS= VBoxGuestAdditions_${PORTVERSION}.iso RESTRICTED= for personal use only RESTRICTED_FILES= ${GUESTADDITIONS} .endif .if ${PORT_OPTIONS:MMANUAL} DBKXMLDIR= ${LOCALBASE}/share/xml/docbook/4.4 DBKXSLDIR= ${LOCALBASE}/share/xsl/docbook USE_TEX= dvipsk:build formats:build .endif .if ${PORT_OPTIONS:MPYTHON} USES+= python:2.7 USE_PYTHON= distutils noegginfo noflavors PYDISTUTILS_PKGNAME= vboxapi PYDISTUTILS_PKGVERSION= 1.0 .else USES+= python:2.7,build .endif .if ${PORT_OPTIONS:MQT5} CONFIGURE_ARGS+= --enable-qt5 PLIST_SUB+= QT="" USES+= gl qmake:no_env qt:5 xorg USE_GL= gl glu USE_QT= buildtools_build core dbus gui linguisttools_build opengl USE_QT+= printsupport widgets x11extras USE_XORG= xcb INSTALLS_ICONS= yes VBOX_PROGS+= VirtualBox VBOX_UTILS+= VBoxTestOGL VBOX_WITH_QT= 1 .else CONFIGURE_ARGS+= --disable-qt PLIST_SUB+= QT="@comment " .endif .if ${PORT_OPTIONS:MWEBSERVICE} BUILD_DEPENDS+= soapcpp2:devel/gsoap USE_RC_SUBR+= vboxwebsrv VBOX_LINKS+= vboxwebsrv VBOX_UTILS+= vboxwebsrv webtest .endif .if ${PORT_OPTIONS:MX11} USES+= sdl USE_SDL= sdl USE_XORG+= xorgproto x11 xcursor xext xinerama xmu xt VBOX_PROGS+= VBoxSDL .endif .if ${PORT_OPTIONS:MPYTHON} || ${PORT_OPTIONS:MWEBSERVICE} PLIST_SUB+= SDK="" .else PLIST_SUB+= SDK="@comment " .endif .if ${ARCH} == i386 KMK_ARCH= freebsd.x86 PLIST_SUB+= I386="" .else KMK_ARCH= freebsd.${ARCH} PLIST_SUB+= I386="@comment " .endif PLIST_SUB+= ARCH="${KMK_ARCH}" KMK_BUILDDIR= ${WRKSRC}/out/${KMK_ARCH}/${KMK_BUILDTYPE} KMK_CONFIG= VBOX_LIBPATH_X11=${LOCALBASE} VBOX_FREEBSD_SRC=${SRC_BASE}/sys KMK_FLAGS+= -j${MAKE_JOBS_NUMBER} .include .if ${PYTHON_MAJOR_VER} >= 3 PLIST_SUB+= PYTHON_PYCDIR=/__pycache__/ \ PYTHON_PYCEXT=.cpython-${PYTHON_SUFFIX}.pyc .else PLIST_SUB+= PYTHON_PYCDIR=/ \ PYTHON_PYCEXT=.pyc .endif .if ${SSL_DEFAULT} != base CONFIGURE_ARGS+= --with-openssl-dir="${OPENSSLBASE}" .endif pre-everything:: .if ${ARCH} == "amd64" .if ${_ELF32} != yes @${ECHO_MSG} 'Requires 32-bit runtime support in kernel.' @${ECHO_MSG} 'Rebuild kernel with "options COMPAT_FREEBSD32" and reboot.' @${FALSE} .elif !exists(/usr/lib32/libc.so) @${ECHO_MSG} 'Requires 32-bit libraries installed under /usr/lib32.' @${ECHO_MSG} 'Do: cd /usr/src; make build32 install32; service ldconfig restart' @${FALSE} .endif .endif post-patch: @${ECHO_CMD} 'VBOX_PATH_APP_PRIVATE_ARCH = ${VBOX_DIR}' > \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_DOCBOOK = ${DBKXSLDIR}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_DOCBOOK_DTD = ${DBKXMLDIR}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_SHARED_LIBS = ${VBOX_DIR}' >> \ ${WRKSRC}/LocalConfig.kmk # Please keep this even if using Clang to avoid repeated regressions. # PR 245048 @${ECHO_CMD} "VBOX_WITH_RUNPATH = ${_GCC_RUNTIME:D${_GCC_RUNTIME}\:}${VBOX_DIR}" >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_APP_PRIVATE = ${DATADIR}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_APP_DOCS = ${DOCSDIR}' >> ${WRKSRC}/LocalConfig.kmk .if ${SSL_DEFAULT} != base @${ECHO_CMD} 'VBOX_WITH_ALT_HASH_CODE = 1' >> ${WRKSRC}/LocalConfig.kmk .endif @${ECHO_CMD} 'VBOX_WITH_EXTPACK_VBOXDTRACE =' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_INSTALLER = 1' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_VBOXDRV =' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_TESTCASES =' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'SDK_VBOX_LIBPNG_INCS = ${PREFIX}/include/libpng' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'SDK_VBOX_LIBPNG_LIBS = png' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_ADDITIONS =' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_DRAG_AND_DROP = ${VBOX_WITH_QT}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_DRAG_AND_DROP_GH = ${VBOX_WITH_QT}' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_VALIDATIONKIT =' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_WITH_X11_ADDITIONS =' >> ${WRKSRC}/LocalConfig.kmk .if ${PORT_OPTIONS:MR0LOGGING} @${ECHO_CMD} 'VBOX_WITH_R0_LOGGING = 1' >> ${WRKSRC}/LocalConfig.kmk .endif .if ${PORT_OPTIONS:MWEBSERVICE} @${ECHO_CMD} 'VBOX_WITH_WEBSERVICES = 1' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_GSOAP_INSTALLED = 1' >> ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_GSOAP = ${PREFIX}/lib/gsoap' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_GSOAP_BIN = ${PREFIX}/bin' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_PATH_GSOAP_IMPORT = ${PREFIX}/share/gsoap/import' >> \ ${WRKSRC}/LocalConfig.kmk @${ECHO_CMD} 'VBOX_GCC_PEDANTIC_CXX = -Wshadow $$(VBOX_GCC_WARN) -Wno-long-long' >> \ ${WRKSRC}/LocalConfig.kmk .endif @${REINPLACE_CMD} -e 's| -finline-limit=8000||' \ -e 's| -mpreferred-stack-boundary=2||' ${WRKSRC}/Config.kmk @${REINPLACE_CMD} -e 's| -fpermissive||' ${WRKSRC}/Config.kmk \ ${WRKSRC}/src/VBox/Main/webservice/Makefile.kmk @${ECHO_CMD} 'TOOL_VBoxGccFreeBSD_LD = ${CXX}' >> ${WRKSRC}/LocalConfig.kmk @${SED} -e 's|GXX3|VBoxGccFreeBSD|g' \ ${LOCALBASE}/share/kBuild/tools/GXX3.kmk > \ ${WRKSRC}/tools/kBuildTools/VBoxGccFreeBSD.kmk @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/Config.kmk ${WRKSRC}/configure \ ${WRKSRC}/kBuild/header.kmk ${WRKSRC}/kBuild/units/qt4.kmk \ ${WRKSRC}/kBuild/units/qt5.kmk ${WRKSRC}/kBuild/sdks/LIBSDL.kmk \ ${WRKSRC}/src/libs/xpcom18a4/python/gen_python_deps.py @${REINPLACE_CMD} \ -e 's|\$$KBUILDDIR_BIN/kmk_sed|${LOCALBASE}/bin/kmk_sed|g' \ -e 's|SUPPYTHONLIBS=.*|SUPPYTHONLIBS="${PYTHON_VERSION}${PYTHON_ABIVER}"|' \ ${WRKSRC}/configure .if empty(ICONV_LIB) @${REINPLACE_CMD} -e 's|iconv||' ${WRKSRC}/Config.kmk \ ${WRKSRC}/src/VBox/Runtime/Makefile.kmk @${ECHO_CMD} 'VBOX_ICONV_DEFS = LIBICONV_PLUG' >> ${WRKSRC}/LocalConfig.kmk .endif @${REINPLACE_CMD} -e 's|/usr/local/lib/virtualbox|${VBOX_DIR}|' \ -e 's|/usr/local|${PREFIX}|' \ ${WRKSRC}/src/VBox/Installer/freebsd/VBox.sh @${REINPLACE_CMD} \ -e 's|^versions =.*|versions = ["${PYTHON_VER}${PYTHON_ABIVER}"]|' \ ${WRKSRC}/src/libs/xpcom18a4/python/gen_python_deps.py do-build: cd ${WRKSRC} && ${SH} -c '. ${WRKSRC}/env.sh && \ ${KMK_CONFIG} ${LOCALBASE}/bin/kmk ${KMK_FLAGS}' .if ${PORT_OPTIONS:MPYTHON} ${PYTHON_CMD} -mcompileall \ ${KMK_BUILDDIR}/bin/sdk/bindings/xpcom/python/xpcom .endif do-install: .if ${PORT_OPTIONS:MPYTHON} || ${PORT_OPTIONS:MWEBSERVICE} ${MKDIR} ${STAGEDIR}${DATADIR}/sdk .endif cd ${KMK_BUILDDIR}/bin/sdk/bindings/xpcom && \ ${COPYTREE_SHARE} "idl samples" ${STAGEDIR}${DATADIR} ${MKDIR} ${STAGEDIR}${PREFIX}/include/virtualbox cd ${KMK_BUILDDIR}/bin/sdk/bindings/xpcom/include && \ ${COPYTREE_SHARE} "*" ${STAGEDIR}${PREFIX}/include/virtualbox ${MKDIR} ${STAGEDIR}${VBOX_DIR} cd ${KMK_BUILDDIR}/bin && ${COPYTREE_SHARE} \ "*.fd *.r0 *.rc *.so components" ${STAGEDIR}${VBOX_DIR} .if ${PORT_OPTIONS:MPYTHON} || ${PORT_OPTIONS:MWEBSERVICE} ${RLN} ${STAGEDIR}${DATADIR}/sdk ${STAGEDIR}${VBOX_DIR} .endif ${INSTALL_SCRIPT} ${WRKSRC}/src/VBox/Installer/freebsd/VBox.sh \ ${STAGEDIR}${VBOX_DIR} .for f in ${VBOX_PROGS} ${VBOX_UTILS} ${INSTALL_PROGRAM} ${KMK_BUILDDIR}/bin/${f} ${STAGEDIR}${VBOX_DIR} .endfor .for f in ${VBOX_PROGS} ${VBOX_LINKS} ${LN} -fs ../${VBOX_DIR_REL}/VBox.sh ${STAGEDIR}${PREFIX}/bin/${f} .endfor .for f in ${VBOX_PROGS} ${LN} -fs ../${VBOX_DIR_REL}/VBox.sh ${STAGEDIR}${PREFIX}/bin/${f:tl} .endfor .if ${PORT_OPTIONS:MGUESTADDITIONS} ${MKDIR} ${STAGEDIR}${VBOX_DIR}/additions ${INSTALL_DATA} ${DISTDIR}/${GUESTADDITIONS} \ ${STAGEDIR}${VBOX_DIR}/additions/ ${RLN} ${STAGEDIR}${VBOX_DIR}/additions/${GUESTADDITIONS} \ ${STAGEDIR}${VBOX_DIR}/additions/VBoxGuestAdditions.iso .endif .if ${PORT_OPTIONS:MMANUAL} ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${KMK_BUILDDIR}/bin/UserManual*.pdf \ ${STAGEDIR}${DOCSDIR} .endif .if ${PORT_OPTIONS:MNLS} cd ${KMK_BUILDDIR}/obj/VirtualBox/qtnls && \ ${COPYTREE_SHARE} "*.qm" ${STAGEDIR}${DATADIR}/nls .endif .if ${PORT_OPTIONS:MPYTHON} cd ${KMK_BUILDDIR}/bin/sdk/installer && \ ${SETENV} VBOX_INSTALL_PATH="${VBOX_DIR}" \ ${PYTHON_CMD} vboxapisetup.py install --root=${STAGEDIR} @${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}/xpcom cd ${KMK_BUILDDIR}/bin/sdk/bindings/xpcom/python/xpcom && \ ${COPYTREE_SHARE} "*" ${STAGEDIR}${PYTHON_SITELIBDIR}/xpcom @${MKDIR} ${STAGEDIR}${DATADIR}/sdk/bindings/xpcom/python ${RLN} ${STAGEDIR}${PYTHON_SITELIBDIR}/xpcom \ ${STAGEDIR}${DATADIR}/sdk/bindings/xpcom/python .endif .if ${PORT_OPTIONS:MQT5} ${INSTALL_DATA} \ ${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 \ ${STAGEDIR}${PREFIX}/share/applications/virtualbox.desktop .endif .if ${PORT_OPTIONS:MVNC} ${MKDIR} ${STAGEDIR}${VBOX_DIR}/ExtensionPacks/VNC/${KMK_ARCH} ${INSTALL_DATA} ${KMK_BUILDDIR}/bin/ExtensionPacks/VNC/ExtPack* \ ${STAGEDIR}${VBOX_DIR}/ExtensionPacks/VNC/ ${INSTALL_LIB} ${KMK_BUILDDIR}/bin/ExtensionPacks/VNC/${KMK_ARCH}/* \ ${STAGEDIR}${VBOX_DIR}/ExtensionPacks/VNC/${KMK_ARCH}/ .endif .if ${PORT_OPTIONS:MWEBSERVICE} ${MKDIR} ${STAGEDIR}${DATADIR}/sdk/bindings/webservice ${INSTALL_DATA} ${KMK_BUILDDIR}/obj/webservice/vboxweb.wsdl \ ${STAGEDIR}${DATADIR}/sdk/bindings/webservice/ .endif .include Index: branches/2020Q2/emulators/virtualbox-ose/files/patch-Config.kmk =================================================================== --- branches/2020Q2/emulators/virtualbox-ose/files/patch-Config.kmk (revision 531689) +++ branches/2020Q2/emulators/virtualbox-ose/files/patch-Config.kmk (revision 531690) @@ -1,204 +1,215 @@ --- Config.kmk.orig 2019-10-10 18:06:26 UTC +++ Config.kmk @@ -445,11 +445,11 @@ ifn1of ($(KBUILD_TARGET), win darwin) # Enable OSS audio support. VBOX_WITH_AUDIO_OSS = 1 endif -if1of ($(KBUILD_TARGET), linux) +if1of ($(KBUILD_TARGET), freebsd linux) # Enable ALSA audio support. VBOX_WITH_AUDIO_ALSA = 1 endif -if1of ($(KBUILD_TARGET), linux) +if1of ($(KBUILD_TARGET), freebsd linux) # Enable PulseAudio audio support. VBOX_WITH_AUDIO_PULSE = 1 endif @@ -464,11 +464,11 @@ VBOX_WITH_AUDIO_MMNOTIFICATION_CLIENT = 1 # Enable PCI passthrough support. VBOX_WITH_PCI_PASSTHROUGH = 1 # Enable statically linked dbus support. -if1of ($(KBUILD_TARGET), linux solaris) +if1of ($(KBUILD_TARGET), freebsd linux solaris) VBOX_WITH_DBUS = 1 endif # Enable building PAM modules. -if1of ($(KBUILD_TARGET), linux solaris) +if1of ($(KBUILD_TARGET), freebsd linux solaris) VBOX_WITH_PAM = 1 endif # Enable internal networking. @@ -664,7 +664,7 @@ VBOX_WITH_TESTCASES = 1 VBOX_WITH_VDITOOL = # Enable this to build vbox-img even if VBOX_WITH_TESTCASES is disabled VBOX_WITH_VBOX_IMG = -if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), darwin.x86 darwin.amd64 linux.x86 linux.amd64 solaris.amd64 win.x86 win.amd64) +if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), darwin.x86 darwin.amd64 freebsd.x86 freebsd.amd64 linux.x86 linux.amd64 solaris.amd64 win.x86 win.amd64) # Enables the video capturing support. VBOX_WITH_VIDEOREC = 1 # Enable VPX (VP8 / VP9 codec), used for video capturing. @@ -992,10 +992,6 @@ ifeq ($(KBUILD_TARGET),darwin) VBOX_WITH_VBOXSDL= endif -ifeq ($(KBUILD_TARGET),freebsd) - VBOX_WITH_DOCS= -endif - ifeq ($(KBUILD_TARGET),haiku) # Don't bother with SDL ttf for now. VBOX_WITH_SECURELABEL= @@ -1155,7 +1151,7 @@ ifdef VBOX_OSE VBOX_WITH_KCHMVIEWER= 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= endif @@ -1176,14 +1172,14 @@ ifdef VBOX_OSE ifn1of ($(KBUILD_TARGET), darwin linux solaris win) VBOX_WITH_INSTALLER= endif - if1of ($(KBUILD_TARGET), win) + # if1of ($(KBUILD_TARGET), win) # Undefine codec libraries which are not needed. VBOX_WITH_LIBVPX= VBOX_WITH_LIBOPUS= # Disable video recording (with audio support). VBOX_WITH_VIDEOREC= VBOX_WITH_AUDIO_VIDEOREC= - endif + # endif # branding VBOX_BRAND_LICENSE_HTML := $(PATH_ROOT)/doc/License-gpl-2.0.html VBOX_BRAND_LICENSE_RTF := $(PATH_ROOT)/doc/License-gpl-2.0.rtf +@@ -2538,6 +2534,10 @@ ifeq ($(KBUILD_HOST),win) ## @todo can drop this now, + # This isn't important (yet) on windows, so cook the result until + # cygwin is feeling better. + VBOX_GCC_VERSION := $(int-add $(int-mul 10000, 3), $(int-mul 100, 3), 3) ++else ifeq($(KBUILD_HOST,freebsd)) ++ # At a minimum, we'll be building with GCC 4.2 on FreeBSD. LLVM will always ++ # pose as GCC 4.2 anyways, so this seems safe. ++ VBOX_GCC_VERSION := $(int-add $(int-mul 10000, 4), $(int-mul 100, 2), 0) + else + # This is kind of bad, the returned string needs to be re-evaluated before use. + # The reason for this hack is that the windows kmk_ash cannot deal with $((1+1)). @@ -4158,6 +4154,7 @@ ifdef VBOX_WITH_RAW_MODE TEMPLATE_VBoxRc_TOOL = $(VBOX_GCC32_TOOL) TEMPLATE_VBoxRc_CXXFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_fvisibility-inlines-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK) TEMPLATE_VBoxRc_CFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC32_Wno-variadic-macros) -fno-exceptions $(VBOX_GCC_GC_OPT) $(VBOX_GCC_GC_FP) -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-strict-aliasing $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_fvisibility-hidden) $(VBOX_GCC_IPRT_FMT_CHECK) + TEMPLATE_VBoxRc_CXXFLAGS.freebsd = -fno-builtin ifeq ($(KBUILD_TARGET),solaris) TEMPLATE_VBoxRc_LDFLAGS = -r else @@ -4299,6 +4296,7 @@ ifeq ($(VBOX_LDR_FMT),elf) TEMPLATE_VBoxR0_TOOL = $(VBOX_GCC_TOOL) TEMPLATE_VBoxR0_CFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_C) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-hidden) -std=gnu99 $(VBOX_GCC_IPRT_FMT_CHECK) TEMPLATE_VBoxR0_CXXFLAGS = -fno-pie -nostdinc -g $(VBOX_GCC_pipe) $(VBOX_GCC_WERR) $(VBOX_GCC_PEDANTIC_CXX) $(VBOX_GCC_Wno-variadic-macros) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-exceptions $(VBOX_GCC_fno-stack-protector) -fno-common $(VBOX_GCC_fvisibility-inlines-hidden) $(VBOX_GCC_fvisibility-hidden) -fno-rtti $(VBOX_GCC_IPRT_FMT_CHECK) +TEMPLATE_VBoxR0_CXXFLAGS.freebsd = -fno-builtin TEMPLATE_VBoxR0_CFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables -ffreestanding TEMPLATE_VBoxR0_CXXFLAGS.amd64 = -m64 -mno-red-zone -mcmodel=kernel -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -fno-asynchronous-unwind-tables ifeq ($(KBUILD_TARGET),solaris) @@ -4623,7 +4621,7 @@ TEMPLATE_VBOXR0DRV_CFLAGS = \ -O2 -ffreestanding -fno-strict-aliasing -fno-common -finline-limit=8000 \ $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) \ -nostdinc -std=c99 -TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mno-align-long-strings -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 +TEMPLATE_VBOXR0DRV_CFLAGS.x86 = -m32 -mpreferred-stack-boundary=2 -mno-mmx -mno-3dnow -mno-sse -mno-sse2 TEMPLATE_VBOXR0DRV_CFLAGS.amd64 = -m64 --param inline-unit-growth=100 --param large-function-growth=1000 \ -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 -Wundef @@ -4656,7 +4654,7 @@ define TOOL_FREEBSDKMODLD_LINK_SYSMOD_CMDS | xargs -J% objcopy % $(out) ## Strip debug info (comment out if debugging or something). - objcopy --strip-debug $(out) +# objcopy --strip-debug $(out) endef else # x86 TOOL_FREEBSDKMODLD_LINK_SYSMOD_OUTPUT = $(outbase).kld @@ -4670,7 +4668,7 @@ define TOOL_FREEBSDKMODLD_LINK_SYSMOD_CMDS | xargs -J% objcopy % $(outbase).kld # Link the final .ko (a shared object). - ld $(flags) -Bshareable -o $(out) $(outbase).kld + ld $(flags) -Bshareable -znotext -o $(out) $(outbase).kld endef endif # x86 @@ -4956,10 +4954,18 @@ TEMPLATE_VBOXR3EXE_LIBPATH += \ 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 @@ -5250,7 +5256,7 @@ ifeq ($(KBUILD_TARGET),win) # No CRT! TEMPLATE_VBOXR3HARDENEDEXE_LDFLAGS.win.amd64 = $(TEMPLATE_VBOXR3EXE_LDFLAGS.win.amd64) /entry:suplibHardenedWindowsMain TEMPLATE_VBOXR3HARDENEDEXE_LIBS.x86 = $(NOT_SUCH_VARIABLE) TEMPLATE_VBOXR3HARDENEDEXE_LIBS.amd64 = $(NOT_SUCH_VARIABLE) -else ifn1of ($(KBUILD_TARGET), os2 solaris) +else ifn1of ($(KBUILD_TARGET), freebsd 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_VBOXR3HARDENEDEXE_LDFLAGS.linux = $(filter-out $(VBOX_GCC_ORIGIN_OPT),$(TEMPLATE_VBOXR3EXE_LDFLAGS.linux)) @@ -5777,10 +5783,18 @@ TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTI else ifeq ($(KBUILD_TARGET),haiku) 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.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 @@ -6319,13 +6333,10 @@ ifdef VBOX_WITH_QTGUI TEMPLATE_VBOXQTGUIEXE_LIBPATH += \ $(VBOX_LIBPATH_X11) ifeq ($(KBUILD_TARGET),freebsd) + 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) @@ -6548,12 +6559,8 @@ TEMPLATE_VBoxBldProg_LIBPATH += \ TEMPLATE_VBoxBldProg_TOOL = GXX3 TEMPLATE_VBoxBldProg_LIBS = pthread TEMPLATE_VBoxBldProg_INCS += \ - /usr/include \ - /usr/X11R6/include \ /usr/local/include TEMPLATE_VBoxBldProg_LIBPATH += \ - /usr/lib \ - /usr/X11R6/lib \ /usr/local/lib else ifeq ($(KBUILD_HOST),netbsd) TEMPLATE_VBoxBldProg_TOOL = GXX3 @@ -6954,6 +6961,7 @@ TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.darwin += \ -current_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) \ -compatibility_version $(VBOX_VERSION_MAJOR).$(VBOX_VERSION_MINOR).$(VBOX_VERSION_BUILD) TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.linux = -Wl,--no-as-needed +TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.freebsd = -Wl,--no-as-needed TEMPLATE_VBOXCROGLR3HOSTDLL_BLDDIRS = $(VBOX_PATH_CROGL_GENFILES)/ ifeq ($(KBUILD_TARGET),darwin) TEMPLATE_VBOXCROGLR3HOSTDLL_CFLAGS = $(TEMPLATE_VBOXR3NP_CFLAGS) -Wno-deprecated-declarations Index: branches/2020Q2/emulators/virtualbox-ose/files/patch-src_libs_xpcom18a4_xpcom_reflect_xptcall_src_md_unix_xptcinvoke__x86__64__linux.cpp =================================================================== --- branches/2020Q2/emulators/virtualbox-ose/files/patch-src_libs_xpcom18a4_xpcom_reflect_xptcall_src_md_unix_xptcinvoke__x86__64__linux.cpp (nonexistent) +++ branches/2020Q2/emulators/virtualbox-ose/files/patch-src_libs_xpcom18a4_xpcom_reflect_xptcall_src_md_unix_xptcinvoke__x86__64__linux.cpp (revision 531690) @@ -0,0 +1,38 @@ +--- src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_linux.cpp.orig 2019-10-10 18:15:53 UTC ++++ src/libs/xpcom18a4/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_x86_64_linux.cpp +@@ -143,11 +143,22 @@ XPTC_InvokeByIndex(nsISupports * that, PRUint32 method + if (nr_stack) + nr_stack = (nr_stack + 1) & ~1; + ++#if !defined(VBOX_WITH_GCC_SANITIZER) && !defined(__clang__) + // Load parameters to stack, if necessary + PRUint64 *stack = (PRUint64 *) __builtin_alloca(nr_stack * 8); ++#else ++ typedef struct { PRUint64 stack[20]; } methodStack; ++ if (nr_stack > 20) ++ return NS_ERROR_CALL_FAILED; ++ methodStack stack; ++#endif + PRUint64 gpregs[GPR_COUNT]; + double fpregs[FPR_COUNT]; ++#if !defined(VBOX_WITH_GCC_SANITIZER) && !defined(__clang__) + invoke_copy_to_stack(stack, paramCount, params, gpregs, fpregs); ++#else ++ invoke_copy_to_stack(stack.stack, paramCount, params, gpregs, fpregs); ++#endif + + // Load FPR registers from fpregs[] + register double d0 asm("xmm0"); +@@ -205,7 +216,12 @@ XPTC_InvokeByIndex(nsISupports * that, PRUint32 method + methodAddress += 8 * methodIndex; + methodAddress = *((PRUint64 *)methodAddress); + ++#if !defined(VBOX_WITH_GCC_SANITIZER) && !defined(__clang__) + typedef PRUint32 (*Method)(PRUint64, PRUint64, PRUint64, PRUint64, PRUint64, PRUint64); + PRUint32 result = ((Method)methodAddress)(a0, a1, a2, a3, a4, a5); ++#else ++ typedef PRUint32 (*Method)(PRUint64, PRUint64, PRUint64, PRUint64, PRUint64, PRUint64, methodStack); ++ PRUint32 result = ((Method)methodAddress)(a0, a1, a2, a3, a4, a5, stack); ++#endif + return result; + } Property changes on: branches/2020Q2/emulators/virtualbox-ose/files/patch-src_libs_xpcom18a4_xpcom_reflect_xptcall_src_md_unix_xptcinvoke__x86__64__linux.cpp ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: branches/2020Q2 =================================================================== --- branches/2020Q2 (revision 531689) +++ branches/2020Q2 (revision 531690) Property changes on: branches/2020Q2 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r531689