On 23/03/17 00:17, Andrew Johnson wrote:
Hi Joel & Craig,
Hopefully you remember this email conversation from November:
https://sourceware.org/ml/newlib/2016/msg01117.html
I just built the RTEMS master branch for the uC5282 BSP, and found the
same problem with the ieeefp.h header when building EPICS Base using the
result. I think I can explain what's happening.
Newlib's setting for _LDBL_EQ_DBL (in newlib.h) needs to change based on
the particular CPU being compiled for. Here's some evidence:
Yes, this definition of _LDBL_EQ_DBL is wrong, since it depends on the
multilib. For example we have in the GCC build tree:
grep _LDBL_EQ_DBL `find -name newlib.h`
./m68k-rtems4.12/m68040/softfp/newlib/newlib.h:/* #undef _LDBL_EQ_DBL */
...
In the installation tree:
grep _LDBL_EQ_DBL `find -name newlib.h`
./m68k-rtems4.12/include/newlib.h:/* #undef _LDBL_EQ_DBL */
So, only one random newlib.h is copied to the installation tree, therefore all
newlib.h of the build tree must be identical.
I would move the _LDBL_EQ_DBL definition to <ieeefp.h> based on compiler
provided defines.