Date: Wed, 28 Nov 2018 05:02:35 +0000 From: bugzilla-noreply@freebsd.org To: vbox@FreeBSD.org Subject: [Bug 233542] devel/kBuild improperly selects gcc version Message-ID: <bug-233542-26505-5iEJRLvIRK@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-233542-26505@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233542 --- Comment #4 from rkoberman@gmail.com --- (In reply to Jung-uk Kim from comment #3) I won't argue, but the comments in Mk/bsd.gcc.mk would seem to. They also argue that Mk/bsd.gcc.mk has a problem. # To request the use of a current version of GCC, specify USE_GCC=yes in # your port/system configuration. This is the preferred use of USE_GCC. # It uses the canonical version of GCC defined in bsd.default-versions.mk. # # USE_GCC=any is similar, except that it also accepts the old GCC 4.2- # based system compiler in older versions of FreeBSD. # # If your port needs a specific (minimum) version of GCC, you can easily # specify that with a USE_GCC= statement. Unless absolutely necessary # do so by specifying USE_GCC=X+ which requests at least GCC version X. # To request a specific version omit the trailing + sign. # # Examples: # USE_GCC= yes # port requires a current version of GCC # # as defined in bsd.default-versions.mk. # USE_GCC= any # port requires GCC 4.2 or later. The use of "any" is to allow the use of gcc4.2, which is likely to cause issues considering its age and lack of recent support. Further, the coe in the .mk file seesm to likely not o what might be expected nor what the comments state, though I find the comment "Default to the last GCC imported into base" to be very unclear. In any case, it should not choose gcc7 on n 11.2 system. The .mk code for "any" looks a bit odd to me. It does not appear to do what the comments say, but I am far from an expert if make(1). .if defined(USE_GCC) && !defined(FORCE_BASE_CC_FOR_TESTING) . if ${USE_GCC} == any # Enable the clang-is-cc workaround. Default to the last GCC imported # into base. _USE_GCC:= 4.2 _GCC_ORLATER:= true . else # ${USE_GCC} == any # See if we can use a later version or exclusively the one specified. _USE_GCC:= ${USE_GCC:S/+//} .if ${USE_GCC} != ${_USE_GCC} _GCC_ORLATER:= true .endif . endif # ${USE_GCC} == any .mk code for "any"is a bit odd to me. -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-233542-26505-5iEJRLvIRK>
