[omniORB] Makefile for AIX

Peter Ledbrook p.ledbrook@psenterprise.com
Tue, 12 Oct 1999 12:48:22 +0100


Hi,

There's a slight problem in the omniDynamic/sharedlib/dir.mk, although
the same problem might exist elsewhere. Here is the code section:

ifeq ($(notdir $(CXX)),xlC_r)

$(dynlib): $(DYN2_OBJS)
 (set -x; \
        $(RM) $@; \
        $(MAKECPPSHAREDLIB) \
             -o $(dynsoname) $(IMPORT_LIBRARY_FLAGS) \
         $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
         -L../../orbcore/sharedlib -l$(libcorename) -p 40; \
         ar cq $(dynlib) $(dynsoname); \
         $(RM) $(dynsoname); \
       )

endif

ifeq ($(notdir $(CXX)),g++)

$(dynlib): $(DYN2_OBJS)
 (set -x; \
         $(RM) $@; \
         $(CXXLINK) -shared -mthreads \
              -o $(dynsoname) $(IMPORT_LIBRARY_FLAGS) \
          $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
         ../../orbcore/sharedlib/$(lib);
\                                                   << Here's the
problem
         ar cq $(dynlib) $(dynsoname); \
         $(RM) $(dynsoname); \
       )

endif

g++ still uses the underlying system linker, ld, which means the above
bit of code generates a 'hard' link (what the linker calls an ipath) to
libomniORB27.so.a. The solution was provided for xlC_r but it is also
required for gcc. So,

   ../../orbcore/sharedlib/$(lib); \

should be replaced by

   -L../../orbcore/sharedlib -l$(libcorename); \

Hope this all makes sense! I'm not in my most coherent of states.
Anyway, to get round these problems, it might be worth specifying a
platform linker flag:

  -bnoipath  // For xlC_r

or

  -Xlinker -noipath  // For g++

that is used for ALL linking.

Any queries about this, don't hesitate to ask.

Cheers,

Peter