build Alpha shared libraries with ${CC} rather than ${LD}, because cc

understands how to do the c run-time startup magic necessary for shared
libraries and ld doesn't.
This commit is contained in:
cgd 1996-12-17 21:05:40 +00:00
parent 282e39f88d
commit 47b997f2e0
1 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.lib.mk,v 1.75 1996/11/30 02:18:54 jtc Exp $
# $NetBSD: bsd.lib.mk,v 1.76 1996/12/17 21:05:40 cgd Exp $
# @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
.if exists(${.CURDIR}/../Makefile.inc)
@ -128,9 +128,10 @@ lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}_pic.a ${DPADD}
$(LD) -x -Bshareable -Bforcearchive \
-o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} lib${LIB}_pic.a ${LDADD}
.else
$(LD) -shared -o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
-soname lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
--whole-archive lib${LIB}_pic.a --no-whole-archive ${LDADD}
${CC} -shared -o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
-Wl,-soname,lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \
-Wl,--whole-archive lib${LIB}_pic.a -Wl,--no-whole-archive \
${LDADD} -nostdlib
.endif
LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}