Move the adding of CFLAGS_LAST to bsd.sys.mk

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.

Reviewed by:	obrien
Differential Revision:	https://reviews.freebsd.org/D42001
This commit is contained in:
Simon J. Gerraty
2023-09-28 14:01:56 -07:00
parent b6da7f2fd1
commit b45ab4b000
2 changed files with 5 additions and 4 deletions
+5
View File
@@ -501,3 +501,8 @@ ${_tgt}: ${META_DEPS}
.endif
.endfor
.endif
# we are generally the last makefile read
CFLAGS+= ${CFLAGS_LAST}
CXXFLAGS+= ${CXXFLAGS_LAST}
LDFLAGS+= ${LDFLAGS_LAST}
-4
View File
@@ -11,10 +11,6 @@ NOSSPPICO?= .nossppico
PIEO?= .pieo
OBJ_EXTENSIONS+= ${NOSSPPICO} ${PIEO}
CFLAGS+= ${CFLAGS_LAST}
CXXFLAGS+= ${CXXFLAGS_LAST}
LDFLAGS+= ${LDFLAGS_LAST}
CLEANFILES+= .depend
# handy for debugging