summaryrefslogtreecommitdiff
path: root/share/mk/bsd.lib.mk
diff options
context:
space:
mode:
authorPeter Valchev <pvalchev@cvs.openbsd.org>2004-06-24 04:35:14 +0000
committerPeter Valchev <pvalchev@cvs.openbsd.org>2004-06-24 04:35:14 +0000
commit25b5d0c61452ba19e289b1d9e8edfa2e0c823b2c (patch)
tree5413fcd7494b841599f7146f1b05b24c645a30a9 /share/mk/bsd.lib.mk
parent4a88fe60dd75ad8690bfc08e827049c40f9c91a3 (diff)
undo tree breakage, sorry
Diffstat (limited to 'share/mk/bsd.lib.mk')
-rw-r--r--share/mk/bsd.lib.mk13
1 files changed, 12 insertions, 1 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index 8d14febfb94..b80d7905cf6 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.lib.mk,v 1.38 2004/06/22 19:50:01 pvalchev Exp $
+# $OpenBSD: bsd.lib.mk,v 1.39 2004/06/24 04:35:13 pvalchev Exp $
# $NetBSD: bsd.lib.mk,v 1.67 1996/01/17 20:39:26 mycroft Exp $
# @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
@@ -117,6 +117,17 @@ CXXFLAGS+= ${CXXDIAGFLAGS}
CFLAGS+= ${COPTS}
CXXFLAGS+= ${CXXOPTS}
+.if !defined(PICFLAG) && (${MACHINE_ARCH} != "mips")
+PICFLAG=-fpic
+.if ${MACHINE_ARCH} == "m68k"
+# Function CSE makes gas -k not recognize external function calls as lazily
+# resolvable symbols, thus sometimes making ld.so report undefined symbol
+# errors on symbols found in shared library members that would never be
+# called. Ask niklas@openbsd.org for details.
+PICFLAG+=-fno-function-cse
+.endif
+.endif
+
_LIBS=lib${LIB}.a
.if (${DEBUGLIBS:L} == "yes")
_LIBS+=lib${LIB}_g.a