diff options
author | Peter Valchev <pvalchev@cvs.openbsd.org> | 2004-07-08 01:29:24 +0000 |
---|---|---|
committer | Peter Valchev <pvalchev@cvs.openbsd.org> | 2004-07-08 01:29:24 +0000 |
commit | 0eef78ff60325a89c4b637a792711d9e098e6ae7 (patch) | |
tree | c7b019e60a6eb1de9768573300ed7330876f09a7 /share/mk | |
parent | 391afbc8b288489f5c5ec12f63e074de988b2bc1 (diff) |
again: move PICFLAG into bsd.own.mk with the rest of the shlib handling,
and thus simplify logic. now including bsd.own.mk will override
any current setting in PICFLAG, which is desired. ok deraadt drahn
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/bsd.lib.mk | 13 | ||||
-rw-r--r-- | share/mk/bsd.own.mk | 14 |
2 files changed, 13 insertions, 14 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index b80d7905cf6..6a846d24275 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.lib.mk,v 1.39 2004/06/24 04:35:13 pvalchev Exp $ +# $OpenBSD: bsd.lib.mk,v 1.40 2004/07/08 01:29:23 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,17 +117,6 @@ 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 diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 9bb118ce686..cf87291445d 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.own.mk,v 1.85 2004/06/24 04:35:13 pvalchev Exp $ +# $OpenBSD: bsd.own.mk,v 1.86 2004/07/08 01:29:23 pvalchev Exp $ # $NetBSD: bsd.own.mk,v 1.24 1996/04/13 02:08:09 thorpej Exp $ # Host-specific overrides @@ -116,10 +116,20 @@ STATIC?= -static NOPIC= .endif -#pic relocation flags. +# pic relocation flags. .if (${MACHINE_ARCH} == "sparc64") PICFLAG=-fPIC +.else +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 (${MACHINE_ARCH} == "sparc64") || (${MACHINE_ARCH} == "sparc") ASPICFLAG=-KPIC .elif (${ELF_TOOLCHAIN:L} == "no") |