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)
Sep 18 2024, 10:33 AM
Unknown Object (File)
Sep 9 2024, 7:52 PM
Unknown Object (File)
Sep 8 2024, 11:53 AM
Unknown Object (File)
Sep 8 2024, 11:41 AM
Unknown Object (File)
Sep 8 2024, 6:46 AM
Unknown Object (File)
Sep 4 2024, 5:24 AM
Unknown Object (File)
Sep 1 2024, 2:55 AM
Unknown Object (File)
Sep 1 2024, 2:55 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 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.