From 32152d47adcdbe88a2495c8359832ab9de29db54 Mon Sep 17 00:00:00 2001 From: Niklas Hallqvist Date: Mon, 8 Sep 1997 11:16:11 +0000 Subject: 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. --- share/mk/bsd.lib.mk | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'share/mk/bsd.lib.mk') 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) -- cgit v1.2.3