dtoa.c fails to compile for sh-elf -m2e (Was: Re: strtod (and atof) on hex numbers)

Jeff Johnston jjohnstn@redhat.com
Wed Jul 12 07:35:00 GMT 2006


Jeff Johnston wrote:
> amylaar@spamcop.net wrote:
> 
>> Quoting Jeff Johnston <jjohnstn@redhat.com>:
>>
>>
>>> Joern Rennecke wrote:
>>>
>>>> You change to mprec.h broke dtoa.c compilation for sh2e:
>>>>
>>>
>>> Please try the attached patch and let me know if it sovles the problem.
>>
>>
>>
>> Yes, it allows dtoa.c to compile.  However, the build now fails a bit
>> later on strtod:
>>
> 
> Ok, I need to look into this a bit deeper and test with a 
> DOUBLE_IS_32BITS system.
> 
> -- Jeff J.
>

I have checked in a patch.  It does build under sh m2e, but when I 
attempt to use the sh-elf-run simulator to test m23, my test outputs 
gibberish.  I do not believe the simulator can handle code compiled and 
linked with m2e option as the same thing happens when I use the old 
strtod code.  It does work fine with the default compiler options.

-- Jeff J.

>> /swbuild/nightly/2006-06-24/sh-elf-mprec/./gcc/xgcc
>> -B/swbuild/nightly/2006-06-24/sh-elf-mprec/./gcc/ -nostdinc
>> -B/swbuild/nightly/2006-06-24/sh-elf-mprec/sh-elf/newlib/ -isystem
>> /swbuild/nightly/2006-06-24/sh-elf-mprec/sh-elf/newlib/targ-include 
>> -isystem
>> /swbuild/nightly/2006-06-24/srcw/newlib/libc/include 
>> -B/usr/local/sh-elf/bin/
>> -B/usr/local/sh-elf/lib/ -isystem /usr/local/sh-elf/include -isystem
>> /usr/local/sh-elf/sys-include 
>> -L/swbuild/nightly/2006-06-24/sh-elf-mprec/./ld
>> -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\"
>> -DPACKAGE_VERSION=\"1.14.0\" -DPACKAGE_STRING=\"newlib\ 1.14.0\"
>> -DPACKAGE_BUGREPORT=\"\"  -I. 
>> -I../../../../../../srcw/newlib/libc/stdlib -O2
>> -fno-builtin      -O2 -g -O2   -m2e -c -o lib_a-strtod.o `test -f 
>> 'strtod.c' ||
>> echo '../../../../../../srcw/newlib/libc/stdlib/'`strtod.c
>> ../../../../../../srcw/newlib/libc/stdlib/strtod.c: In function �ULtod�:
>> ../../../../../../srcw/newlib/libc/stdlib/strtod.c:154: error: �_1� 
>> undeclared
>> (first use in this function)
>> ../../../../../../srcw/newlib/libc/stdlib/strtod.c:154: error: (Each 
>> undeclared
>> identifier is reported only once
>> ../../../../../../srcw/newlib/libc/stdlib/strtod.c:154: error: for 
>> each function
>> it appears in.)
>> ../../../../../../srcw/newlib/libc/stdlib/strtod.c:155: error: �_0� 
>> undeclared
>> (first use in this function)
>> ../../../../../../srcw/newlib/libc/stdlib/strtod.c: In function 
>> �_strtod_r�:
>> ../../../../../../srcw/newlib/libc/stdlib/strtod.c:439: error: 
>> �Flt_Rounds�
>> undeclared (first use in this function)
> 
> 



More information about the Newlib mailing list