[omniORB] shared libraries on Linux/egcs
Sai-Lai Lo
S.Lo@orl.co.uk
19 Aug 1998 12:28:43 +0100
>>>>> Kasper Peeters writes:
> With egcs 1.0.3, shared libraries with exceptions should work
> fine on Linux (at least I didn't experience any problems so far).
> Are there any patches to enable building omniORB with shared
> libraries for this platform?
Yes, I've received several report that it is now possible to build shared
libraries with egcs. I haven't tested this myself. If there is any problem
it is most likely to be in throwing exceptions in shared library. You
should also aware that egcs-1.0.3 does not have thread safe exception
handling but mostly work on x86 linux. If you are using other platforms,
wait for egcs-1.1 or try the egcs development snapshot.
Christopher Wood sent me this change to build shared library with egcs, you
may want to try this out.
Sai-Lai
------------------------ cut here --------------------------------
>From: CHRISTOPHER WOOD <chrisw@cs.uwa.edu.au>
>Subject: Re: [omniORB] Updated bug list
>To: Sai-Lai Lo <S.Lo@orl.co.uk>
>Date: Tue, 11 Aug 1998 15:37:04 +0800 (WST)
X-From-Line: chrisw@pent-403.cs.uwa.edu.au Tue Aug 11 08:36:17 1998
Received: from pent-403.cs.uwa.edu.au [130.95.1.183]
by shallot.cam-orl.co.uk with esmtp (Exim 1.73 #1)
id 0z68yd-0006tm-00; Tue, 11 Aug 1998 08:36:16 +0100
Received: from localhost (chrisw@localhost)
by pent-403.cs.uwa.edu.au (8.8.7/8.8.7) with SMTP id PAA13078
for <S.Lo@orl.co.uk>; Tue, 11 Aug 1998 15:37:04 +0800
In-Reply-To: <199808101924.UAA05895@santaka.cam-orl.co.uk>
Message-ID: <Pine.LNX.3.96.980811153030.13061A-100000@pent-403.cs.uwa.edu.au>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Lines: 77
Xref: santaka.cam-orl.co.uk mail.misc:398
X-Gnus-Article-Number: 398 Tue Aug 11 09:13:07 1998
>On Mon, 10 Aug 1998, Sai-Lai Lo wrote:
In addition to my previous message i've found it's possible to compile
shared libaries under egcs-1.0.3 (instead of the default which is static
libaries only).
i don't have a diff but here are the extra lines i added to
src/lib/omniORB2/shared. Almost identical to the solaris rules with a few
minor changes.
#############################################################################
# Make rules for Linux egcs
#
#############################################################################
ifdef Linux
DIR_CPPFLAGS += -fPIC
libname = libomniORB$(major_version).so
soname = $(libname).$(minor_version)
lib = $(soname).$(micro_version)
lclibname = libomniLC.so
lcsoname = $(lclibname).$(lc_minor_version)
lclib = $(lcsoname).$(lc_micro_version)
all:: $(lib)
all:: $(lclib)
$(lib): $(ORB2_OBJS)
(set -x; \
$(RM) $@; \
$(CXX) -shared -Wl,-soname,$(soname) -o $@ $(IMPORT_LIBRARY_FLAGS)
\
$(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB); \
)
$(lclib): $(LC_OBJS)
(set -x; \
$(RM) $@; \
$(CXX) -shared -Wl,-soname,$(lcsoname) -o $@
$(IMPORT_LIBRARY_FLAGS) \
$(filter-out $(LibSuffixPattern),$(LC_OBJS)) \
$(OMNITHREAD_LIB) $(lib); \
)
clean::
$(RM) $(lib) $(lclib)
export:: $(lib)
@$(ExportLibrary)
@(set -x; \
cd $(EXPORT_TREE)/$(LIBDIR); \
$(RM) $(soname); \
ln -s $(lib) $(soname); \
$(RM) $(libname); \
ln -s $(soname) $(libname); \
)
export:: $(lclib)
@$(ExportLibrary)
@(set -x; \
cd $(EXPORT_TREE)/$(LIBDIR); \
$(RM) $(lcsoname); \
ln -s $(lclib) $(lcsoname); \
$(RM) $(lclibname); \
ln -s $(lcsoname) $(lclibname); \
)
endif
--
Dr. Sai-Lai Lo | Research Scientist
|
E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab
| 24a Trumpington Street
Tel: +44 223 343000 | Cambridge CB2 1QA
Fax: +44 223 313542 | ENGLAND