Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Feb 2019 22:48:50 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r344182 - head/share/mk
Message-ID:  <201902152248.x1FMmoXS013158@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Fri Feb 15 22:48:50 2019
New Revision: 344182
URL: https://svnweb.freebsd.org/changeset/base/344182

Log:
  Use make's :tl instead of checking "no" and "NO"
  
  Suggested by:	kevans
  Reviewed by:	kevans

Modified:
  head/share/mk/bsd.prog.mk
  head/share/mk/src.libnames.mk

Modified: head/share/mk/bsd.prog.mk
==============================================================================
--- head/share/mk/bsd.prog.mk	Fri Feb 15 22:30:09 2019	(r344181)
+++ head/share/mk/bsd.prog.mk	Fri Feb 15 22:48:50 2019	(r344182)
@@ -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
 

Modified: head/share/mk/src.libnames.mk
==============================================================================
--- head/share/mk/src.libnames.mk	Fri Feb 15 22:30:09 2019	(r344181)
+++ head/share/mk/src.libnames.mk	Fri Feb 15 22:48:50 2019	(r344182)
@@ -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}}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902152248.x1FMmoXS013158>