omniORB2 snapshot_971112

Andrey Slepuhin pooh@msu.ru
Fri, 21 Nov 1997 03:09:13 +0300


This is a multi-part message in MIME format.
--------------A97648AFD155B220DAFA26FB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Sai-Lai Lo wrote:
> >>>>> Andrey Slepuhin writes:
> > P.S. Now I'll try to build omniORB under egcs
> 
> I'm interested to know how you get on with this...
I have problems with AIX assembler during compilation of mosquerySK.cc
with egcs-971023. It seems that with egcs-971114 all is Ok.
(Indeed mosquerySK.cc is not used in omniORB testsuite, so I can build
testsuite successfully with both snapshots). But is it possible to split
some idl files to get smaller C++ sources? Otherwise, compilation needs
much resources (for example, compiling seq1SK.cc with egcs-971023 I saw
memory usage of 65Mb size/46Mb resources, and with egcs-9711114 only
53Mb/42Mb and compiling mosquerySK.cc with egcs-971114 I got 78Mb/43Mb
memory usage).
Here are additional patches for egcs. I had to rename global variable
lock in colocated_tests/server.cc to avoid ambiguity with libstdc++
and to remove duplicated friend declaration in omniInternal.h to avoid
unneeded warnings.
I run examples - they are Ok. Now trying testsuite...

Andrey.
--------------A97648AFD155B220DAFA26FB
Content-Type: text/plain; charset=us-ascii; name="egcs.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="egcs.diff"

diff -c -r /dev/null /home/pooh/src/snapshot_971112/mk/platforms/powerpc_aix_4.2_egcs.mk
*** /dev/null	Thu Nov 20 03:00:51 1997
--- /home/pooh/src/snapshot_971112/mk/platforms/powerpc_aix_4.2_egcs.mk	Wed Nov 19 15:16:20 1997
***************
*** 0 ****
--- 1,56 ----
+ #
+ # powerpc_aix_4.2.mk - make variables and rules specific to AIX 4.2 on 
+ #                      PowerPC.
+ #
+ 
+ AIX = 1
+ PowerPCProcessor = 1
+ 
+ #
+ # Include general unix things
+ #
+ 
+ include $(THIS_IMPORT_TREE)/mk/unix.mk
+ 
+ #
+ # C preprocessor macro definitions for this architecture
+ #
+ 
+ IMPORT_CPPFLAGS += -D__aix__ -D__powerpc__ -D__OSVERSION__=4
+ 
+ #
+ # Standard programs
+ #
+ 
+ AR              = ar cq
+ RANLIB		= ranlib
+ MKDIRHIER	= /usr/bin/X11/mkdirhier
+ CXX             = g++
+ CXXDEBUGFLAGS   = 
+ 
+ CXXLINK		= g++
+ CXXLINKOPTIONS	+= -mthreads
+ INSTALL         = installbsd -c
+ 
+ 
+ CC		= gcc
+ CMAKEDEPEND	= $(TOP)/$(BINDIR)/omkdepend
+ CLINK		= gcc
+ 
+ #
+ # CORBA stuff
+ #
+ 
+ CorbaImplementation = OMNIORB2
+ 
+ #
+ # OMNI thread stuff
+ #
+ 
+ ThreadSystem = Posix
+ 
+ OMNITHREAD_POSIX_CPPFLAGS = -DNoNanoSleep -DPthreadDraftVersion=8
+ OMNITHREAD_CPPFLAGS = -I$(TOP)/include -D_REENTRANT -mthreads
+ OMNITHREAD_LIB = -lomnithread -lpthreads
+ OMNITHREAD_STATIC_LIB = -lomnithread -lpthreads
+ 
diff -c -r snapshot_971112/config/config.mk /home/pooh/src/snapshot_971112/config/config.mk
*** snapshot_971112/config/config.mk	Thu Nov 13 22:08:18 1997
--- /home/pooh/src/snapshot_971112/config/config.mk	Wed Nov 19 14:45:30 1997
***************
*** 11,16 ****
--- 11,17 ----
  #platform = alpha_osf1_3.2
  #platform = alpha_osf1_4.0
  #platform = powerpc_aix_4.2
