[omniORB] Problems with SGI and OmniORB-4.0.0

Mark Underwood mlu@cfdrc.com
Mon Jan 20 16:19:01 2003


--------------A17D7FBECDC51A86989F4D49
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


Hello,

The SGI MIPSpro compilers seem to figure out that the *_forcelink_ symbols are
never used from your OMNI_FORCE_LINK macro so then it removes it from the *.o
files.  This then also causes the *_should_be_linked to also not be included in
the *.o files.  The warning message from the 7.3.1 compilers follows:

cc-1552 CC: WARNING File = ../../../../../src/lib/omniORB/orbcore/codeSets.cc,
Line = 77
  The variable "_omni_CS_8859_1_forcelink_" is set but never used.

  OMNI_FORCE_LINK(CS_8859_1);
  ^

With the following changes, I can get omniORB4.a to work for my purposes.

In linkHacks.h, I added the macro:

#define OMNI_FORCE_LINK_2(modname) \
  _omni_ ## modname ## _forcelink_ == \
                         &_omni_ ## modname ## _should_be_linked_but_is_not_

and in codeSets.cc I added to the code below the "if" section to make sure the
*_forcelink_ variables are referenced:

void
CONV_FRAME::
CodeSetComponent::operator>>=(cdrStream& s) const
{

  if ( (OMNI_FORCE_LINK_2(CS_8859_1)) ||
        (OMNI_FORCE_LINK_2(CS_UTF_8)) ||
        (OMNI_FORCE_LINK_2(CS_UTF_16)) )  {
  }

  native_code_set >>= s;
  conversion_code_sets >>= s;
}


I did not try changing the other 10 or so files that also use the
OMNI_FORCE_LINK macro.


Thanks,
Mark


Duncan Grisby wrote:

> On Wednesday 15 January, Mark Underwood wrote:
>
> > After following the suggestion below, the following code is only executed on
> > the SGI when the executable is linked with omniORB4.so.  If linking to
> > omniORB4.a, it is not executed.
>
> That's annoying. I have just checked in a small change to the link
> forcing mechanism, for Christof's port to Digital Mars C++, that now
> explicitly sets the exported variable used for forcing the link to
> zero. I don't suppose that happens to fix it for the SGI compiler?
>
> If that doesn't help (and I expect it probably won't), all I can
> suggest is that you try to track down some other way to force the
> linkage on the SGI compiler. If you come up with something that isn't
> too painful, I'll include it in the distribution.
>
> Cheers,
>
> Duncan.
>
> --
>  -- Duncan Grisby         --
>   -- duncan@grisby.org     --
>    -- http://www.grisby.org --
> _______________________________________________
> omniORB-list mailing list
> omniORB-list@omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list

--
==================================================================
| Mark L. Underwood, Ph. D.                                      |
| Senior Engineer/MDICE Development   Software Technology Branch |
|                                                                |
|                                Email    : mlu@cfdrc.com        |
| CFD Research Corporation       www      : http://www.cfdrc.com |
| Cummings Research Park         Phone    : (256) 726-4872       |
| 215 Wynn Drive                 Main Desk: (256) 726-4800       |
| Huntsville, AL 35805           Fax      : (256) 726-4806       |
==================================================================



--------------A17D7FBECDC51A86989F4D49
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
&nbsp;
<br>Hello,
<p>The SGI&nbsp;MIPSpro compilers seem to figure out that the *_forcelink_
symbols are never used from your OMNI_FORCE_LINK&nbsp;macro so then it
removes it from the *.o files.&nbsp; This then also causes the *_should_be_linked
to also not be included in the *.o files.&nbsp; The warning message from
the 7.3.1 compilers follows:
<p>cc-1552 CC: WARNING File = ../../../../../src/lib/omniORB/orbcore/codeSets.cc,
Line = 77
<br>&nbsp; The variable "_omni_CS_8859_1_forcelink_" is set but never used.
<p>&nbsp; OMNI_FORCE_LINK(CS_8859_1);
<br>&nbsp; ^
<p>With the following changes, I can get omniORB4.a to work for my purposes.
<p>In linkHacks.h, I added the macro:
<p>#define OMNI_FORCE_LINK_2(modname) \
<br>&nbsp; _omni_ ## modname ## _forcelink_ == \
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&amp;_omni_ ## modname ## _should_be_linked_but_is_not_
<p>and in codeSets.cc I&nbsp;added to the code below the "if" section to
make sure the *_forcelink_ variables are referenced:
<p>void
<br>CONV_FRAME::
<br>CodeSetComponent::operator>>=(cdrStream&amp; s) const
<br>{
<p>&nbsp; if ( (OMNI_FORCE_LINK_2(CS_8859_1)) ||
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (OMNI_FORCE_LINK_2(CS_UTF_8))
||
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (OMNI_FORCE_LINK_2(CS_UTF_16))
)&nbsp; {
<br>&nbsp; }
<p>&nbsp; native_code_set >>= s;
<br>&nbsp; conversion_code_sets >>= s;
<br>}
<br>&nbsp;
<p>I did not try changing the other 10 or so files that also use the OMNI_FORCE_LINK&nbsp;macro.
<br>&nbsp;
<p>Thanks,
<br>Mark
<br>&nbsp;
<p>Duncan Grisby wrote:
<blockquote TYPE=CITE>On Wednesday 15 January, Mark Underwood wrote:
<p>> After following the suggestion below, the following code is only executed
on
<br>> the SGI when the executable is linked with omniORB4.so.&nbsp; If
linking to
<br>> omniORB4.a, it is not executed.
<p>That's annoying. I have just checked in a small change to the link
<br>forcing mechanism, for Christof's port to Digital Mars C++, that now
<br>explicitly sets the exported variable used for forcing the link to
<br>zero. I don't suppose that happens to fix it for the SGI compiler?
<p>If that doesn't help (and I expect it probably won't), all I can
<br>suggest is that you try to track down some other way to force the
<br>linkage on the SGI compiler. If you come up with something that isn't
<br>too painful, I'll include it in the distribution.
<p>Cheers,
<p>Duncan.
<p>--
<br>&nbsp;-- Duncan Grisby&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
--
<br>&nbsp; -- duncan@grisby.org&nbsp;&nbsp;&nbsp;&nbsp; --
<br>&nbsp;&nbsp; -- <a href="http://www.grisby.org">http://www.grisby.org</a>
--
<br>_______________________________________________
<br>omniORB-list mailing list
<br>omniORB-list@omniorb-support.com
<br><a href="http://www.omniorb-support.com/mailman/listinfo/omniorb-list">http://www.omniorb-support.com/mailman/listinfo/omniorb-list</a></blockquote>

<pre>--&nbsp;
==================================================================
| Mark L. Underwood, Ph. D.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
| Senior Engineer/MDICE Development&nbsp;&nbsp; Software Technology Branch |
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Email&nbsp;&nbsp;&nbsp; : mlu@cfdrc.com&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
| CFD Research Corporation&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; www&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : <A HREF="http://www.cfdrc.com">http://www.cfdrc.com</A> |
| Cummings Research Park&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Phone&nbsp;&nbsp;&nbsp; : (256) 726-4872&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
| 215 Wynn Drive&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Main Desk: (256) 726-4800&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
| Huntsville, AL 35805&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Fax&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : (256) 726-4806&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |
==================================================================</pre>
&nbsp;</html>

--------------A17D7FBECDC51A86989F4D49--