Page MenuHomeFreeBSD

Move the adding of CFLAGS_LAST to bsd.sys.mk
ClosedPublic

Authored by sjg on Sep 27 2023, 3:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 4, 8:12 AM
Unknown Object (File)
Sun, Nov 2, 8:31 AM
Unknown Object (File)
Oct 28 2025, 4:13 AM
Unknown Object (File)
Oct 24 2025, 10:57 AM
Unknown Object (File)
Oct 24 2025, 5:34 AM
Unknown Object (File)
Oct 24 2025, 3:25 AM
Unknown Object (File)
Oct 23 2025, 10:38 PM
Unknown Object (File)
Oct 12 2025, 1:31 PM
Subscribers

Details

Summary

The point of CFLAGS_LAST is to be the last thing in CFLAGS
so add it last.

For DIRDEPS_BUILD this can best be done via local.dirdeps-build.mk
which is guaranteed to be the last makefile read, but that does nothing
for non-DIRDEPS_BUILD

bsd.sys.mk is close enough to the end.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 53746
Build 50637: arc lint + arc unit

Event Timeline

sjg requested review of this revision.Sep 27 2023, 3:26 PM

Looks good. This will solve issues when one of

${CWARNFLAGS:M*} ${CWARNFLAGS.${COMPILER_TYPE}} ${CWARNFLAGS.${.IMPSRC:T}} ${CFLAGS.${COMPILER_TYPE}} ${CFLAGS.${.IMPSRC:T}} ${CWARNFLAGS.${.TARGET:T}} ${CFLAGS.${.TARGET:T}}

needs to be overridden or tweaked; which current cannot be easily done due to CFLAGS_LAST appearing before them.

This revision is now accepted and ready to land.Sep 27 2023, 7:19 PM
This revision was automatically updated to reflect the committed changes.