Mk/Uses/elfctl.mk: Add build and stage arguments
Introduce new arguments, build and stage, to control the location
and timing of ELF feature flag modifications.
Files listed in ELF_FEATURES are interpreted as relative to:
- ${BUILD_WRKSRC} when the build argument is supplied
- ${STAGEDIR} when the stage argument is supplied
Operating on binaries under ${STAGEDIR} is useful when binaries are
modified after the build phase. Conversely, working with binaries under
${BUILD_WRKSRC} is preferable when test targets are run against the
build tree.
Reviewed by: arrowd
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D48324