Use make's :tl instead of checking "no" and "NO"

Suggested by:	kevans
Reviewed by:	kevans
This commit is contained in:
Ed Maste 2019-02-15 22:48:50 +00:00
parent 8094f70b77
commit 447b492eb8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=344182
2 changed files with 4 additions and 5 deletions

View file

@ -38,8 +38,7 @@ MK_DEBUG_FILES= no
.if ${MK_BIND_NOW} != "no"
LDFLAGS+= -Wl,-znow
.endif
.if ${MK_PIE} != "no" && \
(!defined(NO_SHARED) || ${NO_SHARED} == "no" || ${NO_SHARED} == "NO")
.if ${MK_PIE} != "no" && (!defined(NO_SHARED) || ${NO_SHARED:tl} == "no")
CFLAGS+= -fPIE
CXXFLAGS+= -fPIE
LDFLAGS+= -pie
@ -48,7 +47,7 @@ LDFLAGS+= -pie
CFLAGS+= -mretpoline
CXXFLAGS+= -mretpoline
# retpolineplt is broken with static linking (PR 233336)
.if !defined(NO_SHARED) || ${NO_SHARED} == "no" || ${NO_SHARED} == "NO"
.if !defined(NO_SHARED) || ${NO_SHARED:tl} == "no"
LDFLAGS+= -Wl,-zretpolineplt
.endif
.endif
@ -74,7 +73,7 @@ TAGS+= package=${PACKAGE:Uruntime}
TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
.endif
.if defined(NO_SHARED) && (${NO_SHARED} != "no" && ${NO_SHARED} != "NO")
.if defined(NO_SHARED) && (${NO_SHARED:tl} != "no"
LDFLAGS+= -static
.endif

View file

@ -386,7 +386,7 @@ LDADD_${_l}?= ${LDADD_${_l}_L} -l${_l}
.endif
# Add in all dependencies for static linkage.
.if defined(_DP_${_l}) && (${_INTERNALLIBS:M${_l}} || \
(defined(NO_SHARED) && (${NO_SHARED} != "no" && ${NO_SHARED} != "NO")))
(defined(NO_SHARED) && ${NO_SHARED:tl} != "no"))
.for _d in ${_DP_${_l}}
DPADD_${_l}+= ${DPADD_${_d}}
LDADD_${_l}+= ${LDADD_${_d}}