Page MenuHomeFreeBSD

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

Authored by emaste on Oct 31 2025, 4:31 PM.
Tags
None
Referenced Files
F154033199: D53501.id165622.diff
Sat, Apr 25, 3:16 PM
F153998818: D53501.id165622.diff
Sat, Apr 25, 8:41 AM
Unknown Object (File)
Wed, Apr 22, 8:13 PM
Unknown Object (File)
Wed, Apr 22, 6:11 PM
Unknown Object (File)
Mon, Apr 20, 5:25 PM
Unknown Object (File)
Wed, Apr 15, 9:28 PM
Unknown Object (File)
Sat, Apr 11, 11:07 AM
Unknown Object (File)
Tue, Apr 7, 6:40 PM
Subscribers

Details

Summary
We emit a warning if src.conf options WITH_RETPOLINE or INIT_ALL=zero
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.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable