git: a2e4c22a0e1a - stable/13 - bsd.lib.mk: add conditions for building _pie.a archives

Ed Maste emaste at FreeBSD.org
Mon Sep 20 00:31:38 UTC 2021


The branch stable/13 has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=a2e4c22a0e1abf2983b86fdc6c214da84618ca75

commit a2e4c22a0e1abf2983b86fdc6c214da84618ca75
Author:     Ed Maste <emaste at FreeBSD.org>
AuthorDate: 2021-09-12 16:45:50 +0000
Commit:     Ed Maste <emaste at FreeBSD.org>
CommitDate: 2021-09-20 00:29:53 +0000

    bsd.lib.mk: add conditions for building _pie.a archives
    
    As with other .a targets, build _pie.a archives only if LIB is set.
    
    At present we build _pie.a only for INTERNALLIBs, and none of them
    include bsd.lib.mk without setting LIB.  However, we might want to build
    _pie.a for non-INTERNALLIBs in the future.
    
    Reviewed by:    arichardson
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D31920
    
    (cherry picked from commit 7c0226cad3f36a05832f9c5216dfa3dadb91c92d)
---
 share/mk/bsd.lib.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index db54055b7ae0..bbeaee82883b 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -380,7 +380,7 @@ lib${LIB_PRIVATE}${LIB}_nossp_pic.a: ${NOSSPSOBJS}
 
 .endif # !defined(INTERNALLIB)
 
-.if defined(INTERNALLIB) && ${MK_PIE} != "no"
+.if defined(INTERNALLIB) && ${MK_PIE} != "no" && defined(LIB) && !empty(LIB)
 PIEOBJS+=	${OBJS:.o=.pieo}
 DEPENDOBJS+=	${PIEOBJS}
 CLEANFILES+=	${PIEOBJS}


More information about the dev-commits-src-all mailing list