git: share/mk: Allow per-group flags to override default compile flags
Aaron LI
aly at crater.dragonflybsd.org
Mon Apr 6 09:02:13 PDT 2026
commit b787bbd068d6b7cd81782f6809d31551428a142a
Author: Aaron LI <aly at aaronly.me>
Date: Thu Mar 19 11:53:03 2026 +0800
share/mk: Allow per-group flags to override default compile flags
Per-group flags support was introduced in commit
6d68f83fef807ce255df27c2482db0d58ff71744, but the per-group flags (i.e.,
${${_FG}_FLAGS} and ${_${.IMPSRC}_FLAGS}) were listed *before* the
default/common compile flags (e.g., ${CFLAGS}). As a result, there was
no way for per-group flags to override the default compile flags, which
was counter-intuitive and made the feature less useful.
This commit splits the per-group flags into '-I' flags and non-'-I'
flags, and reorders the non-'-I' flags *after* the default compile flags,
allowing them to be overridden on a per-group basis as needed.
An immediate beneficiary will be gnu/lib/gccXX/libstdcxx, which requires
multiple file groups to override the default compile flags.
Summary of changes:
share/mk/bsd.dep.mk | 9 +++++---
share/mk/bsd.hostlib.mk | 6 +++--
share/mk/bsd.lib.mk | 58 ++++++++++++++++++++++++++++++-------------------
share/mk/sys.mk | 49 ++++++++++++++++++++++++++---------------
4 files changed, 78 insertions(+), 44 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b787bbd068d6b7cd81782f6809d31551428a142a
--
DragonFly BSD source repository
More information about the Commits
mailing list