This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: CT-NG: floating point support in Newlibs printf?


Hi Yann, All,

On 2010-10-23 17:17, Jeppe Ledet-Pedersen wrote:
First of all, thank you very much for the patch. Unfortunately, the
problem persists, and I experience the exact same behavior as with my
other toolchains. I think floating point printf is automatically enabled
in Newlib unless explicitly disabled with --disable-newlib-io-float?

I found these two discussions from 2009, that mention the same issue:
http://www.rtems.com/ml/rtems-users/2009/august/msg00028.html
http://www.rtems.com/ml/rtems-users/2009/september/msg00072.html

I think I need to figure out the correct setting for the --with-float
and --with-fpu switches
[--SNIP--]

The problem indeed appears to be a mismatch in floating point format. If I swap the two 32-bit halves of my double, I can print the correct value.

I have tried to compile my toolchain with CFLAGS explicitly set to "-mfloat-abi=soft -mfpu=vfp", as recommended in one of the links from my previous post, but without any luck. I have also tried to compile my codebase with the same CFLAGS, again without any changes in the output.

I compile my codebase with -mcpu=arm7tdmi. Could this have any impact on the floating point format?

If I i run "arm-unknown-eabi-cpp -dD" my toolchain defines both __ARMEL__, __SOFTFP__ and __VFP_FP__ which should be taken into account by Newlib in include/machine/ieeefp.h to use the correct floating point format.

My build.log can be found at http://kom.aau.dk/~jledet/build_vfp.log.bz2

Best regards,
Jeppe

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]