[omniORB] omniORB_2.7.1 changes for AIX 4.3 + xlc 3.6.4.0

Mark D. Landry mdlandry@lincoln.midcoast.com
Tue, 04 May 1999 07:51:32 -0400


Here's an update after further testing:

In mk/platforms/powerpc_aix_4.2.mk, change:
OMNITHREAD_POSIX_CPPFLAGS = -DNoNanoSleep -DPthreadDraftVersion=8
to:
OMNITHREAD_POSIX_CPPFLAGS = -DNoNanoSleep -DPthreadDraftVersion=10

Apply the following changes to posix.cc:
$ diff posix.cc.omniORB_2.7.1 posix.cc
769a770,772
> #if defined(__aix__)
>     timestruc_t rqts = { secs, nanosecs }, rmtp;
> #else
770a774
> #endif
783c787
< #elif defined(__linux__) || defined(__aix__)
---
> #elif defined(__linux__)
789a794,798
>
> #elif defined(__aix__)
>
>     if (nsleep(&rqts, &rmtp) != 0)
>       throw omni_thread_fatal(errno);

Include the sharedlib changes from before...

Mark D. Landry wrote:

> Here's what I did to get omniORB_2.7.1 working under AIX 4.3 + xlC 3.6.4.0.
> Many thanks to Gary Duzan for pointers in the right direction.
>
> In mk/platforms/powerpc_aix_4.2.mk, change:
> OMNITHREAD_POSIX_CPPFLAGS = -DNoNanoSleep -DPthreadDraftVersion=8
> to:
> OMNITHREAD_POSIX_CPPFLAGS = -DPthreadDraftVersion=10
>
> Do NOT add  "-DPthreadSupportThreadPriority". omnithread/posix.cc needs to be
> reworked before this can be
> used on AIX. Specifically, pthread_setschedparam() is unsupported in 4.3.
>
> In all the 'sharedlib/dir.mk' files under src, change the command
> 'makeC++SharedLib_r' to 'makeC++SharedLib' and move all options (e.g, -p 40)
> _before_ the *.o files (i.e., $(filter-out $(LibSuffixPattern),$^) must be
> last.)
>
> Here's an example from src/lib/omnithread/sharedlib/dir.mk:
> ...
>        /usr/lpp/xlC/bin/makeC++SharedLib \
>              -lpthreads -p 40 \
>              -o $(soname) $(IMPORT_LIBRARY_FLAGS) \
>          $(filter-out $(LibSuffixPattern),$^) ; \
> ...
>
> (It's not clear to me if '-lpthreads' is required in the above statement.)