compile gcc on odroid-u2 with mfpu=neon – Arch linux

currently gcc 4.8.1 on Arch (07.10.13)

Flags in makepkg.conf

CPPFLAGS=""
CFLAGS="-O3 -pipe -march=armv7-a -mcpu=cortex-a9 -mfloat-abi=hard -mfpu=neon -fstack-protector --param=ssp-buffer-size=4"
CXXFLAGS="-O3 -pipe -march=armv7-a -mcpu=cortex-a9 -mfloat-abi=hard -mfpu=neon -fstack-protector --param=ssp-buffer-size=4"

PKGBUILD needs one patch adding (neon-update3.patch) and one removing (armhf-triplet-trunk.diff)
As it is patch will fail to find the file to be patched and you will have to supply the full path.
in my case

 /var/build/gcc/src/gcc-4.8-20130725/gcc/config/arm/neon.md

Also need to change flags pass to GCC by configure.

[[ $CARCH == "armv7h" ]] && CONFIGFLAG="--host=armv7l-unknown-linux-gnueabihf --build=armv7l-unknown-linux-gnueabihf --with-arch=armv7-a --with-float=hard --with-fpu=neon"

The PKGBUILD with the changes is attached as is neon-update3.patch

The original PKGBUILD is from https://github.com/archlinuxarm/PKGBUILDs/blob/master/core/gcc/PKGBUILD

neon-update3.patch is from http://gcc.1065356.n5.nabble.com/PATCH-ARM-Fix-unrecognizable-vector-comparisons-td947064.html

PKGBUILD.orig

PKGBUILD

neon-update3.patch

Leave a Reply

Your email address will not be published. Required fields are marked *

Are we human, or are we dancers ? *