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/> References: <bug-233542-26505@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D233542 --- 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 a= rgue that Mk/bsd.gcc.mk has a problem. # To request the use of a current version of GCC, specify USE_GCC=3Dyes 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=3Dany 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=3D statement. Unless absolutely necessary # do so by specifying USE_GCC=3DX+ which requests at least GCC version X. # To request a specific version omit the trailing + sign. # # Examples: # USE_GCC=3D yes # port requires a current version= of GCC # # as defined in bsd.default-versions.mk. # USE_GCC=3D 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 is= sues 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 sta= te, 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} =3D=3D any # Enable the clang-is-cc workaround. Default to the last GCC imported # into base. _USE_GCC:=3D 4.2 _GCC_ORLATER:=3D true . else # ${USE_GCC} =3D=3D any # See if we can use a later version or exclusively the one specified. _USE_GCC:=3D ${USE_GCC:S/+//} .if ${USE_GCC} !=3D ${_USE_GCC} _GCC_ORLATER:=3D true .endif . endif # ${USE_GCC} =3D=3D any .mk code for "any"is a bit odd to me. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-233542-26505-5iEJRLvIRK>