<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 5, 2022 at 1:20 PM Trip Richert <<a href="mailto:trip.richert@nta-inc.net">trip.richert@nta-inc.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg4125583652592345574">




<div dir="ltr">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">I'm having an issue compiling using with the ilp32 compiler.  Some free functions, which should be in the std namespace, aren't namespaced.</span><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">Here's an example.</span><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">#include <cmath></span><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">double round_wrapper(double val)</span><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">{</span><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">   return std::round(val);</span><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">}</span><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">I get an error message that the round function isn't in the std namespace.  Calling return round(val); without the std namespace compiles successfully. </span><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">This is the command I used to compile</span><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">/opt/rtems/6/aarch64/bin/aarch64-rtems6-g++ -std=gnu++11 -D_GNU_SOURCE </span><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">-D__RTEMS_MAJOR__=6 -D__rtems__ -fno-strict-aliasing -mcpu=cortex-a53 -mabi=ilp32</span><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">-isystem /opt/rtems/6/aarch64/bsps/aarch64-rtems6/xilinx_zynqmp_ilp32_zu3eg/lib/include -qrtems -ffunction-sections </span><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">-fdata-sections -fPIC -o test.obj -c example.cpp</span><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">I tried a couple of revisions of rtems, the latest was  aarch64-rtems6-g++ (GCC) 12.2.1 20220924 (RTEMS 6, RSB cfed1659a297cb0f95a03e053345962097aa02bf,
 Newlib 01f6251c0)</span><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">if I try to compile the exact same code with similar arguments for arm zedboard, it compiles successfully.  So, something is different about
 the ilp32 compiler</span><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">/opt/rtems/6/arm/bin/arm-rtems6-g++  -std=gnu++11 -D__RTEMS_MAJOR__=6 -D__rtems__ -fno-strict-aliasing -mthumb -mfpu=neon -mfloat-abi=hard
 -march=armv7-a -mtune=cortex-a9 -isystem /opt/rtems/6/arm/bsps/arm-rtems6/xilinx_zynq_zedboard/lib/include -qrtems -ffunction-sections -fdata-sections -fPIC  -o test.obj -c example.cpp</span></div></div></blockquote><div><br></div><div>What gcc version is this? <cmath> is provided by gcc. </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg4125583652592345574"><div dir="ltr"><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">I wasn't sure whether to send this to the bug email list, or to check here first to see if someone noticed something I was messing up first.  </span></div></div></blockquote><div><br></div><div>This is a good enough place to start the discussion.</div><div><br></div><div>--joel </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg4125583652592345574"><div dir="ltr"><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">Thanks,</span><br style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255)">
<span style="color:rgb(32,31,30);font-size:14.6667px;background-color:rgb(255,255,255);display:inline">Trip Richert</span>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<br>
<hr>
<p style="font-size:8pt;line-height:10pt;font-family:Arial;color:rgb(255,0,0)">CONFIDENTIALITY NOTICE:
<span style="font-size:8pt;line-height:10pt;font-family:Arial;color:rgb(102,102,102)">
<i>The contents of this e-mail message may be privileged, confidential, proprietary, Controlled Unclassified Information (CUI) or otherwise protected against disclosure or dissemination. This e-mail message and any files transmitted with it are intended solely
 for the use of the individual/individuals or entity/entities to whom they are addressed. If you are not the intended recipient of this message, any dissemination, distribution, printing or copying is strictly prohibited. If you have received this message in
 error, please e-mail or call the sender (<a href="mailto:trip.richert@nta-inc.net" target="_blank">trip.richert@nta-inc.net</a>, 2563361406) and destroy all copies.
<br>
<br>
</i></span></p>
</div>

_______________________________________________<br>
users mailing list<br>
<a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/users</a></div></blockquote></div></div>