"Mian M. Hamayun" <mian-muhammad.hamayun@xxxxxxx> writes: > I am trying to build a gcc toolchain with newlib for an i386 target > which doesn't support hw float instructions. In fact it is a virtual > machine which I am targeting. So when I compile my applications with > "-msoft-float" flag, I get quite a few unresolved symbols. > > For Example: > Sources/susan.c:979: undefined reference to `__floatsisf' > Sources/susan.c:979: undefined reference to `__divsf3' > Sources/susan.c:1626: undefined reference to `__subdf3' > Sources/susan.c:1628: undefined reference to `__mulsf3' > ... > > So my obvious guess is to rebuild the gcc toolchain and/or newlib > using "--with-float=soft" and/or "--enable-soft-float" options. But so > far I haven't been able to build a toolchain that solves this > issue. In fact the toolchain compiles, but I still get the unresolved > symbols. As far as I can tell gcc is not set up for this for x86 targets. I can only assume that people using -msoft-float with x86 targets are using handrolled floating point libraries. To get gcc to build a floating point library, I think you need to change the line softfp_float_modes := tf in the file gcc/config/i386/t-fprules-softfp to be softfp_float_modes := sf df tf I don't know if that will suffice but as far as I can see it is a necessary step. Ian