Hello,
Since gcc-4.5.0, the option for a hardfloat toolchain has been available for ARM. I’m not going to duplicate the information about hardfloat on ARM, since its really well explained here: http://wiki.debian.org/ArmHardFloatPort
Summarizing, using hardfloat over softfp and softfloat, provides a better performance. However there is a “problem”. Almost all the devices using ARMv5 processors don’t have VFP, so for the users of those devices it won’t make a difference. With ARMv7 there’s no problem, because as far as i know, there’s no ARMv7 processor which doesn’t have VFP(correct me if i’m wrong).
Anyway, focusing on the Gentoo part, back in July, Siarhei Siamashka (ssvb) bootstraped a hardfloat ARMv7 stage3. For which i’d like to thank him. I worked with Siarhei on getting the changes needed for getting a hardfloat toolchain in Gentoo if -hardfloat- is used in the CHOST, among other things.
Last month i released a hardfloat stage3, so anyone who wants to use it, is free to do so. However keep in mind that since gcc-4.5.0 is not stable(stable is 4.4.4-r2 as of this writing), you need to have this in your package.keywords file, so portage won’t downgrade gcc and diffutils:
sys-devel/gcc
sys-apps/diffutils
You can download the stage3 from here:
http://distfiles.gentoo.org/releases/arm/autobuilds/current-stage3-armv7a_hardfp/
Those stages have been built using:
-CHOST=”armv7a-hardfloat-linux-gnueabi”
-CFLAGS=”-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16″
The “-mfloat-abi=hard” is implied by the hardfloat string in CHOST using the Gentoo eclasses.
Have fun and happy testing!
Update: I forgot to say that binary blobs won’t work with hardfloat if they’re not built using a hardfloat toolchain. That means that if you’re using a video driver(f.ex, pvr drivers for OMAP hw) that is built as binary, it won’t work.
December 10, 2010 at 09:36 |
will do on the weekend with my touchbook 🙂
WOW, from your link:
They noticed important wins (in the order of 40% performance improvement) in floating-point heavy applications/libraries such as mesa, with a Cortex-A8 CPU.
December 10, 2010 at 13:25 |
Are there any ARMv7a ISA chips that don’t have NEON? I’m pretty sure that it’s a mandatory part of the ISA.
Naturally, on an ARMv7a chip, VFP instructions are still executed by the same physical FPU, but I believe it’s done without using any SIMD.
Wouldn’t it make more sense just to specify NEON from the get-go – so, armv7a-hardfloat-* produces -mfpu=neon -mfloat-abi=hard rather than -mfpu=vfpv3-d16 ?
December 10, 2010 at 14:27 |
Hi Chris,
both the Marvell Dove and Nvidia Tegra2 are chips that don’t have neon, check: http://dev.gentoo.org/~armin76/arm/tegra2/cpuinfo.txt
with -mfpu=neon it would SIGILL on those chips. Although funnily enough building glibc on hardfloat on the tegra fails to build for me, it gives a segfault 😀 Ubuntu had an issue lately where QT was built with neon enabled, as the QT build system detected neon on the system(they use i.mx515 as buildd’s). And that was fun because it affected users of the Toshiba AC100 which is a Tegra2 smartbook. One of those users affected was one of the ubuntu arm devs 😛
December 11, 2010 at 12:35
good to know – although a little disappointing 😛
December 31, 2010 at 20:48 |
Hello.
I try build system (beagleboard-xM) with CFLAGS=”-O2 -pipe -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a8″
I have problem with compiling ffmpeg with neon support
Can you help me?
January 9, 2011 at 17:21 |
Hi Aleksandr,
sorry but i’m not able to help. I’d suggest you join #gentoo-embedded on irc.freenode.net and talk with Siarhei (ssvb), since he’s the one that works mainly with hardfloat.
March 16, 2011 at 17:24 |
I tried to create a crosscompile environment from x86_64 to arm, using
crossdev –g 4.5.2 –b 2.21 –l 2.11.3 armv7a-hardfloat-linux-gnueabi
it works until the libc in between the two gcc-stages is build. it seems like CHOST is set wrongly then; -m32 is used in configure. but even if i patch it to the right CHOST, -m32 is used. and then, even if i filter -m32 in the ebuild of libc, -m32 does not occur on the command-line, but the compiler complains about it. do you have any idea, what i am doing wrong?
other question: did you use catalyst to build the stage3? which options did you use, if so?
March 16, 2011 at 19:45 |
Hi David,
i’m sorry but i’m unable to help wrt cross-compiling. I’d suggest you join #gentoo-embedded on irc.freenode.net and ask there.
The catalyst specs are here: http://sources.gentoo.org/cgi-bin/viewvc.cgi/releng/trunk/releases/weekly/specs/arm/armv7a/hardfloat/
April 20, 2012 at 16:50 |
I have installed gentoo on pandaboard es based on your original pandaboard tutorial. I would like to provide the information about the changes that are necessary to make it work on es version. How can I contact you or now can I provide this information.
January 18, 2014 at 12:59 |
I would love to get that info about the Pandaboard ES!