[omniORB] FW: Bug#37303: patch to enable omniorb to compile o n powerpc potato.

Brent Fulgham bfulgham@xpsystems.com
Mon, 10 May 1999 13:32:31 -0700


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------ =_NextPart_000_01BE9B24.3AB3F120
Content-Type: text/plain

I'm CC'ing the list, since this may be a problem for others as well:

> > 
> > 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
> 
> I'm interested in trying this patch, but can't seem to get it 
> to apply. 
> Do you have it in a more standard patch form?
> 
> Thanks,
> mike.
>
I'm attaching the diff file I am using internally for Debian's distribution.
It's in standard unified diff format.  I had to edit it a bit (to remove
a bunch of lifecycle code updates that Duncan did as a separate patch).
This
should not introduce any problems, but I haven't used this diff to compile,
so there may be a typo someplace -- be warned!

Thanks,

-Brent
 


------ =_NextPart_000_01BE9B24.3AB3F120
Content-Type: application/octet-stream;
	name="powerpc.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="powerpc.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 =3D x86_nt_4.0
 #platform =3D x86_win95
 #platform =3D alpha_nt_4.0
-platform =3D i586_linux_2.0_glibc
+#platform =3D i586_linux_2.0_glibc
 #platform =3D alpha_linux_2.0
+platform =3D powerpc_linux_2.2_glibc
 #platform =3D powerpc_aix_4.2_egcs
 #platform =3D m68k_nextstep_3.3
 #platform =3D mips_sinux_5.43
diff -ruN omniorb-2.7.1.orig/debian/control =
omniorb-2.7.1/debian/control
--- omniorb-2.7.1.orig/debian/control	Fri May  7 19:00:51 1999
+++ omniorb-2.7.1/debian/control	Fri May  7 19:01:45 1999
@@ -5,7 +5,7 @@
 Standards-Version: 2.4.0.0
=20
 Package: omniorb
-Architecture: i386 alpha
+Architecture: i386 alpha powerpc
 Depends: libstdc++2.9=20
 Description: An object request broker (ORB) implementation
  omniorb is a freely available Common Object Request Broker
diff -ruN omniorb-2.7.1.orig/debian/rules omniorb-2.7.1/debian/rules
--- omniorb-2.7.1.orig/debian/rules	Fri May  7 19:00:51 1999
+++ omniorb-2.7.1/debian/rules	Fri May  7 19:02:24 1999
@@ -29,8 +29,13 @@
 	cd config;						\
 	if [ `dpkg --print-architecture` =3D 'i386' ]; then	\
 		sed s/"#platform =3D i586_linux_2.0_glibc"/"platform =3D =
i586_linux_2.0_glibc"/ config.mk > temp.config;				\
+		PLATFORM=3Di586_linux_2.0_glibc;			\
 	elif [ `dpkg --print-architecture` =3D 'alpha' ];	then	\
 		sed s/"#platform =3D alpha_linux_2.0"/"platform =3D =
alpha_linux_2.0"/ config.mk > temp.config;					\
+		PLATFORM=3Dalpha_linux_2.0;			\
+	elif [ `dpkg --print-architecture` =3D 'powerpc' ]; then	\
+		sed s/"#platform =3D powerpc_linux_2.2_glibc"/"platform =3D =
powerpc_linux_2.2_glibc"/ config.mk >temp.config				\
+		PLATFORM=3Dpowerpc_linux_2.2_glibc;		\
 	fi;							\
 	mv temp.config config.mk;				\
 	cd ..
@@ -73,15 +78,15 @@
 	# Debian File System
=20
 	set -e; \
-		cd $(EXEDIR)/i586_linux_2.0_glibc/; \
+		cd $(EXEDIR)/$(PLATFORM)/; \
 		cp -a * .. ; \
 		cd .. ; \
-		rm -r i586_linux_2.0_glibc ; \
+		rm -r $(PLATFORM) ; \
 	# Ditto Above
-		cd $(LIBDIR)/i586_linux_2.0_glibc/; \
+		cd $(LIBDIR)/$(PLATFORM)/; \
 		cp -a * .. ; \
 		cd .. ; \
-		rm -r i586_linux_2.0_glibc
+		rm -r $(PLATFORM)
=20
 	dirs=3D`find $(PROGDIRS) -type d -printf " %p"`; cd =
`pwd`/debian/tmp/usr && install -d $$dirs
 	cp -a $(PROGDIRS) `pwd`/debian/tmp/usr
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 =3D 1
+PowerPCProcessor =3D 1
+
+#
+# Include general unix things
+#
+
+include $(THIS_IMPORT_TREE)/mk/unix.mk
+
+
+#
+# Standard programs
+#
+
+AR =3D ar cq
+
+CPP =3D /usr/bin/cpp
+
+CXX =3D /usr/bin/g++
+CXXMAKEDEPEND =3D $(TOP)/$(BINDIR)/omkdepend -D__cplusplus -D__GNUG__ =
-D__GNUC__
+CXXDEBUGFLAGS =3D -O2=20
+
+CXXLINK		=3D $(CXX)
+CXXLINKOPTIONS  =3D $(CXXDEBUGFLAGS) $(CXXOPTIONS) \
+		$(patsubst %,-Wl$(comma)-rpath$(comma)%,$(IMPORT_LIBRARY_DIRS))
+
+CXXOPTIONS      =3D -Wall -Wno-unused
+EgcsMajorVersion =3D 1
+EgcsMinorVersion =3D 1        # This is actually a post-1.0 egcs =
snapshot.
+
+CC           =3D /usr/bin/gcc
+CMAKEDEPEND  =3D $(TOP)/$(BINDIR)/omkdepend -D__GNUC__
+CDEBUGFLAGS  =3D -O
+
+CLINK        =3D $(CC)
+CLINKOPTIONS =3D $(CDEBUGFLAGS) $(COPTIONS)=20
+
+INSTALL =3D install -c
+
+IMPORT_CPPFLAGS +=3D -D__powerpc__ -D__linux__ -D__OSVERSION__=3D2
+
+
+#
+# CORBA stuff
+#
+
+omniORB2GatekeeperImplementation =3D OMNIORB2_TCPWRAPGK
+CorbaImplementation =3D OMNIORB2
+
+#
+# OMNI thread stuff
+#
+
+ThreadSystem =3D Posix
+OMNITHREAD_POSIX_CPPFLAGS =3D -DNoNanoSleep
+OMNITHREAD_CPPFLAGS =3D -D_REENTRANT
+OMNITHREAD_LIB =3D $(patsubst %,$(LibSearchPattern),omnithread)
+
+ifndef UseMITthreads
+OMNITHREAD_POSIX_CPPFLAGS +=3D -DPthreadDraftVersion=3D10
+OMNITHREAD_LIB +=3D -lpthread
+else
+OMNITHREAD_POSIX_CPPFLAGS +=3D -DPthreadDraftVersion=3D8=20
+OMNITHREAD_CPPFLAGS +=3D -D_MIT_POSIX_THREADS
+OMNITHREAD_LIB +=3D -lpthreads
+endif
+
+lib_depend :=3D $(patsubst %,$(LibPattern),omnithread)
+OMNITHREAD_LIB_DEPEND :=3D $(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 =3D \"/etc/omniorb.cfg\"
+
+# Default directory for the omniNames log files.
+OMNINAMES_LOG_DEFAULT_LOCATION =3D \"/var/log/omninames\"

-------------------

--
Konstantinos Margaritis

------ =_NextPart_000_01BE9B24.3AB3F120--