lua-users home
lua-l archive

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


On Aug 3, 2012, at 10:51 AM, Aniruddha A wrote:

> I am trying to build and use Lua on a platform where hardware FP
> support is not present
> I want to know if people have been able to successfully build/run with
> '-msoft-float'.

Yes.

> And, in that case, which soft-float routines were compiled with the
> code, the ones
> in 'libgcc', or custom written ones.

I've used both the standard libgcc soft-float and the GOFAST naming variant. I have not actually dropped in the real GOFAST library, just the libgcc emulation of it. I don't recall using vendor libs but probably I have at some point.

> (I did some search before posting, I found some threads, but I could
> not clearly get which
> soft float functions were used, and which GCC versions were used)

I've used from gcc 2.95 to 4.5.

What you need is a working, fully configured toolchain for your target. Speaking from painful experience, it is important to have this toolchain created in some reproducible way--preferably an automated build process. This will allow you to add the right configure options for gcc (and platform defs if necessary) and know exactly what you did. Compiler bugs are bad enough; compiler bugs when you don't really know the version or configuration--or the mixed versions--are really bad.

If you're building for a Linux platform, uclibc's builder is quite good. OpenWrt is reasonable as well. 

If you're on bare metal, something like "summon-arm-toolchain" uses newlib to provide/stub out OS functions. s-a-t is what I'm currently using on Cortex M3.

Jay