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
F113279274: D42001.diff
Fri, Mar 28, 1:47 PM
Unknown Object (File)
Fri, Mar 14, 9:42 AM
Unknown Object (File)
Feb 14 2025, 12:49 AM
Unknown Object (File)
Feb 12 2025, 11:50 PM
Unknown Object (File)
Feb 9 2025, 4:44 AM
Unknown Object (File)
Jan 17 2025, 9:55 PM
Unknown Object (File)
Jan 11 2025, 11:36 PM
Unknown Object (File)
Jan 6 2025, 9:03 AM
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.