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)
Sat, May 16, 2:14 AM
Unknown Object (File)
Sat, May 16, 2:13 AM
Unknown Object (File)
Sat, May 16, 2:13 AM
Unknown Object (File)
Sat, May 16, 2:13 AM
Unknown Object (File)
Sun, May 3, 6:14 PM
Unknown Object (File)
Sun, May 3, 3:41 PM
Unknown Object (File)
Sun, May 3, 4:25 AM
Unknown Object (File)
Wed, Apr 29, 2:35 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.