<div dir="ltr"><div dir="ltr"><div><div><div>Hello everyone,<br></div>After adding the files and compiling. I am <br>getting a few errors which I am not able to rectify.<br></div>If you could take a look and tell how to sort them.<br><br></div>link to newlib's git repo: <a href="https://github.com/eshandhawan51/newlib-cygwin/tree/add_fenv_support">https://github.com/eshandhawan51/newlib-cygwin/tree/add_fenv_support</a><br><div><br></div><div>errors :</div><div><br></div><div>In file included from /home/eshan/development/newlib/newlib-cygwin/newlib/libc/include/fenv.h:15:0,<br> from ../../../../../../newlib-cygwin/newlib/libm/fenv/feclearexcept.c:57:<br>/home/eshan/development/newlib/c-arm-rtems5-newlib/arm-rtems5/thumb/newlib/targ-include/sys/fenv.h:82:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'extern'<br> extern const fenv_t *_fe_dfl_env;<br> ^~~~~~<br>In file included from ../../../../../../newlib-cygwin/newlib/libm/fenv/feclearexcept.c:57:0:<br>/home/eshan/development/newlib/newlib-cygwin/newlib/libc/include/fenv.h:22:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int'<br> int feclearexcept(int excepts);<br> ^~~<br></div></div><div><br></div><div>thanks <br></div><div>-Eshan<br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 9, 2020 at 2:53 AM Joel Sherrill <<a href="mailto:joel@rtems.org">joel@rtems.org</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 dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 7, 2020 at 1:33 PM Eshan Dhawan <<a href="mailto:eshandhawan51@gmail.com" target="_blank">eshandhawan51@gmail.com</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 dir="ltr"><div><div>Hello everyone,<br></div>This the tread to discuss adding fenv support for ARM architecture in newlib.<br><br></div>Link to previous thread: <a href="https://lists.rtems.org/pipermail/devel/2020-March/058473.html" target="_blank">https://lists.rtems.org/pipermail/devel/2020-March/058473.html</a><br><div><br></div><div>---FreeBSD Source </div><div><span><div># <a href="https://github.com/freebsd/freebsd/tree/master/lib/msun/arm" style="text-decoration:none" id="gmail-m_-8379085787647252718gmail-m_-4061233678676955460gmail-m_-9039115123886165558gmail-m_4745620444899719269gmail-docs-internal-guid-da84d445-7fff-21ce-cc7a-4f349dac9a65" target="_blank"><span style="font-size:12pt;font-family:"Liberation Serif";color:rgb(17,85,204);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">https://github.com/freebsd/freebsd/tree/master/lib/msun/arm</span></a></div><div># <a href="https://github.com/freebsd/freebsd/blob/master/sys/arm/include/ieeefp.h" target="_blank">https://github.com/freebsd/freebsd/blob/master/sys/arm/include/ieeefp.h</a></div><div>---NetBSD Source <br></div><div># <a href="https://github.com/NetBSD/src/tree/trunk/lib/libm/arch/arm" target="_blank">https://github.com/NetBSD/src/tree/trunk/lib/libm/arch/arm</a></div><div><br></div><div>--- Musl has no implementation for fenv support for ARM in it <br></div><div><br></div><div>After going through the implementations both FreeBSD and NetBSD have a stub implementation.<br></div><div>But then FreeBSD implementation seems to be more portable compared to that in NetBSD.<br><br></div><div>Should I start porting it from FreeBSD?<br></div><div>And which ARM BSP should I use for testing the changes?<br></div><div>Currently, I have xilinx_zynq_a9_qemu build <br></div></span></div></div></blockquote><div><br></div><div>I think the FreeBSD implementation is the one to use. It looks to support hard and soft floating point implementations. </div><div><br></div><div>I think the fenv.h file there will have to be worked on so some of the contents go into sys or machine/fenv.h. There is a portable fenv.h.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><span><div><br></div><div>There would also be a requirement to discuss where to place the files in Newlib.</div></span></div></div></blockquote><div><br></div><div>Not much to discuss. It should go into newlib-cygwin/newlib/libm/machine/arm.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><span><div><br></div><div>Thanks <br></div><div>-Eshan<br></div><div><br></div></span></div></div>
</blockquote></div></div>
</blockquote></div></div>