Re: coldfire and soft-float

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On mer, 2008-06-18 at 18:02 +0300, Kai Ruottu wrote: 
> Luigi 'Comio' Mantellini wrote:
> 
> > I'm trying to compile a gcc4.3 based toolchain for m68k/coldfire with
> > support for softfloat. I noticed that there isn't --with-float=soft
> > option to include the soft floating-point library.
> 
> Stupid questions :
> 
> - Does the Coldfire core really include a FPU in some of its models?
> 

Yes. V4 cores include FPU (similar to m68k FPU). Anyway, the problem is
that in order to compile the linux kernel for m547x 2.6.23 (patched by
freescale), I need to use the soft float.

> - If it doesn't, why you think that the default for Coldfire isn't
>    using the '-msoft-float' and including the base soft-float routines
>    into the 'libgcc' ?
> 
I'm confused.. this the error:

rm -f lib/libc.so lib/libc.so.0 lib/libuClibc-0.9.29.so
m68k-linux-uclibc-ld  -shared --warn-common --warn-once -z combreloc -z relro -z defs -s  -init __uClibc_init -soname=libc.so.0 -o lib/libuClibc-0.9.29.so  --whole-archive libc/libc_so.a --no-whole-archive ./lib/interp.os ./lib/ld-uClibc.so.0 ./lib/uclibc_nonshared.a /mnt/devel/openwrt/OpenWRT.git/staging_dir/toolchain-m68k_gcc4.3.1/lib/gcc/m68k-linux-uclibc/4.3.1/libgcc.a 
libc/libc_so.a(difftime.os): In function `difftime':
difftime.c:(.text+0xe): undefined reference to `__floatsidf'
difftime.c:(.text+0x2a): undefined reference to `__subdf3'
libc/libc_so.a(_fpmaxtostr.os): In function `_fpmaxtostr':
_fpmaxtostr.c:(.text+0x8a): undefined reference to `__nedf2'
_fpmaxtostr.c:(.text+0x18c): undefined reference to `__eqdf2'
_fpmaxtostr.c:(.text+0x1aa): undefined reference to `__divdf3'
_fpmaxtostr.c:(.text+0x1be): undefined reference to `__ltdf2'
_fpmaxtostr.c:(.text+0x212): undefined reference to `__floatunsidf'
_fpmaxtostr.c:(.text+0x238): undefined reference to `__muldf3'
_fpmaxtostr.c:(.text+0x656): undefined reference to `__gedf2'
libc/libc_so.a(__psfs_do_numeric.os): In function `__psfs_do_numeric':
__psfs_do_numeric.c:(.text+0x4a2): undefined reference to `__truncdfsf2'
libc/libc_so.a(strtof.os): In function `strtof':
strtof.c:(.text+0x32): undefined reference to `__extendsfdf2'
libc/libc_so.a(__strtofpmax.os): In function `__strtofpmax':
__strtofpmax.c:(.text+0x100): undefined reference to `__adddf3'
make[5]: *** [lib/libc.so] Error 1
make[4]: *** [lib/libc.so.0] Error 2
make[4]: Leaving directory `/mnt/devel/openwrt/OpenWRT.git/build_dir/toolchain-m68k_gcc4.3.1/uClibc-0.9.29'
make[3]: *** [/mnt/devel/openwrt/OpenWRT.git/staging_dir/toolchain-m68k_gcc4.3.1/stamp/.uclibc_installed] Error 2
make[3]: Leaving directory `/mnt/devel/openwrt/OpenWRT.git/toolchain/uClibc'
make[2]: *** [toolchain/uClibc/compile] Error 2
make[2]: Leaving directory `/mnt/devel/openwrt/OpenWRT.git'
make[1]: *** [/mnt/devel/openwrt/OpenWRT.git/staging_dir/m68k/stamp/.toolchain_install] Error 2
make[1]: Leaving directory `/mnt/devel/openwrt/OpenWRT.git'
make: *** [world] Error 2



> When looking at the config stuff, it looks like the 'm68000', 'cpu32'
> and 'mcf' cores would always default to using '-msoft-float' !
> 
> With opsyses it may be that the base soft-float routines will be in
> the base C library, not in the GCC helper library, 'libgcc'.  In some
> archs like x86 there are 'exceptions' or 'traps' which would route all
> the float ops into their handling routines in the opsys kernel...
> 


Ok... understand.


> > How can I compile the gcc4.3 in order to include the soft-fp into the
> > libgcc.a library?
> 
> Probably fully normally...
> 
> > Now I have a compiler that accepts -msoft-float but no a library
> > support.
> 
> The last stupid questions are :
> 
> - what is your target?  The 'm68k/coldfire' is only the CPU type,
>    but there are still different opsyses (nothing, Linux, NetBSD,
>    OpenBSD, uClinux, RTEMS,...) to choose and different object
>    formats for the 'no opsys' case ('aout', 'coff', 'elf')...
> 

my target is uclibc. I'm working undert OpenWRT building environment
(that is a fork of buildroot).


> - what you really wrote when configuring ?  Which extra options
>    for configure besides the bare '--target=$target' ?
> 


I sent a bug report (that at this point I think that is wrong...) with
the complete invocation. I will send tomorrow the complete
configure-call.

Thanks a lot and sorry for my low knowledge on toolchains (and
english...)

luigi


-- 
     ______       Luigi Mantellini
   .'______'.     R&D - Software
  (.'      '.)    Industrie Dial Face S.p.A.
  ( :=----=: )    Via Canzo, 4
  ('.______.')    20068 Peschiera Borromeo (MI), Italy
   '.______.'     Tel.: +39 02 5167 2813
                  Fax:  +39 02 5167 2459
Ind.  Dial Face   Email: luigi.mantellini@xxxxxxxxxxx
www.idf-hit.com   GPG fingerprint: 3DD1 7B71 FBDF 6376 1B4A
                                   B003 175F E979 907E 1650





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux