[Clfs-dev] Ticket-917(b) Soft float and --with-fpu

Andrew Bradford andrew at bradfordembedded.com
Mon Jul 29 10:43:49 PDT 2013


On Sat, Jul 27, 2013, at 09:26 AM, Kirk Terrell wrote:
> In reviewing the issue of what to with --with-fpu when the soft float 
> option is selected I think the gcc manual provided an answer I just did 
> not see
> 
> > This specifies what floating-point hardware (or hardware emulation) is available on the target.
> 
> Even when there is no floating point hardware, there is emulation. The 
> following is a snippet from a kernel config for a Versatilepb board:
> 
> > #
> > # Floating point emulation
> > #
> >
> > #
> > # At least one emulation must be selected
> > #
> > CONFIG_FPE_NWFPE=y
> > # CONFIG_FPE_NWFPE_XP is not set
> > # CONFIG_FPE_FASTFPE is not set
> > CONFIG_VFP=y
> 
> I compiled gcc with --with-fpu=vfp and it successfully compiled. It 
> appears that if a fpu is not specified that there a cpu dependant 
> defaults - the following articles lists them - 
> http://www.keil.com/support/man/docs/armcc/armcc_CIHGDBHC.htm

OK.  Can you distill this down to a patch for the current book?  The
fact that the kernel config *must* have a few settings is important to
get across.  Is it safe to enable CONFIG_VFP and CONFIG_FPE_NWFPE on all
arm processors? (I think it is but haven't checked)

Have you checked that setting things up this way actually works on real
or emulated ARM9 hardware without any FPU?  Being slow is OK, being
broken might not be.

Do you think there's value in simply setting the CLFS_FPU to something
sane that works everywhere and by default not letting the user pick? 
Like if setting CLFS_FPU to simply vfp works on all arm processors (so
long as those without hard vfp have NWFPE) then let's just do that and
simplify the "Build Variables" section.  We can make a note that there's
other FPU settings if you really want to tweak things (like some apps
really take advantage of NEON but it's not always present).

Thanks,
Andrew



More information about the Clfs-dev mailing list