mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 10:52:50 +00:00
- CTF knob is now implemented using common scheme: MK_CTF=yes/no is
defined based on WITH/WITHOUT_CTF settings, default is WITHOUT_CTF, NO_CTF overrides WITH_CTF (used by Makefile.inc1) - CTFCONVERT_CMD/NORMAL_CTFCONVERT are now defined to empty string if make(1) can handle empty commands
This commit is contained in:
parent
019bd13977
commit
83cb5bae96
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228158
@ -59,8 +59,6 @@ SUBDIR+=games
|
||||
.endif
|
||||
.if ${MK_CDDL} != "no"
|
||||
SUBDIR+=cddl
|
||||
.else
|
||||
NO_CTF=1
|
||||
.endif
|
||||
SUBDIR+=gnu include
|
||||
.if ${MK_KERBEROS} != "no"
|
||||
|
@ -36,7 +36,7 @@ NO_WERROR=
|
||||
.if defined(DEBUG_FLAGS)
|
||||
CFLAGS+= ${DEBUG_FLAGS}
|
||||
|
||||
.if defined(WITH_CTF) && (${DEBUG_FLAGS:M-g} != "")
|
||||
.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != ""
|
||||
CTFFLAGS+= -g
|
||||
.endif
|
||||
.endif
|
||||
@ -186,7 +186,7 @@ ${SHLIB_NAME}: ${SOBJS}
|
||||
-o ${.TARGET} -Wl,-soname,${SONAME} \
|
||||
`NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD}
|
||||
.endif
|
||||
.if defined(WITH_CTF)
|
||||
.if ${MK_CTF} != "no"
|
||||
${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS}
|
||||
.endif
|
||||
.endif
|
||||
|
@ -189,12 +189,6 @@ STRIP?= -s
|
||||
COMPRESS_CMD?= gzip -cn
|
||||
COMPRESS_EXT?= .gz
|
||||
|
||||
.if defined(WITH_CTF)
|
||||
CTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
|
||||
.else
|
||||
CTFCONVERT_CMD= @:
|
||||
.endif
|
||||
|
||||
.if !defined(_WITHOUT_SRCCONF)
|
||||
#
|
||||
# Define MK_* variables (which are either "yes" or "no") for users
|
||||
@ -209,6 +203,7 @@ CTFCONVERT_CMD= @:
|
||||
# regardless of user's setting).
|
||||
#
|
||||
.for var in \
|
||||
CTF \
|
||||
INSTALLLIB \
|
||||
MAN \
|
||||
PROFILE
|
||||
@ -418,6 +413,7 @@ __DEFAULT_NO_OPTIONS = \
|
||||
BIND_LIBS \
|
||||
BIND_SIGCHASE \
|
||||
BIND_XML \
|
||||
CTF \
|
||||
HESIOD \
|
||||
ICONV \
|
||||
IDEA \
|
||||
@ -516,6 +512,7 @@ MK_BIND_ETC:= no
|
||||
|
||||
.if ${MK_CDDL} == "no"
|
||||
MK_ZFS:= no
|
||||
MK_CTF:= no
|
||||
.endif
|
||||
|
||||
.if ${MK_CRYPT} == "no"
|
||||
@ -616,6 +613,14 @@ MK_${vv:H}:= ${MK_${vv:T}}
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
.if ${MK_CTF} != "no"
|
||||
CTFCONVERT_CMD= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
|
||||
.elif ${MAKE_VERSION} >= 5201111300
|
||||
CTFCONVERT_CMD=
|
||||
.else
|
||||
CTFCONVERT_CMD= @:
|
||||
.endif
|
||||
|
||||
.endif # !_WITHOUT_SRCCONF
|
||||
|
||||
.endif # !target(__<bsd.own.mk>__)
|
||||
|
@ -19,7 +19,7 @@ NO_WERROR=
|
||||
CFLAGS+=${DEBUG_FLAGS}
|
||||
CXXFLAGS+=${DEBUG_FLAGS}
|
||||
|
||||
.if defined(WITH_CTF) && (${DEBUG_FLAGS:M-g} != "")
|
||||
.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != ""
|
||||
CTFFLAGS+= -g
|
||||
.endif
|
||||
.endif
|
||||
@ -55,7 +55,7 @@ ${PROG}: ${OBJS}
|
||||
.else
|
||||
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
|
||||
.endif
|
||||
.if defined(WITH_CTF)
|
||||
.if ${MK_CTF} != "no"
|
||||
${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}
|
||||
.endif
|
||||
|
||||
@ -85,7 +85,7 @@ ${PROG}: ${OBJS}
|
||||
.else
|
||||
${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
|
||||
.endif
|
||||
.if defined(WITH_CTF)
|
||||
.if ${MK_CTF} != "no"
|
||||
${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}
|
||||
.endif
|
||||
.endif
|
||||
|
@ -94,7 +94,7 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o
|
||||
@rm -f ${.TARGET}
|
||||
@echo linking ${.TARGET}
|
||||
${SYSTEM_LD}
|
||||
.if defined(WITH_CTF)
|
||||
.if ${MK_CTF} != "no"
|
||||
${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o
|
||||
.endif
|
||||
.if !defined(DEBUG)
|
||||
@ -249,7 +249,7 @@ kernel-reinstall:
|
||||
|
||||
config.o env.o hints.o vers.o vnode_if.o:
|
||||
${NORMAL_C}
|
||||
@${NORMAL_CTFCONVERT}
|
||||
${NORMAL_CTFCONVERT}
|
||||
|
||||
config.ln env.ln hints.ln vers.ln vnode_if.ln:
|
||||
${NORMAL_LINT}
|
||||
|
@ -123,10 +123,12 @@ NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC}
|
||||
NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \
|
||||
${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c
|
||||
|
||||
.if defined(WITH_CTF)
|
||||
.if ${MK_CTF} != "no"
|
||||
NORMAL_CTFCONVERT= ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
|
||||
.elif ${MAKE_VERSION} >= 5201111300
|
||||
NORMAL_CTFCONVERT=
|
||||
.else
|
||||
NORMAL_CTFCONVERT= :
|
||||
NORMAL_CTFCONVERT= @:
|
||||
.endif
|
||||
|
||||
NORMAL_LINT= ${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC}
|
||||
|
@ -201,7 +201,7 @@ ${KMOD}.kld: ${OBJS}
|
||||
${FULLPROG}: ${OBJS}
|
||||
.endif
|
||||
${LD} ${LDFLAGS} -r -d -o ${.TARGET} ${OBJS}
|
||||
.if defined(WITH_CTF)
|
||||
.if ${MK_CTF} != "no"
|
||||
${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}
|
||||
.endif
|
||||
.if defined(EXPORT_SYMS)
|
||||
|
Loading…
Reference in New Issue
Block a user