Module Name:    src
Committed By:   riastradh
Date:           Tue Jan 14 19:46:56 UTC 2025

Modified Files:
        src/share/mk: bsd.lib.mk

Log Message:
bsd.lib.mk: Don't pass -fPIC if MKPIC=no, even if LIBISPRIVATE=pic.

Saves the trouble of having to conditionalize LIBISPRIVATE=pic on
non-shlib platforms (i.e., sun2, and anyone else trying to build a
static-only NetBSD).


To generate a diff of this commit:
cvs rdiff -u -r1.417 -r1.418 src/share/mk/bsd.lib.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/mk/bsd.lib.mk
diff -u src/share/mk/bsd.lib.mk:1.417 src/share/mk/bsd.lib.mk:1.418
--- src/share/mk/bsd.lib.mk:1.417	Tue Jan 14 19:44:53 2025
+++ src/share/mk/bsd.lib.mk	Tue Jan 14 19:46:56 2025
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.lib.mk,v 1.417 2025/01/14 19:44:53 riastradh Exp $
+#	$NetBSD: bsd.lib.mk,v 1.418 2025/01/14 19:46:56 riastradh Exp $
 #	@(#)bsd.lib.mk	8.3 (Berkeley) 4/22/94
 
 .include <bsd.init.mk>
@@ -59,7 +59,7 @@ AFLAGS+=        ${PIE_AFLAGS}
 .endif
 # The -fPIC is needed for libraries that include other libraries
 # The order matters here, PIC needs to be last
-.if ${LIBISPRIVATE} == "pic"
+.if ${MKPIC} != "no"
 CFLAGS+=        -fPIC
 AFLAGS+=        -fPIC
 .endif

Reply via email to