<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 1, 2019 at 6:07 PM Aditya Upadhyay <<a href="mailto:aadit0402@gmail.com">aadit0402@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">On Mon, Jul 1, 2019 at 5:58 PM Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>> wrote:<br>
><br>
> If you have finished ndbm, please do not attempt to write memcpy for SPARC. It is not as important as having fenv.h methods. We have a default memcpy implementation for all architectures. The hope was to find an already implemented optimized version with history for the SPARC. But so far we haven't found one with appropriate license. It will be difficult to implement, ensure correctness, and really gain speed.<br>
><br>
> So work on filling a gap in what APIs are provided. Fenv.h<br>
><br>
> Also we need to work on merging your ndbm work.<br>
><br>
Newlib-Cygwin uses db_local.h and it was ported from FreeBSD. Since<br>
that, A lot thing has changed.<br>
If we replace this db_local.h to current freeBSD db.h, then we also<br>
need to make changes in other file such<br>
as hash.c.<br>
<br>
What is your view on this? Shall we ask this on newlib mailing list?<br></blockquote><div>I stepped up for this after the suggestion of gedare. Planned to update whole of search directory.</div><div>I asked this query on newlib, but they haven't replied yet. We can re-send this query.<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
> --joel<br>
><br>
> On Mon, Jul 1, 2019, 5:54 AM Vaibhav Gupta <<a href="mailto:vaibhavgupta40@gmail.com" target="_blank">vaibhavgupta40@gmail.com</a>> wrote:<br>
>><br>
>> Hello,<br>
>> I am reading about memcpy to write it for newlib.<br>
>> Should I also write wmemcpy along with it? <a href="https://pubs.opengroup.org/onlinepubs/009695399/functions/wmemcpy.html" rel="noreferrer" target="_blank">https://pubs.opengroup.org/onlinepubs/009695399/functions/wmemcpy.html</a><br>
>> .<br>
>> Regarding ndbm reference. RSB has not generated library files.<br>
>> - but in newlib source tree, when I compiled newlib, while porting ndbm, it generated lib_a-ndbm.o object file.<br>
>> - I am planning to use that object file to compile ndbm testsuite.<br>
>> .<br>
>> When Object file and C file are present in same directory, we can use :<br>
>> $ gcc trial.c mylib.o<br>
>> But I am not able to find out, how to use this in Makefile.am.<br>
>> LDADD replaces all global variables while compiling.<br>
>><br>
>> I tried various codes, but could not solve it. I just want to use the object file (lib_a-ndbm.o)<br>
>> created while building newlib, to compile ndbm testsuite.<br>
>><br>
>> I need guidance for this.<br>
>><br>
>> Vaibhav Gupta<br>
>><br>
>> On Fri, Jun 28, 2019 at 9:57 PM Gedare Bloom <<a href="mailto:gedare@rtems.org" target="_blank">gedare@rtems.org</a>> wrote:<br>
>>><br>
>>> On Fri, Jun 28, 2019 at 7:20 AM Vaibhav Gupta <<a href="mailto:vaibhavgupta40@gmail.com" target="_blank">vaibhavgupta40@gmail.com</a>> wrote:<br>
>>> ><br>
>>> ><br>
>>> ><br>
>>> > On Fri, Jun 28, 2019, 6:19 PM Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>> wrote:<br>
>>> >><br>
>>> >><br>
>>> >><br>
>>> >> On Fri, Jun 28, 2019, 8:40 AM Vaibhav Gupta <<a href="mailto:vaibhavgupta40@gmail.com" target="_blank">vaibhavgupta40@gmail.com</a>> wrote:<br>
>>> >>><br>
>>> >>><br>
>>> >>><br>
>>> >>> On Fri, Jun 28, 2019, 5:57 PM Joel Sherrill <<a href="mailto:joel@rtems.org" target="_blank">joel@rtems.org</a>> wrote:<br>
>>> >>>><br>
>>> >>>> You need to add the library to the gcc command that links the program. If the libndbm is in the library search path, add -lndbm.<br>
>>> >>>><br>
>>> >>>> I don't recall the exact Makefile variable to set for this to show up. Look at the paranoia sample. It should be doing this with -lm.<br>
>>> >>>><br>
>>> >>>> --joel<br>
>>> >>><br>
>>> >>> Okay, I will try this!<br>
>>> >><br>
>>> >><br>
>>> >> The following web page is a pretty good description of building a library using a native GCC and linking it into a program. It includes some of the theory going on so this might help you.<br>
>>> >><br>
>>> >> <a href="https://www.cs.swarthmore.edu/~newhall/unixhelp/howto_C_libraries.html" rel="noreferrer" target="_blank">https://www.cs.swarthmore.edu/~newhall/unixhelp/howto_C_libraries.html</a><br>
>>> >><br>
>>> >> Guys.. this comes up periodically, even though this is really basic tool usage to me, is this something we should provide some guidance on?<br>
>>> ><br>
>>> > Actually, i tried this before, but I cannot find libndbm in my development directory. I guess it is not generated.<br>
>>> > .<br>
>>> > One thing I can do is, the newlib-cygwin i compiled while porting ndbm, it generated ndbm library. I can use that.<br>
>>><br>
>>> Yes, the library should be 'bundled' with the updated compiler<br>
>>> toolchain. You need to be sure you are using this toolchain. Is it<br>
>>> what you installed to /home/varodek/development/rtems/5 ?<br>
>>><br>
>>> Gedare<br>
</blockquote></div></div>