question on libgcc and soft-float

yuwen yuwen@micetek.com.cn
Thu Jul 24 02:19:00 GMT 2003


Hi, Dear All

I've checked the mail archive and seen some mail about the
problem. But I still don't know how to make libgcc use soft-float.

I use binutils-2.13.1 + gcc-3.2.3 + newlib-1.11.0 to build a cross
tool chain for arm-elf (without Linux OS) on Cygwin.

This is my configure command:

mkdir /cygdrive/c/build/build-{bin,gcc,newlib}

cd /cygdrive/c/build/build-bin

/cygdrive/c/build/binutils-2.13.1/configure --target=arm-elf \
--prefix=/cygdrive/c/bar --nfp
make all install

Then I modify gcc/config/arm/t-arm-elf, uncomment these lines:
 MULTILIB_OPTIONS    += mhard-float/msoft-float
 MULTILIB_DIRNAMES   += fpu soft

cd /cygdrive/c/build/build-gcc
/cygdrive/c/build/gcc-3.2.3/configure --target=arm-elf \
--prefix=/cygdrive/c/bar --with-newlib \
--with-headers=/cygdrive/c/build/newlib-1.11.0/newlib/libc/include \
--enable-languages=c --disable-threads --nfp

make all install

cd /cygdrive/c/build/build-newlib
/cygdrive/c/build/newlib-1.11.0/configure --target=arm-elf \
--prefix=/cygdrive/c/bar --srcdir=/cygdrive/c/build/newlib-1.11.0 --nfp

make all install \
        CC_FOR_TARGET=/cygdrive/c/bar/bin/arm-elf-gcc \
        AS_FOR_TARGET=/cygdrive/c/bar/bin/arm-elf-as \
        LD_FOR_TARGET=/cygdrive/c/bar/bin/arm-elf-ld \
        AR_FOR_TARGET=/cygdrive/c/bar/bin/arm-elf-ar \
        RANLIB_FOR_TARGET=/cygdrive/c/bar/bin/arm-elf-ranlib

In this way, my own toolchain was build.  Then I use it to compile a
simple C program. There're error messages like this:

bar/bin/../lib/gcc-lib/arm-elf/3.2.3/libgcc.a(_ashldi3.o) uses FPA 
instructions,
 whereas a1.elf uses VFP instructions

If I add -msoft-float to CFLAGS, the error message is:
bar/bin/../lib/gcc-lib/arm-elf/3.2.3/libgcc.a(_ashldi3.o) uses hardware 
FP, wher
eas a1.elf uses software FP


If I add -mfpu=fpa to AFLAGS, no error message. My program linked
successfully.

My question is how to make libgcc use soft float? Both "-nfp" and
modification of t-arm-elf seems having no effect?

And I also notice there was only directory named `fpu' created in
bar/lib/gcc-lib/arm-elf/3.2.3/, no `soft' directory.

Best regards,
Dai Yuwen



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list