Problems with floating-point support on ARM

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Oct 19 13:53:34 UTC 2009


Sebastian Huber wrote:
> Ralf Corsepius wrote:
> [...]
>> Comments from other arm users? Will vfp work for your boards?
> [...]
> 
> No comments from other ARM users in two weeks.
> 
> We should change the default floating-point model in GCC from FPA to VFP.
> 

It would be nice if the RTEMS 4.10 ARM GCC could use VFP as the default
floating-point model. Is this the way to do it?

Index: contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gcc.spec
===================================================================
RCS file:
/usr1/CVS/rtems/contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gcc.spec,v
retrieving revision 1.55
diff -u -r1.55 rtems-4.10-arm-rtems4.10-gcc.spec
--- contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gcc.spec   9 Oct
2009 04:20:08 -0000       1.55
+++ contrib/crossrpms/rtems4.10/arm/rtems-4.10-arm-rtems4.10-gcc.spec   19 Oct
2009 12:50:35 -0000
@@ -244,6 +244,8 @@
     --with-gnu-as --with-gnu-ld --verbose \
     --with-newlib \
     --with-system-zlib \
+    --with-float=soft \
+    --with-fpu=vfp \
     --disable-nls --without-included-gettext \
     --disable-win32-registry \
     --enable-version-specific-runtime-libs \

The ARM multi-lib configuration for GCC should be changed to:

Index: gcc/config/arm/rtems-elf.h
===================================================================
--- gcc/config/arm/rtems-elf.h  (revision 152974)
+++ gcc/config/arm/rtems-elf.h  (working copy)
@@ -31,14 +31,6 @@
     } while (0)

 /*
- * The default in gcc now is soft-float, but gcc misses it to
- * pass it to the assembler.
- */
-#undef SUBTARGET_EXTRA_ASM_SPEC
-#define SUBTARGET_EXTRA_ASM_SPEC "\
-  %{!mhard-float: %{!msoft-float:-mfpu=softfpa}}"
-
-/*
  *  The default includes --start-group and --end-group which conflicts
  *  with how this used to be defined.
  */
Index: gcc/config/arm/t-rtems
===================================================================
--- gcc/config/arm/t-rtems      (revision 152974)
+++ gcc/config/arm/t-rtems      (working copy)
@@ -5,6 +5,6 @@
 MULTILIB_EXCEPTIONS  =
 MULTILIB_MATCHES     = marm=mno-thumb

-MULTILIB_OPTIONS    += msoft-float/mhard-float
+MULTILIB_OPTIONS    += mfloat-abi=soft/mfloat-abi=softfp
 MULTILIB_DIRNAMES   += soft fpu
-MULTILIB_EXCEPTIONS += *mthumb/*mhard-float*
+MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=softfp*

Have a nice day!

-- 
Sebastian Huber, embedded brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the users mailing list