From owner-svn-ports-branches@freebsd.org Thu Mar 12 00:44:46 2020 Return-Path: Delivered-To: svn-ports-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E8C5326F9BE; Thu, 12 Mar 2020 00:44:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48d98G4lCKz4PFl; Thu, 12 Mar 2020 00:44:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 17B1C1D15C; Thu, 12 Mar 2020 00:44:46 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 02C0ij18052401; Thu, 12 Mar 2020 00:44:45 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 02C0ijCn052397; Thu, 12 Mar 2020 00:44:45 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <202003120044.02C0ijCn052397@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 12 Mar 2020 00:44:45 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r528259 - in branches/2020Q1/emulators/virtualbox-ose: . files X-SVN-Group: ports-branches X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in branches/2020Q1/emulators/virtualbox-ose: . files X-SVN-Commit-Revision: 528259 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2020 00:44:47 -0000 Author: kevans Date: Thu Mar 12 00:44:44 2020 New Revision: 528259 URL: https://svnweb.freebsd.org/changeset/ports/528259 Log: MFH: r528258 emulators/virtualbox-ose: use contemporary GCC instead of old llvm The bug in PR 236616 resulted in virtualbox getting pinned to llvm7. This is less than ideal, and in-fact has been broken by improvements to machine/atomic.h on x86 that require a more modern compiler. Switch the build to USE_GCC= any. The patches that were previously applied if COMPILER_TYPE == clang are actually needed by newer GCCs as well, so make those standard patches instead, folding the Config.kmk patches together. We should put some effort into testing llvm10 and working out why llvm breaks it, but fixing the build is more important at the moment. Q/A: * portlint (pre-existing issues; none in current patch) * testport (-CURRENT, amd64) * run testing by madpilot@ PR: 244603 Approved by: koobs (mentor), bapt (mentor) Approved by: portmgr (blanket: build fix) Differential Revision: https://reviews.freebsd.org/D23967 Approved by: ports-secteam (blanket: build fix) Added: branches/2020Q1/emulators/virtualbox-ose/files/patch-src-VBox-Devices-PC-ipxe-Makefile.kmk - copied unchanged from r528258, head/emulators/virtualbox-ose/files/patch-src-VBox-Devices-PC-ipxe-Makefile.kmk branches/2020Q1/emulators/virtualbox-ose/files/patch-src-recompiler-Makefile.kmk - copied unchanged from r528258, head/emulators/virtualbox-ose/files/patch-src-recompiler-Makefile.kmk Deleted: branches/2020Q1/emulators/virtualbox-ose/files/extrapatch-Config.kmk branches/2020Q1/emulators/virtualbox-ose/files/extrapatch-src-VBox-Devices-PC-ipxe-Makefile.kmk branches/2020Q1/emulators/virtualbox-ose/files/extrapatch-src-recompiler-Makefile.kmk Modified: branches/2020Q1/emulators/virtualbox-ose/Makefile branches/2020Q1/emulators/virtualbox-ose/files/patch-Config.kmk Directory Properties: branches/2020Q1/ (props changed) Modified: branches/2020Q1/emulators/virtualbox-ose/Makefile ============================================================================== --- branches/2020Q1/emulators/virtualbox-ose/Makefile Thu Mar 12 00:41:32 2020 (r528258) +++ branches/2020Q1/emulators/virtualbox-ose/Makefile Thu Mar 12 00:44:44 2020 (r528259) @@ -14,6 +14,7 @@ COMMENT= General-purpose full virtualizer for x86 hard 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 \ @@ -28,8 +29,13 @@ CPE_PRODUCT= vm_virtualbox WRKSRC= ${WRKDIR}/VirtualBox-${PORTVERSION} ONLY_FOR_ARCHS= i386 amd64 -USES= compiler:c++14-lang cpe gnome iconv pkgconfig ssl tar:bzip2 +USES= 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 @@ -200,20 +206,6 @@ KMK_FLAGS+= -j${MAKE_JOBS_NUMBER} .include -.if ${COMPILER_TYPE} == clang -.if ${COMPILER_VERSION} >= 80 -# XXX PR236616: Clang 8 & 9 caused runtime problems. -BUILD_DEPENDS+= ${LOCALBASE}/bin/clang${VBOX_LLVM_VER}:devel/llvm${VBOX_LLVM_VER} -CC= ${LOCALBASE}/bin/clang${VBOX_LLVM_VER} -CXX= ${LOCALBASE}/bin/clang++${VBOX_LLVM_VER} -VBOX_LLVM_VER?= 70 -.endif -PATCH_DEPENDS+= ${LOCALBASE}/share/kBuild/tools/GXX3.kmk:devel/kBuild -EXTRA_PATCHES+= ${PATCHDIR}/extrapatch-Config.kmk \ - ${PATCHDIR}/extrapatch-src-VBox-Devices-PC-ipxe-Makefile.kmk \ - ${PATCHDIR}/extrapatch-src-recompiler-Makefile.kmk -.endif - .if ${PYTHON_MAJOR_VER} >= 3 PLIST_SUB+= PYTHON_PYCDIR=/__pycache__/ \ PYTHON_PYCEXT=.cpython-${PYTHON_SUFFIX}.pyc @@ -285,7 +277,6 @@ post-patch: @${ECHO_CMD} 'VBOX_GCC_PEDANTIC_CXX = -Wshadow $$(VBOX_GCC_WARN) -Wno-long-long' >> \ ${WRKSRC}/LocalConfig.kmk .endif -.if ${COMPILER_TYPE} == clang @${REINPLACE_CMD} -e 's| -finline-limit=8000||' \ -e 's| -mpreferred-stack-boundary=2||' ${WRKSRC}/Config.kmk @${REINPLACE_CMD} -e 's| -fpermissive||' ${WRKSRC}/Config.kmk \ @@ -294,7 +285,6 @@ post-patch: @${SED} -e 's|GXX3|VBoxGccFreeBSD|g' \ ${LOCALBASE}/share/kBuild/tools/GXX3.kmk > \ ${WRKSRC}/tools/kBuildTools/VBoxGccFreeBSD.kmk -.endif @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ ${WRKSRC}/Config.kmk ${WRKSRC}/configure \ ${WRKSRC}/kBuild/header.kmk ${WRKSRC}/kBuild/units/qt4.kmk \ Modified: branches/2020Q1/emulators/virtualbox-ose/files/patch-Config.kmk ============================================================================== --- branches/2020Q1/emulators/virtualbox-ose/files/patch-Config.kmk Thu Mar 12 00:41:32 2020 (r528258) +++ branches/2020Q1/emulators/virtualbox-ose/files/patch-Config.kmk Thu Mar 12 00:44:44 2020 (r528259) @@ -1,4 +1,4 @@ ---- Config.kmk.orig 2019-05-13 13:12:00 UTC +--- 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. @@ -74,7 +74,23 @@ # 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 -@@ -4575,7 +4571,7 @@ TEMPLATE_VBOXR0DRV_CFLAGS = \ +@@ -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 @@ -83,7 +99,16 @@ 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 -@@ -4622,7 +4618,7 @@ define TOOL_FREEBSDKMODLD_LINK_SYSMOD_CMDS +@@ -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). @@ -92,7 +117,7 @@ endef endif # x86 -@@ -4908,10 +4904,18 @@ TEMPLATE_VBOXR3EXE_LIBPATH += \ +@@ -4956,10 +4954,18 @@ TEMPLATE_VBOXR3EXE_LIBPATH += \ TEMPLATE_VBOXR3EXE_CFLAGS += -fno-pic TEMPLATE_VBOXR3EXE_CXXFLAGS += -fno-pic TEMPLATE_VBOXR3EXE_LDFLAGS += -fno-pic @@ -112,7 +137,7 @@ /usr/include \ /usr/X11R6/include \ /usr/local/include -@@ -5202,7 +5206,7 @@ ifeq ($(KBUILD_TARGET),win) # No CRT! +@@ -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) @@ -121,7 +146,7 @@ # 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)) -@@ -5729,10 +5733,18 @@ TEMPLATE_VBOXMAINEXE_LIBS = $(LIB_RUNTI +@@ -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++ @@ -141,7 +166,7 @@ /usr/include \ /usr/X11R6/include \ /usr/local/include -@@ -6271,13 +6283,10 @@ ifdef VBOX_WITH_QTGUI +@@ -6319,13 +6333,10 @@ ifdef VBOX_WITH_QTGUI TEMPLATE_VBOXQTGUIEXE_LIBPATH += \ $(VBOX_LIBPATH_X11) ifeq ($(KBUILD_TARGET),freebsd) @@ -156,7 +181,7 @@ /usr/local/lib endif ifeq ($(KBUILD_TARGET),solaris) -@@ -6500,12 +6509,8 @@ TEMPLATE_VBoxBldProg_LIBPATH += \ +@@ -6548,12 +6559,8 @@ TEMPLATE_VBoxBldProg_LIBPATH += \ TEMPLATE_VBoxBldProg_TOOL = GXX3 TEMPLATE_VBoxBldProg_LIBS = pthread TEMPLATE_VBoxBldProg_INCS += \ @@ -169,7 +194,7 @@ /usr/local/lib else ifeq ($(KBUILD_HOST),netbsd) TEMPLATE_VBoxBldProg_TOOL = GXX3 -@@ -6906,6 +6911,7 @@ TEMPLATE_VBOXCROGLR3HOSTDLL_LDFLAGS.darwin += \ +@@ -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 Copied: branches/2020Q1/emulators/virtualbox-ose/files/patch-src-VBox-Devices-PC-ipxe-Makefile.kmk (from r528258, head/emulators/virtualbox-ose/files/patch-src-VBox-Devices-PC-ipxe-Makefile.kmk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2020Q1/emulators/virtualbox-ose/files/patch-src-VBox-Devices-PC-ipxe-Makefile.kmk Thu Mar 12 00:44:44 2020 (r528259, copy of r528258, head/emulators/virtualbox-ose/files/patch-src-VBox-Devices-PC-ipxe-Makefile.kmk) @@ -0,0 +1,11 @@ +--- src/VBox/Devices/PC/ipxe/Makefile.kmk.orig 2013-11-29 14:23:32.000000000 -0500 ++++ src/VBox/Devices/PC/ipxe/Makefile.kmk 2013-12-13 15:06:45.000000000 -0500 +@@ -35,7 +35,7 @@ + iPxeBiosBin_CLEAN = \ + $(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.c \ + +-if1of ($(KBUILD_TARGET), darwin os2 solaris win) ++if1of ($(KBUILD_TARGET), darwin freebsd os2 solaris win) + $$(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 $< $@ Copied: branches/2020Q1/emulators/virtualbox-ose/files/patch-src-recompiler-Makefile.kmk (from r528258, head/emulators/virtualbox-ose/files/patch-src-recompiler-Makefile.kmk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2020Q1/emulators/virtualbox-ose/files/patch-src-recompiler-Makefile.kmk Thu Mar 12 00:44:44 2020 (r528259, copy of r528258, head/emulators/virtualbox-ose/files/patch-src-recompiler-Makefile.kmk) @@ -0,0 +1,10 @@ +--- src/recompiler/Makefile.kmk.orig 2013-11-29 14:25:09.000000000 -0500 ++++ src/recompiler/Makefile.kmk 2013-12-13 14:23:11.000000000 -0500 +@@ -41,6 +41,7 @@ + # + ifneq ($(KBUILD_TARGET),win) + VBoxRemPrimary_TEMPLATE = VBOXR3NP ++ VBoxRemPrimary_TOOL.freebsd = VBoxGccFreeBSD + # workaround the regparm bug in gcc <= 3.3 + VBoxRemPrimary_DEFS = $(if $(VBOX_GCC_BUGGY_REGPARM),GCC_WITH_BUGGY_REGPARM,) + else