+ platform = powerpc_aix_4.2_egcs
  #platform = x86_nt_3.5           
  #platform = hppa_hpux_10.20
  
diff -c -r snapshot_971112/include/omniORB2/omniInternal.h /home/pooh/src/snapshot_971112/include/omniORB2/omniInternal.h
*** snapshot_971112/include/omniORB2/omniInternal.h	Mon Oct 20 22:32:25 1997
--- /home/pooh/src/snapshot_971112/include/omniORB2/omniInternal.h	Wed Nov 19 15:13:13 1997
***************
*** 462,468 ****
    inline void setRefCount(int count) { pd_refCount = count; return; }
  
    friend void omni::objectIsReady(omniObject *obj);
-   friend char * omni::objectToString(const omniObject *obj);
    friend void omni::objectDuplicate(omniObject *obj);
    friend omniObject *omni::locateObject(omniObjectManager*,omniObjectKey &k);
    friend void omni::disposeObject(omniObject *obj);
--- 462,467 ----
diff -c -r snapshot_971112/src/lib/omniORB2/sharedlib/dir.mk /home/pooh/src/snapshot_971112/src/lib/omniORB2/sharedlib/dir.mk
*** snapshot_971112/src/lib/omniORB2/sharedlib/dir.mk	Wed Nov 12 20:25:08 1997
--- /home/pooh/src/snapshot_971112/src/lib/omniORB2/sharedlib/dir.mk	Wed Nov 19 15:11:51 1997
***************
*** 166,172 ****
  
  
  ifdef AIX
! ifeq ($(notdir $(CXX)),xlc_r)
  
  libname = libomniORB$(major_version).so
  soname  = $(libname).$(minor_version)
--- 166,172 ----
  
  
  ifdef AIX
! ifeq ($(notdir $(CXX)),xlC_r)
  
  libname = libomniORB$(major_version).so
  soname  = $(libname).$(minor_version)
***************
*** 177,185 ****
          $(RM) $@; \
          makeC++SharedLib \
               -o $@ $(IMPORT_LIBRARY_FLAGS) \
-          $(patsubst %,-R %,$(IMPORT_LIBRARY_DIRS)) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
           -lC -lc_r -lc -p 40; \
         )
  
  all:: $(lib)
--- 177,213 ----
          $(RM) $@; \
          makeC++SharedLib \
               -o $@ $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
           -lC -lc_r -lc -p 40; \
+        )
+ 
+ all:: $(lib)
+ 
+ clean::
+ 	$(RM) $(lib)
+ 
+ export:: $(lib)
+ 	@$(ExportLibrary)
+ 	@(set -x; \
+           cd $(EXPORT_TREE)/$(LIBDIR); \
+           $(RM) $(soname); \
+           ln -s $(lib) $(soname); \
+           $(RM) $(libname); \
+           ln -s $(soname) $(libname); \
+          )
+ endif
+ ifeq ($(notdir $(CXX)),g++)
+ 
+ libname = libomniORB$(major_version).so
+ soname  = $(libname).$(minor_version)
+ lib = $(soname).$(micro_version)
+ 
+ $(lib): $(ORB2_OBJS)
+ 	(set -x; \
+         $(RM) $@; \
+         $(CXXLINK) -shared -mthreads \
+              -o $@ $(IMPORT_LIBRARY_FLAGS) \
+          $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) ; \
         )
  
  all:: $(lib)
diff -c -r snapshot_971112/src/lib/omnithread/sharedlib/dir.mk /home/pooh/src/snapshot_971112/src/lib/omnithread/sharedlib/dir.mk
*** snapshot_971112/src/lib/omnithread/sharedlib/dir.mk	Wed Nov 12 20:30:24 1997
--- /home/pooh/src/snapshot_971112/src/lib/omnithread/sharedlib/dir.mk	Wed Nov 19 15:11:23 1997
***************
*** 131,137 ****
  endif
  
  ifdef AIX
