Created attachment 178042 [details] GCC option For very simple uses, GCC isn't required for kBuild. Under most circumstances it is, but when you only need virtualbox-ose-additions without X11 and you're on amd64/i386, GCC isn't necessary. It would be really nice not to have to build GCC and all its dependencies. The attached patch makes GCC optional, and enabled by default, with warnings that it should only be disabled under specific circumstances (with a pkg-help file to spell out what those circumstances are).
Maintainer feedback,please!
(In reply to Adam Weinberger from comment #0) This is also very useful when building a package repository only with kernel modules in Poudriere. With this I'm not forced to also build GCC when only building virtualbox-ose-kmod which builds fine with Clang. Is there a reason this wasn't committed with maintainer timeout yet?
(In reply to Tobias Kortkamp from comment #2) I've been holding out hope for 18 months now that someone from the vbox team will take 30 seconds to reply to this PR, but you're right, Tobias, that's probably not going to happen.
A commit references this bug: Author: adamw Date: Fri May 18 15:41:56 UTC 2018 New revision: 470301 URL: https://svnweb.freebsd.org/changeset/ports/470301 Log: devel/kBuild: Add a GCC option When you're building only virtualbox-ose-additions, and without any X-related stuff, it is sufficient to build with clang instead of GCC. Add a GCC option (with a warning and pkg-help saying to leave it enabled) to make GCC optional. PR: 215369 Approved by: maintainer timeout (17 months) Changes: head/devel/kBuild/Makefile head/devel/kBuild/pkg-help
Committed after timeout
I know this is old, but why is it only usable when built with clang on certain case and not all cases, I can't find the information in the commit log or in the pkg-help file or anything. I would like to revisit this choice, but without knowing why this has been made like this it is hard to know what to check.
(In reply to Baptiste Daroussin from comment #6) I didn't quite understand the question, but I tested building emulators/virtualbox-ose* with devel/kBuild built with GCC and CLANG from base: emulators/virtualbox-ose*-legacy fails with GCC, other ports build without errors with both GCC and CLANG.
(In reply to Baptiste Daroussin from comment #6) At the time, IIRC it was that the vb-ose-additions subtree didn't use any GCC-isms, and it was unpleasant to have to drag in a runtime dependency on GCC just because the rest of vb DID use GCC-isms. I tested that part extensively and felt comfortable letting it build with llvm under the narrow build scenario I could test (I've never had access to architectures beyond amd64 and i386, esp. where I could test out KLDs). I don't recall if at the time I limited it to ose-additions because that's all I felt confident about, or if I'd confirmed the source of the llvm build failures. But from vvd's comment, it sounds like the opposite is true now.