Use CC instead of LD to link. NSPRPUB_CLIENT_BRANCH
authorcls%seawood.org
Fri, 09 Mar 2001 07:40:33 +0000
branchNSPRPUB_CLIENT_BRANCH
changeset 1774 5ce5515af95a0bc85c2d5734f75273d3ffdf16ba
parent 1772 c650cbd5857c2466a719357930f994da8fecb954
child 1775 7cfb5001a3af63f56253bb4994e2a21c4f6863b0
child 1777 e2cf28aabf52fc97330cde8413d48be1a273453d
push idunknown
push userunknown
push dateunknown
bugs61745
Use CC instead of LD to link. Thanks to martin@NetBSD.ORG (Martin Husemann) for the patch. Bug #61745 r=cls
config/NetBSD.mk
--- a/config/NetBSD.mk
+++ b/config/NetBSD.mk
@@ -47,21 +47,28 @@ DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
 endif
 
 ARCH			= netbsd
 
 ifeq ($(OBJECT_FMT),ELF)
 DLL_SUFFIX		= so
 else
 DLL_SUFFIX		= so.1.0
+# XXX work around a bug in the a.out ld(1).
+OS_LIBS			=
 endif
 
 DSO_CFLAGS		= -fPIC -DPIC
 DSO_LDFLAGS		=
-DSO_LDOPTS		= -x -shared
+DSO_LDOPTS		= -shared
+ifeq ($(OBJECT_FMT),ELF)
+DSO_LDOPTS		+=-Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
+endif
 
 ifdef LIBRUNPATH
-DSO_LDOPTS		+= -R$(LIBRUNPATH)
+#DSO_LDOPTS		+= -R$(LIBRUNPATH)
+DSO_LDOPTS		+= -Wl,-R$(LIBRUNPATH)
 endif
 
-MKSHLIB			= $(LD) $(DSO_LDOPTS)
+#MKSHLIB			= $(LD) $(DSO_LDOPTS)
+MKSHLIB			= $(CC) $(DSO_LDOPTS)
 
 G++INCLUDES		= -I/usr/include/g++