Subject: building shared libs on NetBSD?
To: None <egcs-bugs@egcs.cygnus.com>
From: David Wetzel <dave@turbocat.de>
List: netbsd-help
Date: 03/18/1999 03:56:54
Hi,
I have a problem with shared objc libs on NetBSD/i386:
gcc -c -DGNUSTEP_INSTALL_PREFIX=/usr/GNUstep
-DGNUSTEP_TARGET_DIR=\"ix86/netbsd1.3.2\" -DGNUSTEP_TARGET_CPU=\"ix86\"
-DGNUSTEP_TARGET_OS=\"netbsd1.3.2\" -DLIBRARY_COMBO=\"gnu-gnu-gnu-xraw\"
-DGNUSTEP -DGNUSTEP_VERSION=0.5.5 -DGNUSTEP_MAJOR_VERSION=0
-DGNUSTEP_MINOR_VERSION=5 -fPIC -g -O2 -Wno-import -fgnu-runtime
-I./srcdir-include -I./ix86/netbsd1.3.2 -I. -I/usr/local/include
-I/usr/X11R6/include -I/nowhere/Headers -o
shared_obj/ix86/netbsd1.3.2/gnu-gnu-gnu-xraw/BinaryCStream.o BinaryCStream.m
/var/tmp/cclZ2ckh.s: Assembler messages:
/var/tmp/cclZ2ckh.s:11383: Warning: GOT relocation burb:
`__OBJC_CLASS_BinaryCStream' should be global
/var/tmp/cclZ2ckh.s:11383: Warning: GOT relocation burb:
`__OBJC_CLASS_BinaryCStream' should be global
dave@alice>as -v
GNU assembler version 1.92.3, NetBSD $Revision: 1.3 $
dave@alice>gcc -v
Reading specs from
/usr/local/lib/gcc-lib/i386-unknown-netbsd1.3.2/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
I tried to compile GNUstep base. My target.make was:
(....)
####################################################
#
# NetBSD
#
ifeq ($(findstring netbsd, $(GNUSTEP_TARGET_OS)), netbsd)
# This is disabled temporarily, because I don't know exactly how
# to link shared libs. Everything seems to link correctly now but
# constructor functions in the shared lib failed to get called
# when the lib is loaded in. I don't know why. ASF.
HAVE_SHARED_LIBS = yes
SHARED_LIB_LINK_CMD = \
$(CC) -shared -Wl,-soname,$(VERSION_LIBRARY_FILE) \
-o $(GNUSTEP_OBJ_DIR)/$(VERSION_LIBRARY_FILE) $^ /usr/lib/c++rt0.o;\
(cd $(GNUSTEP_OBJ_DIR); \
rm -f $(LIBRARY_FILE); \
$(LN_S) $(VERSION_LIBRARY_FILE) $(LIBRARY_FILE))
SHARED_CFLAGS += -fPIC
SHARED_LIBEXT = .so
HAVE_BUNDLES = yes
BUNDLE_LD = $(CC)
BUNDLE_CFLAGS += -fPIC
BUNDLE_LDFLAGS += -shared
ADDITIONAL_LDFLAGS += -rdynamic
endif
#
# end NetBSD
#
####################################################
(...)
What is wrong here?
Thanks in advance.
---
_ _
_(_)(_)_ David Wetzel, Turbocat's Development,
(_) __ (_) Buchhorster Strasse, D-16567 Muehlenbeck/Berlin, FRG,
_/ \_ Fax +49 33056 82835 NeXTmail dave@turbocat.de
(______) http://www.turbocat.de/
DEVELOPMENT * CONSULTING * ADMINISTRATION
WATCH OUT FOR TURBOFAX for OPENSTEP!