[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>
<br>Hello,
<p>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:
<p>cc-1552 CC: WARNING File = ../../../../../src/lib/omniORB/orbcore/codeSets.cc,
Line = 77
<br> The variable "_omni_CS_8859_1_forcelink_" is set but never used.
<p> OMNI_FORCE_LINK(CS_8859_1);
<br> ^
<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> _omni_ ## modname ## _forcelink_ == \
<br>
&_omni_ ## modname ## _should_be_linked_but_is_not_
<p>and in codeSets.cc I 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& s) const
<br>{
<p> if ( (OMNI_FORCE_LINK_2(CS_8859_1)) ||
<br> (OMNI_FORCE_LINK_2(CS_UTF_8))
||
<br> (OMNI_FORCE_LINK_2(CS_UTF_16))
) {
<br> }
<p> native_code_set >>= s;
<br> conversion_code_sets >>= s;
<br>}
<br>
<p>I did not try changing the other 10 or so files that also use the OMNI_FORCE_LINK macro.
<br>
<p>Thanks,
<br>Mark
<br>
<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. 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> -- Duncan Grisby
--
<br> -- duncan@grisby.org --
<br> -- <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>--
==================================================================
| Mark L. Underwood, Ph. D. |
| Senior Engineer/MDICE Development Software Technology Branch |
| |
| Email : mlu@cfdrc.com |
| CFD Research Corporation www : <A HREF="http://www.cfdrc.com">http://www.cfdrc.com</A> |
| Cummings Research Park Phone : (256) 726-4872 |
| 215 Wynn Drive Main Desk: (256) 726-4800 |
| Huntsville, AL 35805 Fax : (256) 726-4806 |
==================================================================</pre>
</html>
--------------A17D7FBECDC51A86989F4D49--