summaryrefslogtreecommitdiff
path: root/share/mk/bsd.lib.mk
diff options
context:
space:
mode:
authorNiklas Hallqvist <niklas@cvs.openbsd.org>1997-09-08 11:16:11 +0000
committerNiklas Hallqvist <niklas@cvs.openbsd.org>1997-09-08 11:16:11 +0000
commit32152d47adcdbe88a2495c8359832ab9de29db54 (patch)
tree947316e72530921f08b3a66c6c4976ffc82657a3 /share/mk/bsd.lib.mk
parent2caf43c6daec97788e7dadb43b918c2975e0725f (diff)
Do not do function CSE on PIC code for m68k, gas does not handle it
correctly, making spurious "undefined symbol" errors turn up without reason occasionally.
Diffstat (limited to 'share/mk/bsd.lib.mk')
-rw-r--r--share/mk/bsd.lib.mk9
1 files changed, 8 insertions, 1 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index b29614deaac..5690332ab27 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.lib.mk,v 1.14 1997/06/12 15:06:34 grr Exp $
+# $OpenBSD: bsd.lib.mk,v 1.15 1997/09/08 11:16:10 niklas 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
@@ -87,6 +87,13 @@ CFLAGS+= ${COPTS}
.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
.if !defined(NOPROFILE)