[omniORB] Problems with SGI and OmniORB-4.0.0

Mark Underwood mlu@cfdrc.com
Tue Feb 4 22:22:02 2003


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


If you have any other particular suggestions, I can try them.  However, I did have
success it appears with the following:

In omniORB4/linkhacks.h,  I changed OMNI_FORCE_LINK to the following and it also
seems to work...

#define OMNI_FORCE_LINK(modname) \
  extern int _omni_ ## modname ## _should_be_linked_but_is_not_; \
  static int* _omni_ ## modname ## _forcelink_ = \
                         &_omni_ ## modname ## _should_be_linked_but_is_not_; \
  static int _omni_ ## modname ## _value_ () { \
    return *(_omni_ ## modname ## _forcelink_); \
  }

Thanks,
Mark Underwood

Duncan Grisby wrote:

> On Monday 20 January, Mark Underwood wrote:
>
> > 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.
>
> Hmm. Is it possible to fool it by adding more static variables in
> OMNI_FORCE_LINK?  Or perhaps a static function that references the
> linked symbols. I'm not keen on the idea of adding code in function
> bodies since that doesn't work well for things like the extra code
> sets library and the SSL transport.
>
> Are there any compiler switches to tell it not to remove things that
> aren't referenced?
>
> 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       |
==================================================================



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

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
&nbsp;
<br>If you have any other particular suggestions, I&nbsp;can try them.&nbsp;
However, I did have success it appears with the following:
<br><br>
In omniORB4/linkhacks.h,&nbsp; I changed OMNI_FORCE_LINK&nbsp;to the following
and it also seems to work...
<p>#define OMNI_FORCE_LINK(modname) \
<br>&nbsp; extern int _omni_ ## modname ## _should_be_linked_but_is_not_;
\
<br>&nbsp; static int* _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_; \
<br>&nbsp; static int _omni_ ## modname ## _value_ () { \
<br>&nbsp;&nbsp;&nbsp; return *(_omni_ ## modname ## _forcelink_); \
<br>&nbsp; }
<p>Thanks,
<br>Mark Underwood
<p>Duncan Grisby wrote:
<blockquote TYPE=CITE>On Monday 20 January, Mark Underwood wrote:
<p>> The SGI MIPSpro compilers seem to figure out that the *_forcelink_
<br>> symbols are never used from your OMNI_FORCE_LINK macro so then it
<br>> removes it from the *.o files.&nbsp; This then also causes the
<br>> *_should_be_linked to also not be included in the *.o files.&nbsp;
The
<br>> warning message from the 7.3.1 compilers follows:
<br>>
<br>> cc-1552 CC: WARNING File = ../../../../../src/lib/omniORB/orbcore/codeSets.cc,
<br>> Line = 77
<br>>&nbsp;&nbsp; The variable "_omni_CS_8859_1_forcelink_" is set but
never used.
<p>Hmm. Is it possible to fool it by adding more static variables in
<br>OMNI_FORCE_LINK?&nbsp; Or perhaps a static function that references
the
<br>linked symbols. I'm not keen on the idea of adding code in function
<br>bodies since that doesn't work well for things like the extra code
<br>sets library and the SSL transport.
<p>Are there any compiler switches to tell it not to remove things that
<br>aren't referenced?
<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>

--------------2DEB7E86D8D621D971EBDBCC--