git: de3e8d6de9 - main - porters-handbook: Document updates to USES=elfctl

From: Joseph Mingrone <jrm_at_FreeBSD.org>
Date: Sun, 05 Jan 2025 21:38:48 UTC
The branch main has been updated by jrm:

URL: https://cgit.FreeBSD.org/doc/commit/?id=de3e8d6de905a43838d6bb486bc79ace4b8283ae

commit de3e8d6de905a43838d6bb486bc79ace4b8283ae
Author:     Joseph Mingrone <jrm@FreeBSD.org>
AuthorDate: 2025-01-05 15:37:48 +0000
Commit:     Joseph Mingrone <jrm@FreeBSD.org>
CommitDate: 2025-01-05 21:38:46 +0000

    porters-handbook: Document updates to USES=elfctl
    
    Document two new USES=elfctl arguments: `build` and `stage`.  The
    arguments control the location and timing of ELF feature flag
    modifications.
    
    Reviewed by:    carlavilla, Pau Amma <pauamma@gundo.com>
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D48327
---
 .../content/en/books/porters-handbook/uses/_index.adoc         | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/documentation/content/en/books/porters-handbook/uses/_index.adoc b/documentation/content/en/books/porters-handbook/uses/_index.adoc
index ab59854f3d..b9f797b576 100644
--- a/documentation/content/en/books/porters-handbook/uses/_index.adoc
+++ b/documentation/content/en/books/porters-handbook/uses/_index.adoc
@@ -489,9 +489,12 @@ Add dependency on package:math/eigen[].
 [[uses-elfctl]]
 == `elfctl`
 
-Possible arguments: (none)
+Possible arguments: (none), `build` (default), `stage`
+
+Set ELF binary feature control notes by setting `ELF_FEATURES`.
 
-Change an ELF binary's feature control note by setting ELF_FEATURES.
+When either no argument or the `build` argument is supplied, binaries under `BUILD_WRKSRC` are operated on, and files listed in `ELF_FEATURES` are relative to `BUILD_WRKSRC`.
+When the `stage` argument is supplied, binaries under `STAGEDIR` are operated on and files listed in `ELF_FEATURES` are relative to `STAGEDIR`.
 
 [[uses-elfct-ex1]]
 .Uses=elfctl
@@ -501,13 +504,12 @@ Change an ELF binary's feature control note by setting ELF_FEATURES.
 ....
 USES=           elfctl
 ELF_FEATURES=	featurelist:path/to/file1 \
-		featurelist:path/to/file1 \
 		featurelist:path/to/file2
 ....
 
 ====
 
-The format of `featurelist` is described in man:elfctl[1].  The file paths are relative to ${BUILD_WRKSRC}.
+The format of `featurelist` is described in man:elfctl[1].
 
 [[uses-erlang]]
 == `erlang`