math lib inclusion

Joel Sherrill joel.sherrill at OARcorp.com
Fri Nov 7 15:54:53 UTC 2008


Neil Mayes wrote:
> Hi all,
>
> I am trying to get an application running that uses math.h. I understand
> I need to supply the math lib which is achieved by adding '-lm' to the
> library list.
>
> I am using RTEMS4.8.0 and gcc4.2.2 for the sparc (ERC32). I have based
> my application make file from an RTEMS example where there is the line:
>
> # Libraries
> LIBS = -lrtemsall -lc
>
>   
Those are unfortunately relics in these old application
Makefiles and aren't even needed since there is no rtemsall
library and libc is implicit.  I don't think they
do anything.

Try

*LD_LIBS  += -lm
*
> include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
> .
> .
>
> Should I just be able to add -lm to LIBS?
>
> Do I have to build the math library seperately from gcc and newlib for
> the sparc?
>
> Thanks,
> Neil Mayes
>
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>   


-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985





More information about the users mailing list