aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/gcc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-03-31 07:48:29 -0700
committerTom Rini <trini@kernel.crashing.org>2011-09-22 16:55:35 -0700
commitf0a2cb37fca677390e5b0c33628addb7615fa846 (patch)
treea568e16572ba4321cfa11987d09a21812b97607e /recipes/gcc
parentb1b372482515dd1e0bdcd05108d7be28303065d6 (diff)
downloadopenembedded-f0a2cb37fca677390e5b0c33628addb7615fa846.tar.gz
conf/,gcc-common.inc: Add support for ARM hard float toolchain
Rename ARM_FP_MODE to ARM_FP_ABI Set target fpu to hard for hardfp ARMv7 Use machine override to add base package arch instead of appending to OVERRIDES directly Pass --with-float option to gcc configure taking into account what float ABI is selected through ARM_FP_ABI Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Diffstat (limited to 'recipes/gcc')
-rw-r--r--recipes/gcc/gcc-common.inc12
1 files changed, 10 insertions, 2 deletions
diff --git a/recipes/gcc/gcc-common.inc b/recipes/gcc/gcc-common.inc
index 9fd433b74f..d32b2ba002 100644
--- a/recipes/gcc/gcc-common.inc
+++ b/recipes/gcc/gcc-common.inc
@@ -15,8 +15,16 @@ COMPATIBLE_TARGET_SYS ?= "(?!nios2)"
# for building for the new host part. So only obey TARGET_FPU for the
# real target.
def get_gcc_fpu_setting(bb, d):
- if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ] and bb.data.getVar('TARGET_OS', d, 1).find('linux') >= 0 :
- return "--with-float=soft"
+ if bb.data.getVar('TARGET_FPU', d, True) in [ 'soft', 'hard'] and bb.data.getVar('TARGET_OS', d, True).find('linux') >= 0 :
+ # ARM_FP_ABI could be either 'hardfp' or 'softfp'
+ arm_fpabi = bb.data.getVar('ARM_FP_ABI', d, True) or ""
+ if arm_fpabi != "":
+ if arm_fpabi == "hardfp":
+ # reset it to whatever gcc --with-float configure expects which is either 'softfp' or 'hard'
+ arm_fpabi = "hard"
+ return "--with-float=" + arm_fpabi
+ else:
+ return "--with-float=" + bb.data.getVar('TARGET_FPU', d, True)
return ""
def get_gcc_mips_plt_setting(bb, d):