i.MX515 Project
Gentoo/ARM support

in category Linux Distributions
proposed by armin76 on 16th March 2009 (accepted on 2nd July 2010)
[View Full Project]
  ARM hardfloat and Gentoo
posted by armin76 on 6th January 2011


I posted this a month ago on my blog, it doesn't hurt to repost it here so it shows my project is still alive.

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.
Genesi Network: Genesi - Main Site Power2People PowerDeveloper