<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Courier New";
        color:windowtext;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Courier New";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoPlainText">When building an RTEMS 5 BSP for LEON3 we get the warnings below regarding missing _Timespec functions. These warnings result in linker errors when building an application that uses a rtems_bsdnet_ifconfig struct supplied as the network
 interface member of a rtems_bsdnet_config struct. We believe the fix is to add the following include in greth2.c: #include <rtems/score/timespec.h>. (Note there is also a trivial printf formatting warning that should also be fixed.)<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">For reference, we used the following as the arguments to configure:<o:p></o:p></p>
<p class="MsoPlainText">[rtems@localhost b-leon3]$ ../rtems/configure --target=sparc-rtems5 --enable-rtemsbsp=leon3 --enable-tests=samples --prefix=${HOME}/projects/rtems-devel/bsp-install<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">Sincerely,<o:p></o:p></p>
<p class="MsoPlainText">Keith Morgan &<o:p></o:p></p>
<p class="MsoPlainText">Sam Larsen<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">[rtems@localhost b-leon3]$ make<o:p></o:p></p>
<p class="MsoPlainText">Making all in sparc-rtems5/c<o:p></o:p></p>
<p class="MsoPlainText">[...]<o:p></o:p></p>
<p class="MsoPlainText">../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../../../../../bsps/shared/net/greth2.c: In function 'greth_initialize_hardware':<o:p></o:p></p>
<p class="MsoPlainText">../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../../../../../bsps/shared/net/greth2.c:329:5:
<span style="color:#7030A0">warning:</span> implicit declaration of function '_Timespec_Set_to_zero' [<span style="color:#7030A0">-Wimplicit-function-declaration</span>]<o:p></o:p></p>
<p class="MsoPlainText">     <span style="color:#7030A0">_Timespec_Set_to_zero</span>(&sc->auto_neg_time);<o:p></o:p></p>
<p class="MsoPlainText">     ^~~~~~~~~~~~~~~~~~~~~<o:p></o:p></p>
<p class="MsoPlainText">../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../../../../../bsps/shared/net/greth2.c:329:5:
<span style="color:#7030A0">warning:</span> nested extern declaration of '_Timespec_Set_to_zero' [<span style="color:#7030A0">-Wnested-externs</span>]<o:p></o:p></p>
<p class="MsoPlainText">../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../../../../../bsps/shared/net/greth2.c:338:21:
<span style="color:#7030A0">warning:</span> implicit declaration of function '_Timespec_Subtract'; did you mean 'timespecsub'? [<span style="color:#7030A0">-Wimplicit-function-declaration</span>]<o:p></o:p></p>
<p class="MsoPlainText">                     <span style="color:#7030A0">_Timespec_Subtract</span>(&tstart, &tnow, &sc->auto_neg_time);<o:p></o:p></p>
<p class="MsoPlainText">                     ^~~~~~~~~~~~~~~~~~<o:p></o:p></p>
<p class="MsoPlainText">                     <span style="color:#00B050">timespecsub</span><o:p></o:p></p>
<p class="MsoPlainText">../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../../../../../bsps/shared/net/greth2.c:338:21:
<span style="color:#7030A0">warning:</span> nested extern declaration of '_Timespec_Subtract' [-Wnested-externs]<o:p></o:p></p>
<p class="MsoPlainText">../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../../../../../bsps/shared/net/greth2.c:339:25:
<span style="color:#7030A0">warning:</span> implicit declaration of function '_Timespec_Greater_than' [<span style="color:#7030A0">-Wimplicit-function-declaration</span>]<o:p></o:p></p>
<p class="MsoPlainText">                     if (<span style="color:#7030A0">_Timespec_Greater_than</span>(&sc->auto_neg_time, &greth_tan)) {<o:p></o:p></p>
<p class="MsoPlainText">                         ^~~~~~~~~~~~~~~~~~~~~~<o:p></o:p></p>
<p class="MsoPlainText">../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../../../../../bsps/shared/net/greth2.c:339:25:
<span style="color:#7030A0">warning:</span> nested extern declaration of '_Timespec_Greater_than' [<span style="color:#7030A0">-Wnested-externs</span>]<o:p></o:p></p>
<p class="MsoPlainText">[...]<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
<p class="MsoPlainText">--<o:p></o:p></p>
<p class="MsoPlainText">Keith Shearl Morgan<o:p></o:p></p>
<p class="MsoPlainText">ISR-3, Space Data Systems<o:p></o:p></p>
<p class="MsoPlainText">Los Alamos National Laboratory<o:p></o:p></p>
<p class="MsoPlainText"><o:p> </o:p></p>
</div>
</body>
</html>