[omniORB] Build omniOrb in LynxOS
Jessie Ragsdale
jessie.ragsdale@latuslw.com
Thu, 19 Jul 2001 12:20:44 -0500
Here are the patches to support LynxOS 3.1 for the ppc.
Jessie
------------------------------------------------
diff -c -r omni/config/config.mk omni.new/config/config.mk
*** omni/config/config.mk Mon Jun 18 12:43:01 2001
--- omni.new/config/config.mk Thu Jul 19 10:49:53 2001
***************
*** 23,28 ****
--- 23,29 ----
# powerpc_aix_4.2_xlc5 IBM AIX 4.2, XLC 5.0 (a.k.a. Visual Age 5.0)
# powerpc_aix_4.3_xlc5 IBM AIX 4.3, XLC 5.0 (a.k.a. Visual Age 5.0)
# powerpc_linux_2.2_glibc PowerPC linux, Debian
+ # powerpc_lynxos_3.1 PowerPC LynxOS 3.1.0
# powerpc_darwin_1.3 PowerPC Darwin/Mac OS X
# hppa_hpux_10.20 HPUX 10.20, aC++ B3910B A.01.04
# hppa_hpux_11.00 HPUX 11.00, aC++ B3910B A.01.04
***************
*** 63,68 ****
--- 64,70 ----
#platform = powerpc_aix_4.2_xlc5
#platform = powerpc_aix_4.3_xlc5
#platform = powerpc_linux_2.2_glibc
+ #platform = powerpc_lynxos_3.1
#platform = powerpc_darwin_1.3
#platform = hppa_hpux_10.20
#platform = hppa_hpux_11.00
***************
*** 82,87 ****
--- 84,90 ----
#platform = x86_freebsd_4.0
#platform = pc486_rtems_4.5.0
+
# On Win32 platforms, uncomment the following line to build all the binaries
# with debugging information. Useful if you want to debug the binaries under
# MSVC developer's studio
diff -c -r omni/include/omnithread.h omni.new/include/omnithread.h
*** omni/include/omnithread.h Mon Jun 18 12:43:01 2001
--- omni.new/include/omnithread.h Thu Jul 19 10:52:54 2001
***************
*** 157,162 ****
--- 157,165 ----
#elif defined(__darwin__)
#include <omnithread/posix.h>
+ #elif defined(__lynxos__)
+ #include <omnithread/posix.h>
+
#else
#error "No implementation header file"
#endif
diff -c -r omni/mk/platforms/powerpc_lynxos_3.1.mk omni.new/mk/platforms/powerpc_lynxos_3.1.mk
*** omni/mk/platforms/powerpc_lynxos_3.1.mk Thu Jul 19 11:36:37 2001
--- omni.new/mk/platforms/powerpc_lynxos_3.1.mk Thu Jul 19 10:51:36 2001
***************
*** 0 ****
--- 1,143 ----
+ #
+ # powerpc_lynxos_3.1.mk - make variables and rules specific to LynxOS 3.1
+ #
+
+ # ENV_PREFIX is the standard LynxOS variable for the
+ # location of the Lynx distribution.
+
+ # TOOLDIR and TOOLDIR2 are set up for cross-development under
+ # solaris. If you build natively under LynxOS, uncomment
+ # the last TOOLDIRs.
+ TOOLDIR = $(ENV_PREFIX)/cdk/sunos-xcoff-ppc/bin
+ TOOLDIR2 = $(ENV_PREFIX)/cdk/sunos-xcoff-ppc/usr/bin
+ #TOOLDIR = /bin
+ #TOOLDIR2 = /usr/bin
+
+ LynxOS = 1
+ PowerPCProcessor = 1
+
+ ABSTOP = $(shell cd $(TOP); pwd)
+
+ #
+ # Python set-up
+ #
+ # You must set a path to a Python 1.5.2 interpreter. If you do not
+ # wish to make a complete installation, you may download a minimal
+ # Python from ftp://ftp.uk.research.att.com/pub/omniORB/python/
+ # In that case, uncomment the first line below.
+
+ #PYTHON = $(ABSTOP)/$(BINDIR)/omnipython
+ #PYTHON = /usr/local/bin/python
+
+
+ #
+ # Include general unix things
+ #
+
+ include $(THIS_IMPORT_TREE)/mk/unix.mk
+
+
+ #
+ # C preprocessor macro definitions for this architecture
+ #
+
+ IMPORT_CPPFLAGS += -D__powerpc__ -D__lynxos__ -D__OSVERSION__=3
+
+ #
+ # Standard programs
+ #
+
+ AR = $(TOOLDIR)/ar cq
+
+ MKDIRHIER = mkdirhier
+ INSTALL = $(BASE_OMNI_TREE)/bin/scripts/install-sh -c
+
+ CPP = $(TOOLDIR)/cpp
+
+ #
+ #
+ CC = $(TOOLDIR)/gcc
+ COPTIONS = -mthreads
+ CMAKEDEPEND += -D__GNUC__
+ DEBUGFLAGS = -O
+ CLINK = $(CC)
+ CLINKOPTIONS = $(CDEBUGFLAGS) $(COPTIONS)
+
+
+ CXX = $(TOOLDIR2)/g++
+ CXXOPTIONS = -mthreads
+ CXXMAKEDEPEND += -D__cplusplus -D__GNUG__ -D__GNUC__
+ CXXDEBUGFLAGS = -O2
+ CXXLINK = $(CXX)
+ CXXLINKOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS)
+
+ #
+ # Socket library
+ #
+
+ SOCKET_LIB = -lbsd -lnsl -lstdc++ -lrpc
+
+
+ #
+ # CORBA stuff
+ #
+
+ omniORBGatekeeperImplementation = OMNIORB_TCPWRAPGK
+ CorbaImplementation = OMNIORB
+
+ #
+ # OMNI thread stuff
+ #
+
+ ThreadSystem = Posix
+
+ OMNITHREAD_POSIX_CPPFLAGS = -DPthreadDraftVersion=10 \
+ -DPthreadSupportThreadPriority
+
+ OMNITHREAD_LIB = $(patsubst %,$(LibSearchPattern),omnithread)
+
+ OMNITHREAD_CPPFLAGS = -D_REENTRANT -DUsePthread
+
+
+
+ lib_depend := $(patsubst %,$(LibPattern),omnithread)
+ OMNITHREAD_LIB_DEPEND := $(GENERATE_LIB_DEPEND)
+
+ # Default location of the omniORB configuration file [falls back to this if
+ # the environment variable OMNIORB_CONFIG is not set] :
+
+ OMNIORB_CONFIG_DEFAULT_LOCATION = /etc/omniORB.cfg
+
+ # Default directory for the omniNames log files.
+ OMNINAMES_LOG_DEFAULT_LOCATION = /var/omninames
+
+ #
+ # Shared Library support.
+ #
+ # Platform specific customerisation.
+ # everything else is default from unix.mk
+ #
+ ifeq ($(notdir $(CXX)),CC)
+
+ BuildSharedLibrary = 0 # Disable since they are difficult to build for Lynx 3.1 for PPC
+
+ SHAREDLIB_CPPFLAGS = -KPIC
+
+ SharedLibraryPlatformLinkFlagsTemplate = -G -h $$soname
+
+ ifeq ($(notdir $(CC)),gcc)
+ SHAREDLIB_CFLAGS = -fPIC
+ endif
+
+ endif
+
+ ifeq ($(notdir $(CXX)),g++)
+
+ BuildSharedLibrary = 0 # Disable
+
+ SHAREDLIB_CPPFLAGS = -fPIC
+
+ SharedLibraryPlatformLinkFlagsTemplate = -shared -Wl,-h,$$soname
+
+ endif
+
diff -c -r omni/src/lib/omnithread/posix.cc omni.new/src/lib/omnithread/posix.cc
*** omni/src/lib/omnithread/posix.cc Mon Jun 18 12:43:00 2001
--- omni.new/src/lib/omnithread/posix.cc Thu Jul 19 10:53:19 2001
***************
*** 601,606 ****
--- 601,613 ----
if (detached)
throw omni_thread_invalid();
+ #if defined(__lynxos__)
+ // LynxOs 3.1 requires a real void** status argument to pthread_join
+ void *newstatus;
+ if (status == 0)
+ status = &newstatus;
+ #endif
+
DB(cerr << "omni_thread::join: doing pthread_join\n");
THROW_ERRORS(pthread_join(posix_thread, status));
diff -c -r omni/src/tool/omniidl/cxx/cccp/config-lynxos.h omni.new/src/tool/omniidl/cxx/cccp/config-lynxos.h
*** omni/src/tool/omniidl/cxx/cccp/config-lynxos.h Thu Jul 19 11:08:45 2001
--- omni.new/src/tool/omniidl/cxx/cccp/config-lynxos.h Thu Jul 19 10:52:12 2001
***************
*** 0 ****
--- 1,11 ----
+ #if defined(__powerpc__)
+
+ #define SIZEOF_UNSIGNED_CHAR 1
+ #define SIZEOF_INT 4
+ #define HAVE_STDLIB_H 1
+ #define HAVE_STRERROR 1
+
+ #else
+ #error "You must set definitions for your architecture in config-lynx.h"
+
+ #endif
diff -c -r omni/src/tool/omniidl/cxx/cccp/config.h omni.new/src/tool/omniidl/cxx/cccp/config.h
*** omni/src/tool/omniidl/cxx/cccp/config.h Mon Jun 18 12:42:59 2001
--- omni.new/src/tool/omniidl/cxx/cccp/config.h Thu Jul 19 10:52:20 2001
***************
*** 34,39 ****
--- 34,42 ----
#elif defined(__darwin__)
#include "config-darwin.h"
+ #elif defined(__lynxos__)
+ #include "config-lynxos.h"
+
#else
#error "You must create a cccp config file for your platform"
Duncan Grisby wrote:
> Pleas can you send your patches to the list (or just me if they're
> big), so they can be integrated with the distribution.