In the context of PR 234495 USE_GCC was described in the Porters Handbook, including a note that it's a build *and* run-time dependency. *) Since then I have implemented USE_GCC=yes:build, USE_GCC=10+:build, and the like, which are worth mentioning. *) And recommending USE_GCC=any as "typical" really is the opposite of what I, and Mk/bsd.gcc.mk, have been recommending for years and years! USE_GCC=any means that the port hardly ever is tested with base GCC, since on amd64 it is equivalent to USE_GCC=yes and building with base GCC (if present) is only ever tested on architectures that only very few people have. Can you please change this to presenting USE_GCC=yes as the default and noting the ":build" option? I put effort into keeping Mk/bsd.gcc.mk up-to-date, and would be happy for you to lift the description there and bring things more in sync again.
Hi Fernando, I see you took this PR - thank you! There is a change in this direction I will likely commit in the next days, so this is very welcome. Based on this we may even want to be more aggressive and note that USE_GCC=any is deprecated and should not be used in new ports any more. Index: Mk/bsd.gcc.mk =================================================================== --- Mk/bsd.gcc.mk (revision 568719) +++ Mk/bsd.gcc.mk (working copy) @@ -9,9 +9,6 @@ # 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 where still present. -# # 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. @@ -24,11 +21,12 @@ # If no arguments are specified, GCC is added as both a build dependency # and a run time dependency. # +# (USE_GCC=any is deprecated and equivalent to USE_GCC=yes nowadays.)
(In reply to Gerald Pfeifer from comment #1) Thanks for the info! I will open a review and link it here so you can have a look at it.
https://reviews.freebsd.org/D30209
Hi Gerald, The review has been approved. Would you ping me when the code that deprecates USE_GCC=any is pushed? Thanks!
(In reply to Fernando Apesteguía from comment #4) > The review has been approved. Would you ping me when the code that > deprecates USE_GCC=any is pushed? Yes, happy to do that! I also added two comments in Phabricator.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/doc/commit/?id=47c32d3f6b84ce4d77b82d9217884b0342ea515e commit 47c32d3f6b84ce4d77b82d9217884b0342ea515e Author: Fernando ApesteguÃa <fernape@FreeBSD.org> AuthorDate: 2021-05-11 09:47:53 +0000 Commit: Fernando ApesteguÃa <fernape@FreeBSD.org> CommitDate: 2021-05-14 14:31:38 +0000 [phb]: update USE_GCC description Update USE_GCC documentation after port's commit 768f18f327ac9646fb8ee83263233909be540966 Show that USE_GCC=any is deprecated and also the possibility to specify :build to inject a BUILD only dependency. PR: 254253 Reported by: gerald@ Reviewed by: 0mp@, gerald@ Approved by: 0mp@ (mentor), gerald@ Differential Revision: https://reviews.freebsd.org/D30209 .../en/books/porters-handbook/makefiles/_index.adoc | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-)
Committed, Thanks!