diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index f0acf16772d3..c6b689d84c61 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -36,7 +36,7 @@ NO_WERROR= .if defined(DEBUG_FLAGS) CFLAGS+= ${DEBUG_FLAGS} -.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != "" +.if ${MK_CTF} != "no" CTFFLAGS+= -g .endif .else diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 486914bc19bf..1e2344f2dd29 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -128,6 +128,7 @@ ____: .if ${MK_CTF} != "no" CTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} +DEBUG_FLAGS+= -g .elif defined(.PARSEDIR) || (defined(MAKE_VERSION) && ${MAKE_VERSION} >= 5201111300) CTFCONVERT_CMD= .else diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 340950a3cdd2..e4f71045ab21 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -20,7 +20,7 @@ NO_WERROR= CFLAGS+=${DEBUG_FLAGS} CXXFLAGS+=${DEBUG_FLAGS} -.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != "" +.if ${MK_CTF} != "no" CTFFLAGS+= -g .endif .endif