HomeFreeBSD

bsd.prog.mk: Skip warnings if compiler.mk was not included

Description

bsd.prog.mk: Skip warnings if compiler.mk was not included

We emit a warning if src.conf options WITH_RETPOLINE or INIT_ALL are
in use, and the compiler or linker does not support the feature.

For targets like cleandir we skip including bsd.compiler.mk, which
leaves COMPILER_FEATURES unset and spurious warnings were emitted in
early buildworld stages, if these options are in use.

Commit 0837b2ebd570 ("pkg: Die if make -V BRANCH fails") added -W to
usr.sbin/pkg's make flags, causing it to exit on warnings. As a result
buildworld failed when these src.conf options were in use.

Clean this up by omitting the warning if the magic
_NO_INCLUDE_COMPILERMK flag is set, which indicates that
COMPILER_FEATURES is not set.

Approved by: re (cperciva)
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53501

(cherry picked from commit e4f2a350955406ffd58dd3f0bb7610df0f36d647)
(cherry picked from commit 1471af5110fc3bb6b1f1548e056f1717fb844ffd)

Details

Provenance
emasteAuthored on Oct 31 2025, 3:53 PM
cpercivaCommitted on Nov 3 2025, 8:29 PM
Reviewer
imp
Differential Revision
D53501: bsd.prog.mk: Skip warnings if compiler.mk was not included
Parents
rG258cc3474557: bus_attach_children.9: fix typo
Branches
Unknown
Tags
Unknown