Bug 254253 - Update USE_GCC description in the Porters Handbook
Summary: Update USE_GCC description in the Porters Handbook
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-13 09:06 UTC by Gerald Pfeifer
Modified: 2021-05-14 14:40 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer freebsd_committer freebsd_triage 2021-03-13 09:06:38 UTC
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.
Comment 1 Gerald Pfeifer freebsd_committer freebsd_triage 2021-05-11 06:47:26 UTC
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.)
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2021-05-11 06:59:16 UTC
(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.
Comment 3 Fernando Apesteguía freebsd_committer freebsd_triage 2021-05-11 10:03:24 UTC
https://reviews.freebsd.org/D30209
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2021-05-13 06:20:09 UTC
Hi Gerald,

The review has been approved. Would you ping me when the code that deprecates USE_GCC=any is pushed?

Thanks!
Comment 5 Gerald Pfeifer freebsd_committer freebsd_triage 2021-05-13 06:34:27 UTC
(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.
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-05-14 14:39:04 UTC
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(-)
Comment 7 Fernando Apesteguía freebsd_committer freebsd_triage 2021-05-14 14:40:28 UTC
Committed,

Thanks!