Re: multiple definition of __getreent (in newlib's crt0.c and RTEMS' confdefs.h)

2018-04-17 Thread Joel Sherrill
On Tue, Apr 17, 2018 at 3:35 AM, Amaan Cheval wrote: > Great tips, thank you for the help! > Updating the bsp_specs to replace startfile with crtbegin.o did let me get > past the the __getreent problems. It seems like I'll need to learn much > more about linker scripts and the GCC spec syntax tha

Re: multiple definition of __getreent (in newlib's crt0.c and RTEMS' confdefs.h)

2018-04-17 Thread Sebastian Huber
On 17/04/18 10:35, Amaan Cheval wrote: - https://docs.rtems.org/branches/master/bsp-howto/linker_script.html You have to be careful with the BSP guilde. It is a bit out of date. For a reference linker command file I would use this: https://git.rtems.org/rtems/tree/c/src/lib/libbsp/arm/shared

Re: multiple definition of __getreent (in newlib's crt0.c and RTEMS' confdefs.h)

2018-04-17 Thread Amaan Cheval
Great tips, thank you for the help! Updating the bsp_specs to replace startfile with crtbegin.o did let me get past the the __getreent problems. It seems like I'll need to learn much more about linker scripts and the GCC spec syntax than I currently know to do this right - I've currently only worke

Re: multiple definition of __getreent (in newlib's crt0.c and RTEMS' confdefs.h)

2018-04-16 Thread Sebastian Huber
Hello, you found a nasty piece in the RTEMS Newlib/GCC configuration. Newlib provides a crt0.o file which contains a bunch of global symbols suitable enough to make the GCC link-time configure tests happy. This file must never be used for a real RTEMS application. The default startfile of GCC

Re: multiple definition of __getreent (in newlib's crt0.c and RTEMS' confdefs.h)

2018-04-16 Thread Joel Sherrill
On Mon, Apr 16, 2018 at 3:53 PM, Amaan Cheval wrote: > Hi! > > I haven't had much time to continue investigating this specific problem, > but as I suspected, I've been able to work around it for the time being by > simply using gcc 7.2.0 with Newlib 2.5.0 with my patch[1] tacked on to it > (which

Re: multiple definition of __getreent (in newlib's crt0.c and RTEMS' confdefs.h)

2018-04-16 Thread Amaan Cheval
Hi! I haven't had much time to continue investigating this specific problem, but as I suspected, I've been able to work around it for the time being by simply using gcc 7.2.0 with Newlib 2.5.0 with my patch[1] tacked on to it (which seems to have fallen through the cracks - I'd appreciate any inpu

Re: multiple definition of __getreent

2015-06-21 Thread Chris Johns
On 22/06/2015 3:24 am, Sujay Raj wrote: > @Chris , I used 'target_link_libraries' in mk_bin/CMakeLists.txt to > link libc.a and libbsd.a to the monkey-bin target I think touching anything in Cmake with the hack around we have using is only going to cause issues. We are currently working around cm

Re: multiple definition of __getreent

2015-06-21 Thread Joel Sherrill
Another guess. Is there a "ld -r" in the build procedure? A partial linking. On June 21, 2015 12:49:23 PM CDT, Sujay Raj wrote: >I am updating my github repo after cleaning the code, for you all to >verify. I will drop a mail when its ready. > >Regards, > >Sujay Raj > > > > > >On Sun, Jun 21, 20

Re: multiple definition of __getreent

2015-06-21 Thread Sujay Raj
I am updating my github repo after cleaning the code, for you all to verify. I will drop a mail when its ready. Regards, Sujay Raj On Sun, Jun 21, 2015 at 10:54 PM, Sujay Raj wrote: > @Chris , I used 'target_link_libraries' in mk_bin/CMakeLists.txt to link > libc.a and libbsd.a to the monkey-

Re: multiple definition of __getreent

2015-06-21 Thread Sujay Raj
@Chris , I used 'target_link_libraries' in mk_bin/CMakeLists.txt to link libc.a and libbsd.a to the monkey-bin target @Joel, removing -O0 doesn't work too. I needed libc for three function , initgroups, timegm, and sendfile. Today I figured that monkey can function without 'initgroups' , if it

Re: multiple definition of __getreent

2015-06-20 Thread Joel Sherrill
I suspect it is because he is compiling at -O0. On June 20, 2015 6:13:23 PM CDT, Chris Johns wrote: >On 20/06/2015 2:34 am, Sujay Raj wrote: >> Hi , >> >> I am working on porting the monkey http server to rtems. >> >> I am working on the bsp: xilinx_zynq_a9_qemu , target: arm-rtems4.11. >> >>

Re: multiple definition of __getreent

2015-06-20 Thread Chris Johns
On 20/06/2015 2:34 am, Sujay Raj wrote: > Hi , > > I am working on porting the monkey http server to rtems. > > I am working on the bsp: xilinx_zynq_a9_qemu , target: arm-rtems4.11. > > There are two libraries that I am supposed to link to create my final > executable, one is libbsd.a and the ot