! ifeq ($(notdir $(CXX)),xlc_r)
  
  libname = libomnithread.so
  soname  = $(libname).$(minor_version)
--- 131,137 ----
  endif
  
  ifdef AIX
! ifeq ($(notdir $(CXX)),xlC_r)
  
  libname = libomnithread.so
  soname  = $(libname).$(minor_version)
***************
*** 142,150 ****
          $(RM) $@; \
          makeC++SharedLib \
               -o $@ $(IMPORT_LIBRARY_FLAGS) \
-          $(patsubst %,-R %,$(IMPORT_LIBRARY_DIRS)) \
           $(filter-out $(LibSuffixPattern),$^) \
!          -lC -lc_r -lc -p 40; \
         )
  
  all:: $(lib)
--- 142,179 ----
          $(RM) $@; \
          makeC++SharedLib \
               -o $@ $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) \
!          -lC -lpthreads -lc_r -lc -p 40; \
!        )
! 
! all:: $(lib)
! 
! clean::
! 	$(RM) $(lib)
! 
! export:: $(lib)
! 	@$(ExportLibrary)
! 	@(set -x; \
!           cd $(EXPORT_TREE)/$(LIBDIR); \
!           $(RM) $(soname); \
!           ln -s $(lib) $(soname); \
!           $(RM) $(libname); \
!           ln -s $(soname) $(libname); \
!          )
! endif
! ifeq ($(notdir $(CXX)),g++)
! 
! libname = libomnithread.so
! soname  = $(libname).$(minor_version)
! lib = $(soname).$(micro_version)
! 
! $(lib): $(OBJS)
! 	(set -x; \
!         $(RM) $@; \
!         $(CXXLINK) -shared -mthreads \
!              -o $@ $(IMPORT_LIBRARY_FLAGS) \
!          $(filter-out $(LibSuffixPattern),$^) \
!          -lpthreads ; \
         )
  
  all:: $(lib)
diff -c -r snapshot_971112/src/tests/omniORB2_testsuite/colocated_tests/server.cc /home/pooh/src/snapshot_971112/src/tests/omniORB2_testsuite/colocated_tests/server.cc
*** snapshot_971112/src/tests/omniORB2_testsuite/colocated_tests/server.cc	Mon Nov 10 19:46:10 1997
--- /home/pooh/src/snapshot_971112/src/tests/omniORB2_testsuite/colocated_tests/server.cc	Wed Nov 19 17:32:14 1997
***************
*** 9,16 ****
  
  CORBA::BOA_ptr boa;
  
! omni_mutex     lock;
! omni_condition cond(&lock);
  CORBA::Boolean block = 1;
  
  class Echo_i : public virtual _sk_Echo {
--- 9,16 ----
  
  CORBA::BOA_ptr boa;
  
! omni_mutex     lock_;
! omni_condition cond(&lock_);
  CORBA::Boolean block = 1;
  
  class Echo_i : public virtual _sk_Echo {
***************
*** 44,50 ****
  void
  attrObjRef_i::obj (CORBA::Object_ptr  _value)
  {
!   omni_mutex_lock sync(lock);
    if (!CORBA::is_nil(_value)) {
      cerr << "attrObjRef_i::obj: checking if the object exists...";
      if (_value->_non_existent()) {
--- 44,50 ----
  void
  attrObjRef_i::obj (CORBA::Object_ptr  _value)
  {
!   omni_mutex_lock sync(lock_);
    if (!CORBA::is_nil(_value)) {
      cerr << "attrObjRef_i::obj: checking if the object exists...";
      if (_value->_non_existent()) {
***************
*** 126,132 ****
  
    while (1) {
      {
!       omni_mutex_lock sync(lock);
        cerr << "Main thread block waiting for client to set Attribute Object...."
  	   << endl;
        while (block) {
--- 126,132 ----
  
    while (1) {
      {
!       omni_mutex_lock sync(lock_);
        cerr << "Main thread block waiting for client to set Attribute Object...."
  	   << endl;
        while (block) {

--------------A97648AFD155B220DAFA26FB--