public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] scripts: add softfp support
@ 2011-10-19  2:29 Michael Hope
  2011-10-19 21:02 ` Yann E. MORIN
  0 siblings, 1 reply; 23+ messages in thread
From: Michael Hope @ 2011-10-19  2:29 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

# HG changeset patch
# User Michael Hope <michael.hope@linaro.org>
# Date 1318991252 -46800
# Node ID a31d097e28cd73d07a5484129929a500b4d58efa
# Parent  a32156bd31c0d395e8d346431b123a7d2caa14cd
scripts: add softfp support

ARM compilers can be built for soft float (software only, floats in
core registers), hard float (uses floating point instructions, floats
in FPU registers), or the half-way house softfp (uses floating point
instructions, floats in core registers).

Add support for softfp cross compilers to the GCC and GLIBC
configuration.  Needed for Ubuntu and other distros that are softfp.

Signed-off-by: Michael Hope <michael.hope@linaro.org>

diff -r a32156bd31c0 -r a31d097e28cd config/target.in
--- a/config/target.in	Sun Oct 16 17:51:42 2011 +0200
+++ b/config/target.in	Wed Oct 19 15:27:32 2011 +1300
@@ -271,6 +271,22 @@
       If your processor has no FPU, then you most probably want this, as it
       is faster than emulating the FPU in the kernel.
 
+config ARCH_FLOAT_SOFTFP
+    bool
+    prompt "softfp"
+    depends on ARCH_arm
+    help
+      Emit hardware floating point opcodes but use the software
+      floating point calling convention.
+      
+      Architectures such as ARM use different registers for passing
+      floating point values depending on if they're in software mode
+      or hardware mode.  softfp emits FPU instructions but uses the
+      software FP calling convention allowing softfp code to
+      interoperate with legacy software only code.
+
+      If in doubt, use 'software' or 'hardware' mode instead.
+
 endchoice
 
 config TARGET_CFLAGS
diff -r a32156bd31c0 -r a31d097e28cd scripts/build/libc/glibc-eglibc.sh-common
--- a/scripts/build/libc/glibc-eglibc.sh-common	Sun Oct 16 17:51:42 2011 +0200
+++ b/scripts/build/libc/glibc-eglibc.sh-common	Wed Oct 19 15:27:32 2011 +1300
@@ -132,9 +132,10 @@
         *) extra_config+=("--disable-shared");;
     esac
 
-    case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW}" in
-        y,) extra_config+=("--with-fp");;
-        ,y) extra_config+=("--without-fp");;
+    case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW},${CT_ARCH_FLOAT_SOFTFP}" in
+        y,,) extra_config+=("--with-fp");;
+        ,y,) extra_config+=("--without-fp");;
+        ,,y) extra_config+=("--with-fp");;
     esac
 
     if [ "${CT_LIBC_DISABLE_VERSIONING}" = "y" ]; then
diff -r a32156bd31c0 -r a31d097e28cd scripts/functions
--- a/scripts/functions	Sun Oct 16 17:51:42 2011 +0200
+++ b/scripts/functions	Wed Oct 19 15:27:32 2011 +1300
@@ -984,6 +984,7 @@
     [ "${CT_ARCH_TUNE}"     ] && { CT_ARCH_TUNE_CFLAG="-mtune=${CT_ARCH_TUNE}";  CT_ARCH_WITH_TUNE="--with-tune=${CT_ARCH_TUNE}"; }
     [ "${CT_ARCH_FPU}"      ] && { CT_ARCH_FPU_CFLAG="-mfpu=${CT_ARCH_FPU}";     CT_ARCH_WITH_FPU="--with-fpu=${CT_ARCH_FPU}";    }
     [ "${CT_ARCH_FLOAT_SW}" ] && { CT_ARCH_FLOAT_CFLAG="-msoft-float";           CT_ARCH_WITH_FLOAT="--with-float=soft";          }
+    [ "${CT_ARCH_FLOAT_SOFTFP}" ] && { CT_ARCH_FLOAT_CFLAG="-mfloat-abi=softfp"; CT_ARCH_WITH_FLOAT="--with-float=softfp";        }
 
     # Build the default kernel tuple part
     CT_TARGET_KERNEL="${CT_KERNEL}"

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2011-11-28 17:46 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-19  2:29 [PATCH] scripts: add softfp support Michael Hope
2011-10-19 21:02 ` Yann E. MORIN
2011-10-20  0:30   ` Michael Hope
2011-10-21  2:17   ` Michael Hope
2011-11-01 23:42     ` [PATCH 0 of 4] Adding " Yann E. MORIN
2011-11-01 23:42       ` [PATCH 1 of 4] scripts: introduce float type as a string Yann E. MORIN
2011-11-25 12:20         ` Morten Thunberg Svendsen
2011-11-25 17:13           ` Yann E. MORIN
2011-11-25 23:23             ` [PATCH 0 of 6] Fix --with-float= for architectures that do not support it Yann E. MORIN
2011-11-25 23:23               ` [PATCH 2 of 6] arch/arm: ARM supports setting the floating point type Yann E. MORIN
2011-11-25 23:23               ` [PATCH 1 of 6] config/target: add float support selection Yann E. MORIN
2011-11-28 12:32                 ` Thomas Petazzoni
2011-11-28 17:46                   ` Yann E. MORIN
2011-11-25 23:23               ` [PATCH 3 of 6] arch/mips: MIPS supports setting the floating point type Yann E. MORIN
2011-11-25 23:30               ` [PATCH 6 of 6] config/target: enforce floating point support Yann E. MORIN
2011-11-25 23:30               ` [PATCH 5 of 6] arch/sparc: Sparc supports setting the floating point type Yann E. MORIN
2011-11-25 23:30               ` [PATCH 4 of 6] arch/powerpc: PowerPC " Yann E. MORIN
2011-11-01 23:43       ` [PATCH 3 of 4] arch: add softfp support Yann E. MORIN
2011-11-01 23:43       ` [PATCH 2 of 4] scripts: use the hardfloat option to set configure and CFLAGS Yann E. MORIN
2011-11-01 23:50       ` [PATCH 4 of 4] arch/arm: ARM supports the softfp convention Yann E. MORIN
2011-11-07 20:40       ` [PATCH 0 of 4] Adding softfp support Yann E. MORIN
2011-11-09  0:48       ` Michael Hope
2011-11-09 19:01         ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).