Compile Angstrom in OE with -mfloat-abi=hard

Hello,

I'm trying to compile Angstrom (via Openembedded) with floating point
optimizations how recommended on http://pandorawiki.org/Floating_Point_Optimization.

I read in one of Koen Kooi's posts(http://groups.google.com/group/
beagleboard/msg/909c4c3b3ab74116), that it should be sufficient to
add

ARM_FP_MODE = "hardfp"

in my local.conf. Without the above line the building process
terminate successfully, if I compile the base image (oebb.sh bitbake
base-image).

Unfortunately the task gcc-cross-initial-4.3.3-r23.2 failed, if I
activate hardfp. Error log:

[...]
make[2]: Leaving directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/armv7a-hardfp-
angstrom-linux-gnueabi/gcc-cross-initial-4.3.3-r23.2/gcc-4.3.3/
build.i686-linux.arm-angstrom-linux-gnueabi/gcc'
  Checking multilib configuration for libgcc...
  Configuring in arm-angstrom-linux-gnueabi/libgcc
  configure: loading cache ./config.cache
  checking for --enable-version-specific-runtime-libs... no
  checking for a BSD-compatible install... /home/olaf/beagleboard/
angstrom/jan2011/angstrom-setup-scripts/sources/openembedded/bin/
install -c
  checking for gawk... gawk
  checking build system type... i686-pc-linux-gnu
  checking host system type... arm-angstrom-linux-gnueabi
  checking for arm-angstrom-linux-gnueabi-ar... /home/olaf/beagleboard/
angstrom/jan2011/angstrom-setup-scripts/build/tmp-angstrom_2008_1/
sysroots/i686-linux/usr/armv7a-hardfp/arm-angstrom-linux-gnueabi/bin/
ar
  checking for arm-angstrom-linux-gnueabi-lipo... arm-angstrom-linux-
gnueabi-lipo
  checking for arm-angstrom-linux-gnueabi-nm... /home/olaf/beagleboard/
angstrom/jan2011/angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/
armv7a-hardfp-angstrom-linux-gnueabi/gcc-cross-initial-4.3.3-r23.2/
gcc-4.3.3/build.i686-linux.arm-angstrom-linux-gnueabi/./gcc/nm
  checking for arm-angstrom-linux-gnueabi-ranlib... /home/olaf/
beagleboard/angstrom/jan2011/angstrom-setup-scripts/build/tmp-
angstrom_2008_1/sysroots/i686-linux/usr/armv7a-hardfp/arm-angstrom-
linux-gnueabi/bin/ranlib
  checking for arm-angstrom-linux-gnueabi-strip... /home/olaf/
beagleboard/angstrom/jan2011/angstrom-setup-scripts/build/tmp-
angstrom_2008_1/sysroots/i686-linux/usr/armv7a-hardfp/arm-angstrom-
linux-gnueabi/bin/strip
  checking whether ln -s works... yes
  checking for arm-angstrom-linux-gnueabi-gcc... /home/olaf/beagleboard/
angstrom/jan2011/angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/
armv7a-hardfp-angstrom-linux-gnueabi/gcc-cross-initial-4.3.3-r23.2/
gcc-4.3.3/build.i686-linux.arm-angstrom-linux-gnueabi/./gcc/xgcc -B/
home/olaf/beagleboard/angstrom/jan2011/angstrom-setup-scripts/build/
tmp-angstrom_2008_1/work/armv7a-hardfp-angstrom-linux-gnueabi/gcc-
cross-initial-4.3.3-r23.2/gcc-4.3.3/build.i686-linux.arm-angstrom-
linux-gnueabi/./gcc/ -march=armv7-a -mtune=cortex-a8 -mfpu=neon -
mfloat-abi=hard -mthumb-interwork -mno-thumb -isystem/home/olaf/
beagleboard/angstrom/jan2011/angstrom-setup-scripts/build/tmp-
angstrom_2008_1/sysroots/armv7a-hardfp-angstrom-linux-gnueabi/usr/
include -B/home/olaf/beagleboard/angstrom/jan2011/angstrom-setup-
scripts/build/tmp-angstrom_2008_1/sysroots/i686-linux/usr/armv7a-
hardfp/arm-angstrom-linux-gnueabi/bin/ -B/home/olaf/beagleboard/
angstrom/jan2011/angstrom-setup-scripts/build/tmp-angstrom_2008_1/
sysroots/i686-linux/usr/armv7a-hardfp/arm-angstrom-linux-gnueabi/lib/ -
isystem /home/olaf/beagleboard/angstrom/jan2011/angstrom-setup-scripts/
build/tmp-angstrom_2008_1/sysroots/i686-linux/usr/armv7a-hardfp/arm-
angstrom-linux-gnueabi/include -isystem /home/olaf/beagleboard/
angstrom/jan2011/angstrom-setup-scripts/build/tmp-angstrom_2008_1/
sysroots/i686-linux/usr/armv7a-hardfp/arm-angstrom-linux-gnueabi/sys-
include

  checking for suffix of object files... configure: error: cannot
compute suffix of object files: cannot compile

  See `config.log' for more details.
  make[1]: *** [configure-target-libgcc] Error 1
  make[1]: Leaving directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/armv7a-hardfp-
angstrom-linux-gnueabi/gcc-cross-initial-4.3.3-r23.2/gcc-4.3.3/
build.i686-linux.arm-angstrom-linux-gnueabi'
  make: *** [all] Error 2
  FATAL: oe_runmake failed
  ERROR: Function do_compile failed

I'm not sure, how to interpret the error message.
It.s necessary (and sufficient) to switch to an external toolchain
like csl2009q1 or use gcc4.5 as internal toolchain, which both support
the option -mfloat-abi=hard?

Thanks in advance,
Olaf Schulz

You also need to set DISTRO to angstrom-2010.x :slight_smile:

Hello Koen,

thanks for this hint :slight_smile:

You also need to set DISTRO to angstrom-2010.x :slight_smile:

With DISTRO="angstrom-2010.x" will most of the code complied.
It runs till u-boot_git.bb fails. Has anybody an idea, how to fix
this?
I assume the errors in the lines after

make[1]: Entering directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
tools/env'
/tmp-angstrom_2008_1/work/beagleboard-angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
include crc32.c fw_env.c fw_env_main.c -o fw_printenv

occurs, because fw_printenv wasn't created. But I can not detect the
reason.
Or is
'fatal: No names found, cannot describe anything.'
the culprit? I'm not well versed in git.

Thanks in advance
Olaf Schulz

Log:
NOTE: make CROSS_COMPILE=arm-angstrom-linux-gnueabi- all
Generating include/autoconf.mk
Generating include/autoconf.mk.dep
fatal: No names found, cannot describe anything.
for dir in tools examples/standalone examples/api cpu/arm_cortexa8 /
home/olaf/beagleboard/angstrom/jan2011/angstrom-setup-scripts/build/
tmp-angstrom_2008_1/work/beagleboard-angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
cpu/arm_cortexa8/ ; do \
      make -C $dir _depend ; done
make[1]: Entering directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
tools'
make[1]: Leaving directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
tools'
make[1]: Entering directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
tools'
make[1]: Nothing to be done for `_depend'.

[...]

arm-angstrom-linux-gnueabi-objcopy -O srec u-boot u-boot.srec
arm-angstrom-linux-gnueabi-objcopy --gap-fill=0xff -O binary u-boot u-
boot.bin
NOTE: make CROSS_COMPILE=arm-angstrom-linux-gnueabi- tools env
fatal: No names found, cannot describe anything.
for dir in tools examples/standalone examples/api cpu/arm_cortexa8 /
home/olaf/beagleboard/angstrom/jan2011/angstrom-setup-scripts/build/
tmp-angstrom_2008_1/work/beagleboard-angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
cpu/arm_cortexa8/ ; do \
      make -C $dir _depend ; done
