Page MenuHomeFreeBSD

emulators/virtualbox-ose: use contemporary GCC instead of old llvm
ClosedPublic

Authored by kevans on Mar 5 2020, 4:27 AM.

Details

Summary
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)
MFH: 2020Q1 (blanket: build fix)

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

kevans created this revision.Mar 5 2020, 4:27 AM
kevans edited the summary of this revision. (Show Details)Mar 5 2020, 4:28 AM
rlibby added a subscriber: rlibby.Mar 5 2020, 5:10 AM

USE_GCC= any is not sufficient, as GCC8 doesn't support the feature used by atomic.h.

Gcc 8 should... The docs for gcc 6 introduce the feature, and I specifically tried a test case with gcc 7, although I didn't actually try a kernel build.

https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/Extended-Asm.html#Extended-Asm

kevans edited the summary of this revision. (Show Details)Mar 5 2020, 2:02 PM

USE_GCC= any is not sufficient, as GCC8 doesn't support the feature used by atomic.h.

Gcc 8 should... The docs for gcc 6 introduce the feature, and I specifically tried a test case with gcc 7, although I didn't actually try a kernel build.

https://gcc.gnu.org/onlinedocs/gcc-6.1.0/gcc/Extended-Asm.html#Extended-Asm

Yeah, my testing here seems to have been somehow flawed... I replaced '9' with 'any' and it was still using GCC9, so there's no way I actually tested 8.

emulators/virtualbox-ose/Makefile
39 ↗(On Diff #69200)

This should read "any" instead of "9".

I tested the patch, and am using virtualbox compiled with this patch and everything works fine.

kevans updated this revision to Diff 69392.Mar 11 2020, 1:18 PM

s/9/any/

bapt accepted this revision.Mar 11 2020, 1:22 PM
This revision is now accepted and ready to land.Mar 11 2020, 1:22 PM
kevans edited the summary of this revision. (Show Details)Mar 11 2020, 1:26 PM
koobs accepted this revision.Mar 11 2020, 9:59 PM
koobs edited the summary of this revision. (Show Details)