[omniORB] FW: Bug#37303: patch to enable omniorb to compile on powerpc pota
to.
Brent Fulgham
bfulgham@xpsystems.com
Fri, 7 May 1999 13:37:56 -0700
Greetings everyone.
The following patch was forwarded to me by another Debian user who got
OmniORB to compile under powerpc. "Potato" is our upcoming release level.
Could Sai-Lai or Duncan add this to the upstream code so others may benefit
from it?
Thanks,
-Brent
-----Original Message-----
From: Konstantinos Margaritis [mailto:kmargar@cc.uoa.gr]
Sent: Friday, May 07, 1999 9:16 AM
To: debian-bugs-dist@lists.debian.org
Cc: bfulgham@debian.org
Subject: Bug#37303: patch to enable omniorb to compile on powerpc
potato.
Package: omniorb
Version: 2.7.1-2
Here is the patch:
-------------------
diff -ruN omniorb-2.7.1.orig/config/config.mk omniorb-2.7.1/config/config.mk
--- omniorb-2.7.1.orig/config/config.mk Fri May 7 19:00:51 1999
+++ omniorb-2.7.1/config/config.mk Fri May 7 19:02:37 1999
@@ -18,6 +18,7 @@
# alpha_nt_4.0 Alpha Windows NT 4.0, MS VC++ 5.0
# i586_linux_2.0_glibc x86 Redhat linux 5.1,egcs-980302 or later
snapshot
# alpha_linux_2.0 alpha Redhat linux 5.1, egcs-1.1 (when
released)
+# powerpc_linux_2.2_glibc powerpc linux 2.2, glibc 2.1, egcs 1.1
# powerpc_aix_4.2_egcs power PC AIX 4.2, egcs-1.0+eh_path
# m68k_nextstep_3.3 NextStep 3.3, gcc-2.7.2
# mips_sinux_5.43 Reliant UNIX from Siemens-Nixdorf (SNI)
@@ -38,8 +39,9 @@
#platform = x86_nt_4.0
#platform = x86_win95
#platform = alpha_nt_4.0
-platform = i586_linux_2.0_glibc
+#platform = i586_linux_2.0_glibc
#platform = alpha_linux_2.0
+platform = powerpc_linux_2.2_glibc
#platform = powerpc_aix_4.2_egcs
#platform = m68k_nextstep_3.3
#platform = mips_sinux_5.43
diff -ruN omniorb-2.7.1.orig/include/omniORB2/CORBA_sysdep.h
omniorb-2.7.1/include/omniORB2/CORBA_sysdep.h
--- omniorb-2.7.1.orig/include/omniORB2/CORBA_sysdep.h Thu Jan 7 20:17:51
1999
+++ omniorb-2.7.1/include/omniORB2/CORBA_sysdep.h Fri May 7 17:44:21
1999
@@ -261,6 +261,9 @@
# if !defined(__WIN32__)
# define _HAS_SIGNAL 1
# endif
+#elif defined(__linux__) && defined(__powerpc__)
+# define _OMNIORB_HOST_BYTE_ORDER_ 0
+# define _HAS_SIGNAL 1
#elif defined(__aix__) && defined(__powerpc__)
# define _OMNIORB_HOST_BYTE_ORDER_ 0
# define _HAS_SIGNAL 1
diff -ruN omniorb-2.7.1.orig/mk/platforms/powerpc_linux_2.2_glibc.mk
omniorb-2.7.1/mk/platforms/powerpc_linux_2.2_glibc.mk
--- omniorb-2.7.1.orig/mk/platforms/powerpc_linux_2.2_glibc.mk Thu Jan 1
02:00:00 1970
+++ omniorb-2.7.1/mk/platforms/powerpc_linux_2.2_glibc.mk Fri May 7
17:13:16 1999
@@ -0,0 +1,83 @@
+#
+# powerpc_linux_2.2_glibc.mk - make variables and rules specific to Linux
2.2
+# and glibc-2.1 for powerpc
+#
+
+Linux = 1
+PowerPCProcessor = 1
+
+#
+# Include general unix things
+#
+
+include $(THIS_IMPORT_TREE)/mk/unix.mk
+
+
+#
+# Standard programs
+#
+
+AR = ar cq
+
+CPP = /usr/bin/cpp
+
+CXX = /usr/bin/g++
+CXXMAKEDEPEND = $(TOP)/$(BINDIR)/omkdepend -D__cplusplus -D__GNUG__
-D__GNUC__
+CXXDEBUGFLAGS = -O2
+
+CXXLINK = $(CXX)
+CXXLINKOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) \
+ $(patsubst
%,-Wl$(comma)-rpath$(comma)%,$(IMPORT_LIBRARY_DIRS))
+
+CXXOPTIONS = -Wall -Wno-unused
+EgcsMajorVersion = 1
+EgcsMinorVersion = 1 # This is actually a post-1.0 egcs snapshot.
+
+CC = /usr/bin/gcc
+CMAKEDEPEND = $(TOP)/$(BINDIR)/omkdepend -D__GNUC__
+CDEBUGFLAGS = -O
+
+CLINK = $(CC)
+CLINKOPTIONS = $(CDEBUGFLAGS) $(COPTIONS)
+
+INSTALL = install -c
+
+IMPORT_CPPFLAGS += -D__powerpc__ -D__linux__ -D__OSVERSION__=2
+
+
+#
+# CORBA stuff
+#
+
+omniORB2GatekeeperImplementation = OMNIORB2_TCPWRAPGK
+CorbaImplementation = OMNIORB2
+
+#
+# OMNI thread stuff
+#
+
+ThreadSystem = Posix
+OMNITHREAD_POSIX_CPPFLAGS = -DNoNanoSleep
+OMNITHREAD_CPPFLAGS = -D_REENTRANT
+OMNITHREAD_LIB = $(patsubst %,$(LibSearchPattern),omnithread)
+
+ifndef UseMITthreads
+OMNITHREAD_POSIX_CPPFLAGS += -DPthreadDraftVersion=10
+OMNITHREAD_LIB += -lpthread
+else
+OMNITHREAD_POSIX_CPPFLAGS += -DPthreadDraftVersion=8
+OMNITHREAD_CPPFLAGS += -D_MIT_POSIX_THREADS
+OMNITHREAD_LIB += -lpthreads
+endif
+
+lib_depend := $(patsubst %,$(LibPattern),omnithread)
+OMNITHREAD_LIB_DEPEND := $(GENERATE_LIB_DEPEND)
+
+
+# Default location of the omniORB2 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/log/omninames\"
-------------------
--
Konstantinos Margaritis