make[1]: Entering directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
tools'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
tools'
make[1]: Entering directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
examples/standalone'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
examples/standalone'
make[1]: Entering directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
examples/api'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
examples/api'
make[1]: Entering directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
cpu/arm_cortexa8'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
cpu/arm_cortexa8'
make[1]: Entering directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
cpu/arm_cortexa8'
make[1]: Nothing to be done for `_depend'.
make[1]: Leaving directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
cpu/arm_cortexa8'
make -C tools all
make[1]: Entering directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
tools'
make[1]: Leaving directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
tools'
make -C tools/env all MTD_VERSION= || exit 1
make[1]: Entering directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
tools/env'
ln -s ../../lib_generic/crc32.c crc32.c
make[1]: Leaving directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
tools/env'
make[1]: Entering directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
tools/env'
arm-angstrom-linux-gnueabi-gcc -Wall -DUSE_HOSTCC -I/home/olaf/
beagleboard/angstrom/jan2011/angstrom-setup-scripts/build/tmp-
angstrom_2008_1/work/beagleboard-angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
include crc32.c fw_env.c fw_env_main.c -o fw_printenv
/home/olaf/beagleboard/angstrom/jan2011/angstrom-setup-scripts/build/
tmp-angstrom_2008_1/sysroots/i686-linux/usr/armv7a-hardfp/lib/gcc/arm-
angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/
bin/ld: error: /tmp/ccxWId0R.o uses VFP register arguments,
fw_printenv does not
/home/olaf/beagleboard/angstrom/jan2011/angstrom-setup-scripts/build/
tmp-angstrom_2008_1/sysroots/i686-linux/usr/armv7a-hardfp/lib/gcc/arm-
angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/
bin/ld: failed to merge target specific data of file /tmp/ccxWId0R.o
/home/olaf/beagleboard/angstrom/jan2011/angstrom-setup-scripts/build/
tmp-angstrom_2008_1/sysroots/i686-linux/usr/armv7a-hardfp/lib/gcc/arm-
angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/
bin/ld: error: /tmp/ccyryatE.o uses VFP register arguments,
fw_printenv does not
/home/olaf/beagleboard/angstrom/jan2011/angstrom-setup-scripts/build/
tmp-angstrom_2008_1/sysroots/i686-linux/usr/armv7a-hardfp/lib/gcc/arm-
angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/
bin/ld: failed to merge target specific data of file /tmp/ccyryatE.o
/home/olaf/beagleboard/angstrom/jan2011/angstrom-setup-scripts/build/
tmp-angstrom_2008_1/sysroots/i686-linux/usr/armv7a-hardfp/lib/gcc/arm-
angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/
bin/ld: error: /tmp/ccCS9d1q.o uses VFP register arguments,
fw_printenv does not
/home/olaf/beagleboard/angstrom/jan2011/angstrom-setup-scripts/build/
tmp-angstrom_2008_1/sysroots/i686-linux/usr/armv7a-hardfp/lib/gcc/arm-
angstrom-linux-gnueabi/4.5.3/../../../../arm-angstrom-linux-gnueabi/
bin/ld: failed to merge target specific data of file /tmp/ccCS9d1q.o
collect2: ld returned 1 exit status
make[1]: *** [fw_printenv] Error 1
make[1]: Leaving directory `/home/olaf/beagleboard/angstrom/jan2011/
angstrom-setup-scripts/build/tmp-angstrom_2008_1/work/beagleboard-
angstrom-linux-gnueabi/u-
boot-2010.03+r70+gitrca6e1c136ddb720c3bb2cc043b99f7f06bc46c55-r70/git/
tools/env'
make: *** [env] Error 1
FATAL: oe_runmake failed
ERROR: Function do_compile failed