Page MenuHomeFreeBSD

[phb]: update USE_GCC description
ClosedPublic

Authored by fernape on May 11 2021, 10:02 AM.
Tags
None
Referenced Files
F82002681: D30209.id89111.diff
Wed, Apr 24, 9:28 AM
Unknown Object (File)
Fri, Apr 12, 1:37 AM
Unknown Object (File)
Mon, Apr 8, 10:07 PM
Unknown Object (File)
Sun, Mar 31, 4:01 AM
Unknown Object (File)
Mar 19 2024, 1:23 AM
Unknown Object (File)
Mar 11 2024, 11:38 PM
Unknown Object (File)
Feb 28 2024, 1:38 AM
Unknown Object (File)
Feb 10 2024, 7:28 PM
Subscribers
None

Details

Summary

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@

Test Plan
  • make documentation
  • phb looks good

Diff Detail

Repository
R9 FreeBSD doc repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

fernape created this revision.

Otherwise, seems alright and ready to commit.

I only wonder if GCC is still present in the base system of any supported release of FreeBSD. But that's something we can investigate in another commit.

documentation/content/en/books/porters-handbook/makefiles/_index.adoc
3300
3301
3306

I think it sounds better but I'm not a native speaker.

This revision is now accepted and ready to land.May 11 2021, 10:08 AM
In D30209#678333, @0mp wrote:

I only wonder if GCC is still present in the base system of any supported release of FreeBSD.

Yes, this is the case for some of 11.x (I believe depending on a build option) and for powerpc*
up to and including 12.x (I believe), for example.

Thank you, these changes look fine!

I made some one minor suggestion and addressed a question, which I hope help.

documentation/content/en/books/porters-handbook/makefiles/_index.adoc
3301

Ah, I just realize lang/gcc is not that canonical port any more - it just pulls in that version, but is
not implied/used by USE_GCC=yes any longer.

Technically this is

"modern GCC from ports per GCC_DEFAULT in Mk/bsd.default-versions.mk"
  • Address comments by 0mp and gerald
This revision now requires review to proceed.May 13 2021, 7:12 AM
  • Change 'only' position (suggested by 0mp)

Thank you, Fernando! I made two suggestions, but this is a good improvement either way, so up to you. :-)

documentation/content/en/books/porters-handbook/makefiles/_index.adoc
3302–3303

Maybe use versions currently supported, such as 10 instead of 4.7 and 10+ instead of 4.6+?

3305

Maybe "from ports" instead "from the port"? As you prefer, it depends on the angle.

3306

I think it sounds better but I'm not a native speaker.

This revision is now accepted and ready to land.May 13 2021, 8:13 AM

Thank you, Fernando! I made two suggestions, but this is a good improvement either way, so up to you. :-)

I updated my local copy with your suggestions. If it is OK, I will skip the update of this review to avoid the need of a new approval.
I will wait for the changes in bsd.gcc.mk before pushing this.

Thanks you both for the review!

I just committed the following to Mk/bsd.port.gcc. In other words: ready, aim, fire! :-)

commit 768f18f327ac9646fb8ee83263233909be540966 (HEAD -> main, origin/main, origin/HEAD)
Author: Gerald Pfeifer <gerald@FreeBSD.org>
Date: Fri May 14 13:57:13 2021 +0000

Mk/bsd.gcc.mk: Deprecate USE_GCC=any

diff --git a/Mk/bsd.gcc.mk b/Mk/bsd.gcc.mk
index c836b95b8e17..aed64671d194 100644

  • a/Mk/bsd.gcc.mk

+++ b/Mk/bsd.gcc.mk
@@ -9,9 +9,6 @@

  1. your port/system configuration. This is the preferred use of USE_GCC.
  2. It uses the canonical version of GCC defined in bsd.default-versions.mk. #
  3. USE_GCC=any is similar, except that it also accepts the old GCC 4.2-
  4. based system compiler where still present.
  5. If your port needs a specific (minimum) version of GCC, you can easily
  6. specify that with a USE_GCC= statement. Unless absolutely necessary
  7. do so by specifying USE_GCC=X+ which requests at least GCC version X.

@@ -24,11 +21,13 @@

  1. If no arguments are specified, GCC is added as both a build dependency
  2. and a run time dependency. #

+# (USE_GCC=any is deprecated, must not be used for new ports, and should
+# be migrated to USE_GCC=yes or completely removed if possible.)
+#

  1. Examples:
  2. USE_GCC= yes # port requires a current version of GCC
  3. # as defined in bsd.default-versions.mk.
  4. USE_GCC= any # port requires GCC 4.2 or later.
  5. USE_GCC= 9+ # port requires GCC 9 or later.
  6. USE_GCC= 8 # port requires GCC 8.
  7. USE_GCC= yes:build # port requires a current version of GCC at

A minor suggestion: "The GCC from the base system" -> just "GCC from the base system"?

This revision was automatically updated to reflect the committed changes.

A minor suggestion: "The GCC from the base system" -> just "GCC from the base system"?

Committed with this last suggestion.

Thank you very much!