[Clfs-support] Target specific options...

Steven Swann sjs205.linux at gmail.com
Sat Feb 5 20:49:54 PST 2011


Hello all,

I'm having a little trouble with my current ARM build in that I can't seem
to get the CFLAGS and BUILD flags set up correctly.

Basically, I'm trying to take the compilation one-step further by ensuring
that my final system takes advantages of all the possible features of my ARM
core, rather than it being designed for the generic ARM architecture. With
this in mind, the problems seem to stem from having the flags set up
incorrectly.

My process so far and the logic behind it:

When building the cross compile tools I leave the CFLAGS variable empty and
use the following build flags '-mabi=aapcs-linux -mfloat-abi=softfp'. I have
chosen the softfp options since the FPU for my processor isn't 100% ieee
compatable.

>From here I compile the static compiler, build uClibc with the .config
supplied, with the only change being support for EABI rather than the OABI.
I then compile the final compiler and all seems fine. I leave the remaining
configuration of uClibc as is; my logic here is that I wish to compile the
tool suit with generic processor options so that I can pass the architecture
specific options when compiling the actual target software.

Once I am ready to build the target software I simply add the following
CFLAGS: "-mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp".

The problems then starts when it comes to using the tool suite with these
CFLAGS. At first busybox failed when issuing the make command with:

"  CC      applets/applets.o
applets/applets.c:1:0: sorry, unimplemented: -mfloat-abi=hard and VFP
make[1]: *** [applets/applets.o] Error 1
make: *** [applets_dir] Error 2
"

So I removed the "-mfloat-abi=softfp" build flag and busybox compiles fine.
Is this a bug? Since I haven't selected the use of the hard FLU ABI...


I then start to try and configure e2fsprogs and this fails too with:
"checking for arm-unknown-linux-uclibc-gcc... arm-unknown-linux-uclibc-gcc
-mabi=aapcs-linux -mfloat-abi=softfp -Os
checking whether the C compiler works... no
"

If I then remove both of the build flags from the configure command it
configures fine:
CC="${CC} ${BUILD} -Os" ../configure --prefix=/usr
 --with-root-prefix="" --host=${CLFS_TARGET} --disable-tls
 --disable-debugfs --disable-e2initrd-helper --disable-nls



I have tried a number of options with the building of the toolsuit, I tried
adding the target specific options to the uClibc .config but this seemed to
make problems worse since I couldn't get busybox to compile using the tools
due to "ld, cannot find -lfloat".

With this in mind I am a little stuck. If somebody could please give me some
guidance on this is would be greatly appreciated. If I am going about it the
wrong way then please let me know.

sjs105

Hardware
Target:
Samsung s3c6410,
ARM core: arm1176jzf-s
FPU: VFPv2

.bashrc
set +h
umask 022
ARMCROSS=/mnt/arm-cross
LC_ALL=POSIX
PATH=${ARMCROSS}/cross-tools/bin:/bin:/usr/bin
export ARMCROSS LC_ALL PATH
unset CFLAGS
unset CXXFLAGS
export BUILD="-mabi=aapcs-linux -mfloat-abi=softfp"
export CLFS_HOST="i486-cross-linux-gnu"
export CLFS_TARGET="arm-unknown-linux-uclibc"
export CLFS_ARCH="arm"
export CLFS_ENDIAN="little"
export CC="arm-unknown-linux-uclibc-gcc"
export CXX="arm-unknown-linux-uclibc-g++"
export AR="arm-unknown-linux-uclibc-ar"
export AS="arm-unknown-linux-uclibc-as"
export LD="arm-unknown-linux-uclibc-ld"
export RANLIB="arm-unknown-linux-uclibc-ranlib"
export READELF="arm-unknown-linux-uclibc-readelf"
export STRIP="arm-unknown-linux-uclibc-strip"
export CFLAGS="-mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp "
export CXXFLAGS="-mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clfs.org/pipermail/clfs-support-clfs.org/attachments/20110206/aca271dd/attachment.html>


More information about the Clfs-support mailing list