diff options
author | Per Fogelstrom <pefo@cvs.openbsd.org> | 1996-05-25 09:03:45 +0000 |
---|---|---|
committer | Per Fogelstrom <pefo@cvs.openbsd.org> | 1996-05-25 09:03:45 +0000 |
commit | 5a85e62bf42bed44643a3b8ec5ef978df8c768b3 (patch) | |
tree | 6dfc61b09493ec580c42ef809b43fb940abdd586 /share/mk | |
parent | 17b6c370afec90448ff4849cc4247ad056a0f8b9 (diff) |
Added support for Mips ELF shlib build. Snapshot status.
Diffstat (limited to 'share/mk')
-rw-r--r-- | share/mk/bsd.lib.mk | 16 | ||||
-rw-r--r-- | share/mk/bsd.own.mk | 4 |
2 files changed, 15 insertions, 5 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 007f4ee97e0..bd72758445f 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.lib.mk,v 1.5 1996/03/05 11:12:41 mickey Exp $ +# $OpenBSD: bsd.lib.mk,v 1.6 1996/05/25 09:03:43 pefo 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 @@ -83,7 +83,7 @@ SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor @${LD} -x -r ${.TARGET}.o -o ${.TARGET} @rm -f ${.TARGET}.o -.if !defined(PICFLAG) +.if !defined(PICFLAG) && (${MACHINE_ARCH} != "mips") PICFLAG=-fpic .endif @@ -94,7 +94,9 @@ _LIBS=lib${LIB}.a .endif .if !defined(NOPIC) +.if (${MACHINE_ARCH} != "mips") _LIBS+=lib${LIB}_pic.a +.endif .if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR) _LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} .endif @@ -128,11 +130,19 @@ lib${LIB}_pic.a:: ${SOBJS} @${AR} cq lib${LIB}_pic.a `lorder ${SOBJS} | tsort -q` ${RANLIB} lib${LIB}_pic.a +.if (${MACHINE_ARCH} != "mips") 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 \ -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} + @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} +.endif LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln} # the following looks XXX to me... -- cgd @@ -179,7 +189,7 @@ realinstall: ${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}_p.a chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}_p.a .endif -.if !defined(NOPIC) +.if !defined(NOPIC) && (${MACHINE_ARCH} != "mips") # ranlib lib${LIB}_pic.a install ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m 600 \ lib${LIB}_pic.a ${DESTDIR}${LIBDIR} diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index 8675e9630c5..6ae15f21762 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.own.mk,v 1.7 1996/04/22 01:28:35 deraadt Exp $ +# $OpenBSD: bsd.own.mk,v 1.8 1996/05/25 09:03:44 pefo Exp $ # $NetBSD: bsd.own.mk,v 1.24 1996/04/13 02:08:09 thorpej Exp $ .if defined(MAKECONF) && exists(${MAKECONF}) @@ -65,7 +65,7 @@ STRIP?= -s # don't try to generate PIC versions of libraries on machines # which don't support PIC. -.if (${MACHINE_ARCH} == "mips") || (${MACHINE_ARCH} == "alpha") || \ +.if (${MACHINE_ARCH} == "alpha") || \ (${MACHINE_ARCH} == "vax") NOPIC= .endif |