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, Apr 30, 6:41 PM
Unknown Object (File)
Tue, Apr 30, 6:39 PM
Unknown Object (File)
Tue, Apr 30, 6:38 PM
Unknown Object (File)
Tue, Apr 30, 4:09 PM
Unknown Object (File)
Mar 13 2024, 2:50 AM
Unknown Object (File)
Jan 21 2024, 2:28 PM
Unknown Object (File)
Dec 24 2023, 1:48 PM
Unknown Object (File)
Oct 26 2023, 7:29 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 Not Applicable
Unit
Tests Not Applicable

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.