summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Balister <philip@balister.org>2006-10-13 14:52:15 +0000
committerPhilip Balister <philip@balister.org>2006-10-13 14:52:15 +0000
commit5e70d0a213b93f40a9486fbafd37d098b2a21ae8 (patch)
treece9b8a269fafc0a1352f69b50f3faa2fc21cac78
parenta3b5f5024445a057a07b380ff8c91a3837d74237 (diff)
parentd81ddb57e6b0fc90a1418b7ee5d4a0ca40fa21ae (diff)
merge of '172e330b964d32daab793a9adb3cc9dc29f58af6'
and 'b7fc885dd4f576de1825063502bd8ff8189fd4c0'
-rw-r--r--packages/omniorb/files/arm_double.patch266
-rw-r--r--packages/omniorb/files/dynskel.patch49
-rw-r--r--packages/omniorb/files/rm_LongDouble.patch14
-rw-r--r--packages/omniorb/omniorb_4.0.7.bb10
4 files changed, 333 insertions, 6 deletions
diff --git a/packages/omniorb/files/arm_double.patch b/packages/omniorb/files/arm_double.patch
new file mode 100644
index 0000000000..cfcfd41630
--- /dev/null
+++ b/packages/omniorb/files/arm_double.patch
@@ -0,0 +1,266 @@
+--- include/omniORB4/CORBA_sysdep.h 30 Dec 2005 17:40:22 -0000 1.2.2.32
++++ include/omniORB4/CORBA_sysdep.h 12 Apr 2006 16:55:41 -0000
+@@ -125,6 +125,15 @@
+ #endif
+
+ //
++// Processor dependencies
++//
++
++#if defined(__arm__)
++# define OMNI_MIXED_ENDIAN_DOUBLE
++#endif
++
++
++//
+ // Macro to provide const_cast functionality on all platforms.
+ //
+ #ifdef HAS_Cplusplus_const_cast
+--- include/omniORB4/cdrStream.h 22 Jul 2005 16:57:17 -0000 1.1.2.23
++++ include/omniORB4/cdrStream.h 12 Apr 2006 16:55:41 -0000
+@@ -428,6 +428,13 @@
+ m.l[1] = Swap32(l.l[0]);
+ l = m;
+ }
++#ifdef OMNI_MIXED_ENDIAN_DOUBLE
++ {
++ _CORBA_ULong v = l.l[0];
++ l.l[0] = l.l[1];
++ l.l[1] = v;
++ }
++#endif
+ CdrMarshal(s,LongArray2,omni::ALIGN_8,l);
+ }
+
+@@ -440,6 +447,13 @@
+ m.l[1] = Swap32(l.l[0]);
+ l = m;
+ }
++#ifdef OMNI_MIXED_ENDIAN_DOUBLE
++ {
++ _CORBA_ULong v = l.l[0];
++ l.l[0] = l.l[1];
++ l.l[1] = v;
++ }
++#endif
+ convertToFloat(_CORBA_Double, LongArray2);
+ }
+ #else
+@@ -791,6 +805,19 @@
+ p[i] = l;
+ }
+ }
++#ifdef OMNI_MIXED_ENDIAN_DOUBLE
++ {
++ struct LongArray2 {
++ _CORBA_ULong l[2];
++ };
++ LongArray2* p=(LongArray2*)a;
++ for( int i = 0; i < length; i++ ) {
++ _CORBA_ULong v = p[i].l[0];
++ p[i].l[0] = p[i].l[1];
++ p[i].l[1] = v;
++ }
++ }
++#endif
+ }
+ #endif
+
+@@ -957,6 +984,13 @@
+ m.l[1] = Swap32(l.l[0]);
+ l = m;
+ }
++#ifdef OMNI_MIXED_ENDIAN_DOUBLE
++ {
++ _CORBA_ULong v = l.l[0];
++ l.l[0] = l.l[1];
++ l.l[1] = v;
++ }
++#endif
+ CdrMarshal(s,LongArray2,omni::ALIGN_8,l);
+ }
+
+@@ -969,6 +1003,13 @@
+ m.l[1] = Swap32(l.l[0]);
+ l = m;
+ }
++#ifdef OMNI_MIXED_ENDIAN_DOUBLE
++ {
++ _CORBA_ULong v = l.l[0];
++ l.l[0] = l.l[1];
++ l.l[1] = v;
++ }
++#endif
+ convertToFloat(_CORBA_Double, LongArray2);
+ }
+
+--- include/omniORB4/seqTemplatedecls.h 11 Oct 2005 13:17:01 -0000 1.1.2.10
++++ include/omniORB4/seqTemplatedecls.h 12 Apr 2006 16:55:42 -0000
+@@ -544,43 +544,6 @@
+ };
+
+
+-
+-//////////////////////////////////////////////////////////////////////
+-///////////// _CORBA_Sequence_w_FixSizeElement /////////////
+-//////////////////////////////////////////////////////////////////////
+-template <class T,int elmSize,int elmAlignment>
+-class _CORBA_Sequence_w_FixSizeElement : public _CORBA_Sequence<T> {
+-protected:
+- typedef _CORBA_Sequence_w_FixSizeElement<T,elmSize,elmAlignment> T_seq;
+- typedef _CORBA_Sequence<T> Base_T_seq ;
+-
+-
+- inline _CORBA_Sequence_w_FixSizeElement() {}
+-
+- inline _CORBA_Sequence_w_FixSizeElement(_CORBA_ULong max,
+- _CORBA_Boolean bounded=0) :
+- Base_T_seq(max,bounded) {}
+-
+- inline _CORBA_Sequence_w_FixSizeElement(const T_seq& s) : Base_T_seq(s) {}
+-
+- inline _CORBA_Sequence_w_FixSizeElement(_CORBA_ULong max,
+- _CORBA_ULong len,
+- T *value,
+- _CORBA_Boolean release_ = 0,
+- _CORBA_Boolean bounded = 0
+- ) : Base_T_seq(max,len,value,release_,bounded) {}
+-
+- inline T_seq &operator= (const T_seq &s) {
+- Base_T_seq::operator= (s);
+- return *this;
+- }
+-
+-public:
+- inline void operator>>= (cdrStream &s) const;
+- inline void operator<<= (cdrStream &s);
+-};
+-
+-
+ //////////////////////////////////////////////////////////////////////
+ ///////////// _CORBA_Unbounded_Sequence_w_FixSizeElement /////////////
+ //////////////////////////////////////////////////////////////////////
+@@ -663,6 +626,46 @@
+ };
+
+
++#ifdef OMNI_MIXED_ENDIAN_DOUBLE
++
++template <int max>
++class _CORBA_Bounded_Sequence_w_FixSizeElement<_CORBA_Double,max,8,8> :
++ public _CORBA_Bounded_Sequence<_CORBA_Double,max> {
++public:
++ typedef _CORBA_Bounded_Sequence_w_FixSizeElement<_CORBA_Double,max,8,8> T_seq;
++ typedef _CORBA_Bounded_Sequence<_CORBA_Double,max> Base_T_seq;
++
++
++ inline _CORBA_Bounded_Sequence_w_FixSizeElement() {}
++ inline _CORBA_Bounded_Sequence_w_FixSizeElement(_CORBA_ULong len,
++ _CORBA_Double *value,
++ _CORBA_Boolean rel = 0) :
++ Base_T_seq(len,value,rel) {}
++
++ inline _CORBA_Bounded_Sequence_w_FixSizeElement(const T_seq& s) :
++ Base_T_seq(s) {}
++
++ inline ~_CORBA_Bounded_Sequence_w_FixSizeElement() {}
++
++ inline T_seq& operator=(const T_seq& s) {
++ Base_T_seq::operator= (s);
++ return *this;
++ }
++
++ // CORBA 2.3 additions
++
++ inline void replace(_CORBA_ULong len, _CORBA_Double* data,_CORBA_Boolean release_ = 0) {
++ Base_T_seq::replace(len,data,release_);
++ }
++
++ inline void operator>>= (cdrStream &s) const;
++ inline void operator<<= (cdrStream &s);
++};
++
++#endif
++
++
++
+ //////////////////////////////////////////////////////////////////////
+ ////////////////// _CORBA_Sequence_Char /////////////////////////////
+ //////////////////////////////////////////////////////////////////////
+--- include/omniORB4/seqTemplatedefns.h 22 May 2003 13:41:39 -0000 1.1.2.11
++++ include/omniORB4/seqTemplatedefns.h 12 Apr 2006 16:55:42 -0000
+@@ -266,6 +266,48 @@
+ }
+
+ //////////////////////////////////////////////////////////////////////
++#ifdef OMNI_MIXED_ENDIAN_DOUBLE
++
++// Template member function specializations to use the base
++// marshalling functions for double, so the doubles are properly
++// word-swapped.
++
++template<>
++inline
++void
++_CORBA_Unbounded_Sequence_w_FixSizeElement<_CORBA_Double,8,8>::operator>>= (cdrStream& s) const
++{
++ Base_T_seq::operator>>=(s);
++}
++
++template<>
++inline
++void
++_CORBA_Unbounded_Sequence_w_FixSizeElement<_CORBA_Double,8,8>::operator<<= (cdrStream& s)
++{
++ Base_T_seq::operator<<=(s);
++}
++
++template<int max>
++inline
++void
++_CORBA_Bounded_Sequence_w_FixSizeElement<_CORBA_Double,max,8,8>::operator>>= (cdrStream& s) const
++{
++ Base_T_seq::operator>>=(s);
++}
++
++template<int max>
++inline
++void
++_CORBA_Bounded_Sequence_w_FixSizeElement<_CORBA_Double,max,8,8>::operator<<= (cdrStream& s)
++{
++ Base_T_seq::operator<<=(s);
++}
++
++#endif
++
++
++//////////////////////////////////////////////////////////////////////
+ inline
+ void
+ _CORBA_Sequence_Char::operator>>= (cdrStream& s) const
+--- src/lib/omniORB/omniidl_be/cxx/skutil.py 27 Jul 2003 19:24:32 -0000 1.17.2.10
++++ src/lib/omniORB/omniidl_be/cxx/skutil.py 12 Apr 2006 16:55:42 -0000
+@@ -197,6 +197,11 @@
+ if array_marshal_helpers.has_key(d_type.type().kind()):
+ (alignment,elmsize) = array_marshal_helpers[d_type.type().kind()]
+ if alignment != "omni::ALIGN_1":
++ is_double = d_type.type().kind() == idltype.tk_double
++ if is_double:
++ to.out("""
++#ifndef OMNI_MIXED_ENDIAN_DOUBLE""")
++
+ to.out("""\
+ if (! @where@.marshal_byte_swap()) {
+ @where@.put_octet_array((CORBA::Octet*)(@slice_cast@@name@),@num@,@align@);
+@@ -207,6 +212,11 @@
+ slice_cast = slice_cast,
+ num = str(n_elements * elmsize),
+ align = alignment)
++
++ if is_double:
++ to.out("""\
++#endif""")
++
+ # Do not return here.
+ # let the code below to deal with the else block.
+ else:
diff --git a/packages/omniorb/files/dynskel.patch b/packages/omniorb/files/dynskel.patch
new file mode 100644
index 0000000000..469d3eb45e
--- /dev/null
+++ b/packages/omniorb/files/dynskel.patch
@@ -0,0 +1,49 @@
+--- src/lib/omniORB/omniidl_be/cxx/dynskel/main.py 27 Nov 2001 14:37:25 -0000 1.14.2.10
++++ src/lib/omniORB/omniidl_be/cxx/dynskel/main.py 15 May 2006 13:36:20 -0000
+@@ -474,15 +474,30 @@
+
+ elementDesc = output.StringStream()
+ prefix = config.state['Private Prefix']
++
+ # djr and jnw's "Super-Hacky Optimisation"
+ # (amended by dpg1 to be even more hacky, since char/wchar now don't work)
+- if isinstance(d_seqType.type(), idltype.Base) and \
+- not d_seqType.variable() and \
+- not d_seqType.type().kind() in [idltype.tk_char, idltype.tk_wchar] and \
+- not is_array:
++ # (amended again to cope with mixed endian doubles)
++
++ is_double = d_seqType.type().kind() == idltype.tk_double
++ is_contiguous = (isinstance(d_seqType.type(), idltype.Base) and
++ not d_seqType.variable() and
++ not d_seqType.type().kind() in [idltype.tk_char,
++ idltype.tk_wchar] and
++ not is_array)
++
++ if is_double:
++ elementDesc.out("""
++#ifndef OMNI_MIXED_ENDIAN_DOUBLE""")
++
++ if is_contiguous:
+ elementDesc.out(template.sequence_elementDesc_contiguous,
+ sequence = sequence_desc)
+- else:
++ if is_double:
++ elementDesc.out("""
++#else""")
++
++ if is_double or not is_contiguous:
+ # <---
+ required_symbols = [ prefix + "_buildDesc" + seqType_cname ]
+ assertDefined(required_symbols)
+@@ -492,6 +507,10 @@
+ thing_cname = seqType_cname,
+ thing = thing)
+
++ if is_double:
++ elementDesc.out("""
++#endif""")
++
+ # <---
+ cname = memberType_cname
+ # this is the #ifdef guard
diff --git a/packages/omniorb/files/rm_LongDouble.patch b/packages/omniorb/files/rm_LongDouble.patch
new file mode 100644
index 0000000000..20556ddcf1
--- /dev/null
+++ b/packages/omniorb/files/rm_LongDouble.patch
@@ -0,0 +1,14 @@
+*** omniORB-4.0.7/idl/corbaidl.idl.orig 2006-10-13 09:21:35.000000000 -0400
+--- omniORB-4.0.7/idl/corbaidl.idl 2006-10-13 09:22:38.000000000 -0400
+***************
+*** 48,56 ****
+ #endif
+ typedef sequence<float> FloatSeq;
+ typedef sequence<double> DoubleSeq;
+- #ifdef HAS_LongDouble
+- typedef sequence<long double> LongDoubleSeq;
+- #endif
+ typedef sequence<string> StringSeq;
+ typedef sequence<wstring> WStringSeq;
+
+--- 48,53 ----
diff --git a/packages/omniorb/omniorb_4.0.7.bb b/packages/omniorb/omniorb_4.0.7.bb
index 3824b293b3..88edcb6a37 100644
--- a/packages/omniorb/omniorb_4.0.7.bb
+++ b/packages/omniorb/omniorb_4.0.7.bb
@@ -9,16 +9,14 @@ DEPENDS = omniorb-native
SRC_URI = "${SOURCEFORGE_MIRROR}/omniorb/omniORB-${PV}.tar.gz \
file://omniORB-cross.patch;patch=1 \
file://omniORB_embedded_appl.patch;patch=1" \
-file://long_double.patch;patch=1"
+file://rm_LongDouble.patch;patch=1 \
+file://arm_double.patch;patch=1;pnum=0 \
+file://dynskel.patch;patch=1;pnum=0"
S = "${WORKDIR}/omniORB-${PV}"
inherit autotools pkgconfig
-#do_configure () {
-# oe_runconf
-#}
-
do_compile () {
export EmbeddedSystem=1
export TOOLBINDIR=${STAGING_BINDIR}
@@ -27,7 +25,7 @@ do_compile () {
do_stage () {
export EmbeddedSystem=1
- make DESTDIR=${STAGING_DIR}/${TARGET_SYS} install
+ autotools_stage_all
}
do_install () {