[oe-commits] org.oe.dev omniorb_4.0.7.bb : Fix file to correctly build without LongDouble support.

crofton commit openembedded-commits at lists.openembedded.org
Fri Oct 13 15:03:30 UTC 2006


omniorb_4.0.7.bb : Fix file to correctly build without LongDouble support.
                   * Add patches for ARM support
                   * Convert to auto staging.

Author: crofton at openembedded.org
Branch: org.openembedded.dev
Revision: b7fc885dd4f576de1825063502bd8ff8189fd4c0
ViewMTN: http://monotone.openembedded.org/revision.psp?id=b7fc885dd4f576de1825063502bd8ff8189fd4c0
Files:
1
packages/omniorb/files/arm_double.patch
packages/omniorb/files/dynskel.patch
packages/omniorb/files/rm_LongDouble.patch
packages/omniorb/omniorb_4.0.7.bb
Diffs:

#
# mt diff -rd5b69f13459a952e95431820d5bc13e5aa0a453e -rb7fc885dd4f576de1825063502bd8ff8189fd4c0
#
# 
# 
# add_file "packages/omniorb/files/arm_double.patch"
#  content [cbcdf14266a9c60ba205348aa50b6ffb607a899e]
# 
# add_file "packages/omniorb/files/dynskel.patch"
#  content [5b5ab4a206ac1768174bd57d6dd789c6fa3aa439]
# 
# add_file "packages/omniorb/files/rm_LongDouble.patch"
#  content [ee862075f306d6f60bb39015a81e503a4cf6a168]
# 
# patch "packages/omniorb/omniorb_4.0.7.bb"
#  from [d95fc96ed4108be94738ade2f40b9c882898275b]
#    to [bc6f333c3740b958a3294661a8f84fe3250e5a5c]
# 
============================================================
--- packages/omniorb/files/arm_double.patch	cbcdf14266a9c60ba205348aa50b6ffb607a899e
+++ packages/omniorb/files/arm_double.patch	cbcdf14266a9c60ba205348aa50b6ffb607a899e
@@ -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 at .marshal_byte_swap()) {
+   @where at .put_octet_array((CORBA::Octet*)(@slice_cast@@name@), at num@, at 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:
============================================================
--- packages/omniorb/files/dynskel.patch	5b5ab4a206ac1768174bd57d6dd789c6fa3aa439
+++ packages/omniorb/files/dynskel.patch	5b5ab4a206ac1768174bd57d6dd789c6fa3aa439
@@ -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
============================================================
--- packages/omniorb/files/rm_LongDouble.patch	ee862075f306d6f60bb39015a81e503a4cf6a168
+++ packages/omniorb/files/rm_LongDouble.patch	ee862075f306d6f60bb39015a81e503a4cf6a168
@@ -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 ----
============================================================
--- packages/omniorb/omniorb_4.0.7.bb	d95fc96ed4108be94738ade2f40b9c882898275b
+++ packages/omniorb/omniorb_4.0.7.bb	bc6f333c3740b958a3294661a8f84fe3250e5a5c
@@ -9,16 +9,14 @@ file://omniORB_embedded_appl.patch;patch
 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_stage () {
 
 do_stage () {
 	export EmbeddedSystem=1
-	make DESTDIR=${STAGING_DIR}/${TARGET_SYS} install
+	autotools_stage_all
 }
 
 do_install () {






More information about the Openembedded-commits mailing list