summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--share/mk/bsd.lib.mk19
1 files changed, 13 insertions, 6 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index 32754a2d021..341f2d2ce27 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -1,4 +1,4 @@
-# $OpenBSD: bsd.lib.mk,v 1.22 2000/05/16 06:15:00 niklas Exp $
+# $OpenBSD: bsd.lib.mk,v 1.23 2000/07/15 12:45:04 rahnds 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
@@ -169,18 +169,25 @@ lib${LIB}_pic.a:: ${SOBJS}
@${AR} cq lib${LIB}_pic.a `${LORDER} ${SOBJS} | tsort -q`
${RANLIB} lib${LIB}_pic.a
-.if (${MACHINE_ARCH} != "mips")
+.if (${MACHINE_ARCH} == "mips")
+lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}.a ${DPADD}
+ @echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\)
+ @rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
+ $(LD) -x -shared --whole-archive -soname lib${LIB}.so.${SHLIB_MAJOR} \
+ -o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib${LIB}.a ${LDADD}
+.elif (${MACHINE_ARCH} == "powerpc" )
lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}_pic.a ${DPADD}
@echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\)
@rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
- $(LD) -x -Bshareable -Bforcearchive \
+ $(LD) -x -shared --whole-archive \
+ -soname lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
-o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib${LIB}_pic.a ${LDADD}
.else
-lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}.a ${DPADD}
+lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}_pic.a ${DPADD}
@echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\)
@rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}
- $(LD) -x -shared --whole-archive -soname lib${LIB}.so.${SHLIB_MAJOR} \
- -o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib${LIB}.a ${LDADD}
+ $(LD) -x -Bshareable -Bforcearchive \
+ -o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib${LIB}_pic.a ${LDADD}
.endif
LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}