RTEMS 5.1: cmath compiler errors on m68k/uC5282

Johnson, Andrew N. anj at anl.gov
Tue Feb 16 23:00:16 UTC 2021


Hi Gedare,

On Feb 16, 2021, at 4:42 PM, Gedare Bloom <gedare at rtems.org<mailto:gedare at rtems.org>> wrote:

Hi Andrew,

On Tue, Feb 16, 2021 at 1:16 PM Johnson, Andrew N. <anj at anl.gov<mailto:anj at anl.gov>> wrote:

I tried to build the in-progress port of EPICS for the uC5282 BSP last night against a release build of RTEMS-5.1 with tools and BSP built using RSB. It looks like the g++ cmath routines haven't been configured properly for this target. It failed at the first C++ source file includes math.h (other BSPs such as the beatnik and qoriq_e500 get further than this, and only the pc686 build completely succeeds right now):

/local/anj/RTEMS-5.1/rtems-5.1/bin/m68k-rtems5-g++ -B/local/anj/RTEMS-5.1/rtems-5.1/m68k-rtems5/uC5282/lib/ -specs bsp_specs -qrtems     -mcpu=5282       -D_GNU_SOURCE -D_DEFAULT_SOURCE    -DUNIX      -O2 -g -ffunction-sections -fdata-sections   -Wall       -DMY_DO_BOOTP=NULL    -D__LINUX_ERRNO_EXTENSIONS__ -DHAVE_SOCKADDR_SA_LEN=1  -I. -I../O.Common -I. -I../osi/compiler/gcc -I../osi/compiler/default -I. -I../osi/os/RTEMS-posix -I../osi/os/RTEMS -I../osi/os/posix -I../osi/os/default -I.. -I../as -I../bucketLib -I../calc -I../cvtFast -I../cppStd -I../cxxTemplates -I../dbmf -I../ellLib -I../env -I../error -I../fdmgr -I../flex -I../freeList -I../gpHash -I../iocsh -I../log -I../macLib -I../misc -I../osi -I../pool -I../ring -I../taskwd -I../timer -I../yacc -I../yacc -I../yajl -I../../../../include/compiler/gcc -I../../../../include/os/RTEMS -I../../../../include         -c ../cxxTemplates/resourceLib.cpp

I don't see -lm not sure if that is an issue or not, but it seems
suspect. can you snip out the compiler command line to compare with
the pc686 build?

The above line is just running g++ -c to generate a .o file from the C++ code. We compile many sources into object files like that and combine those .o files into a library using the target’s version of ar. The linking stage which runs g++ -lm happens much later, when we’re ready to generate binaries for the target to run.

Here’s the equivalent line for the pc686 target, which succeeds:

/local/anj/RTEMS-5.1/rtems-5.1/bin/i386-rtems5-g++ -B/local/anj/RTEMS-5.1/rtems-5.1/i386-rtems5/pc686/lib/ -specs bsp_specs -qrtems     -mtune=pentiumpro -march=pentium       -D_GNU_SOURCE -D_DEFAULT_SOURCE            -DUNIX      -O2 -g -ffunction-sections -fdata-sections   -Wall          -D__LINUX_ERRNO_EXTENSIONS__ -DHAVE_SOCKADDR_SA_LEN=1  -I. -I../O.Common -I. -I../osi/compiler/gcc -I../osi/compiler/default -I. -I../osi/os/RTEMS-posix -I../osi/os/RTEMS -I../osi/os/posix -I../osi/os/default -I.. -I../as -I../bucketLib -I../calc -I../cvtFast -I../cppStd -I../cxxTemplates -I../dbmf -I../ellLib -I../env -I../error -I../fdmgr -I../flex -I../freeList -I../gpHash -I../iocsh -I../log -I../macLib -I../misc -I../osi -I../pool -I../ring -I../taskwd -I../timer -I../yacc -I../yacc -I../yajl -I../../../../include/compiler/gcc -I../../../../include/os/RTEMS -I../../../../include         -c ../cxxTemplates/resourceLib.cpp

- Andrew

--
Complexity comes for free, simplicity you have to work for.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20210216/76cd47aa/attachment-0001.html>


More information about the users mailing list