* [PATCH 0/2] Toolchain configuations for enabling ARM hardfp ABI
@ 2011-05-13 18:38 Khem Raj
2011-05-13 18:38 ` [PATCH 1/2] tune-cortexa8.inc: Define variable for controlling FP ABI Khem Raj
2011-05-13 18:38 ` [PATCH 2/2] gcc-common.inc: Consider hardfp knob for configuring toolchain Khem Raj
0 siblings, 2 replies; 3+ messages in thread
From: Khem Raj @ 2011-05-13 18:38 UTC (permalink / raw)
To: OE core
On armv7 machines with neon or vfp, gcc can support hardfp calling convention
These changes introduce a new variable to control the FP abi for ARM. This
variable can be set in machine.conf files or in local.conf to chose the
desired ABI, The defaults remain same i.e. softfp calling conventions for
passing floating point arguments.
I have bootied the generated root file system on beagleboard
Pull URL: git://git.openembedded.org/openembedded-core-contrib
Branch: kraj/arm-hardfp
Browse: http://git.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=kraj/arm-hardfp
Thanks,
Khem Raj <raj.khem@gmail.com>
---
Khem Raj (2):
tune-cortexa8.inc: Define variable for controlling FP ABI
gcc-common.inc: Consider hardfp knob for configuring toolchain
meta/conf/machine/include/tune-cortexa8.inc | 14 ++++++++++----
meta/recipes-devtools/gcc/gcc-common.inc | 13 ++++++++++---
2 files changed, 20 insertions(+), 7 deletions(-)
--
1.7.4.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] tune-cortexa8.inc: Define variable for controlling FP ABI
2011-05-13 18:38 [PATCH 0/2] Toolchain configuations for enabling ARM hardfp ABI Khem Raj
@ 2011-05-13 18:38 ` Khem Raj
2011-05-13 18:38 ` [PATCH 2/2] gcc-common.inc: Consider hardfp knob for configuring toolchain Khem Raj
1 sibling, 0 replies; 3+ messages in thread
From: Khem Raj @ 2011-05-13 18:38 UTC (permalink / raw)
To: OE core
ARM_FP_ABI also is poked from gcc configure to enable hardfp
for parameter
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/conf/machine/include/tune-cortexa8.inc | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/meta/conf/machine/include/tune-cortexa8.inc b/meta/conf/machine/include/tune-cortexa8.inc
index a5b982a..d5e15c6 100644
--- a/meta/conf/machine/include/tune-cortexa8.inc
+++ b/meta/conf/machine/include/tune-cortexa8.inc
@@ -3,11 +3,17 @@
# [2] http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
# [3] https://support.codesourcery.com/GNUToolchain/kbentry29
-TARGET_CC_ARCH = "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -fno-tree-vectorize"
+# Can be one of ['softfp' 'hardfp']
+ARM_FP_ABI ?= "softfp"
+
+ARM_FP_OPT = "${@['-mfloat-abi=softfp', '-mfloat-abi=hard'][bb.data.getVar('ARM_FP_ABI', d, 1) == 'hardfp']}"
+ARM_FP_PACKAGESUFFIX = "${@['', '-hardfp'][bb.data.getVar('ARM_FP_ABI', d, 1) == 'hardfp']}"
+
+TARGET_CC_ARCH = "-march=armv7-a -mtune=cortex-a8 -mfpu=neon ${ARM_FP_OPT} -fno-tree-vectorize"
# Other potentially useful options
#-ftree-vectorize -ffast-math -fno-omit-frame-pointer
-FEED_ARCH = "armv7a"
-BASE_PACKAGE_ARCH = "armv7a"
-PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te armv6 armv7 armv7a"
+FEED_ARCH = "armv7a${ARM_FP_PACKAGESUFFIX}"
+BASE_PACKAGE_ARCH = "armv7a${ARM_FP_PACKAGESUFFIX}"
+PACKAGE_EXTRA_ARCHS = "arm armv4 armv4t armv5te armv6 armv7 armv7a${ARM_FP_PACKAGESUFFIX}"
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] gcc-common.inc: Consider hardfp knob for configuring toolchain
2011-05-13 18:38 [PATCH 0/2] Toolchain configuations for enabling ARM hardfp ABI Khem Raj
2011-05-13 18:38 ` [PATCH 1/2] tune-cortexa8.inc: Define variable for controlling FP ABI Khem Raj
@ 2011-05-13 18:38 ` Khem Raj
1 sibling, 0 replies; 3+ messages in thread
From: Khem Raj @ 2011-05-13 18:38 UTC (permalink / raw)
To: OE core
pass --with-float=hard|soft depending upon ARM_FP_ABI settings
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-devtools/gcc/gcc-common.inc | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index a3fa234..8b7c3ad 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -8,10 +8,17 @@ NATIVEDEPS = ""
inherit autotools gettext
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-
def get_gcc_fpu_setting(bb, d):
- if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
- 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):
--
1.7.4.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-13 18:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-13 18:38 [PATCH 0/2] Toolchain configuations for enabling ARM hardfp ABI Khem Raj
2011-05-13 18:38 ` [PATCH 1/2] tune-cortexa8.inc: Define variable for controlling FP ABI Khem Raj
2011-05-13 18:38 ` [PATCH 2/2] gcc-common.inc: Consider hardfp knob for configuring toolchain Khem Raj
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox