Date: Thu, 28 Sep 2023 21:02:43 GMT From: "Simon J. Gerraty" <sjg@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: b45ab4b000b4 - main - Move the adding of CFLAGS_LAST to bsd.sys.mk Message-ID: <202309282102.38SL2hqZ038937@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b45ab4b000b46d301a0d95b856590067e3d67eb5 commit b45ab4b000b46d301a0d95b856590067e3d67eb5 Author: Simon J. Gerraty <sjg@FreeBSD.org> AuthorDate: 2023-09-28 21:01:56 +0000 Commit: Simon J. Gerraty <sjg@FreeBSD.org> CommitDate: 2023-09-28 21:01:56 +0000 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 --- share/mk/bsd.sys.mk | 5 +++++ share/mk/local.autodep.mk | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index 2b1a3e103b89..4cbe01404876 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -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} diff --git a/share/mk/local.autodep.mk b/share/mk/local.autodep.mk index d3772aa2b819..bc5bfd3e75db 100644 --- a/share/mk/local.autodep.mk +++ b/share/mk/local.autodep.mk @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202309282102.38SL2hqZ038937>