This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: need help with gcc 4.1.0 crosscompiler for arm


On 4/13/06, Niklaus <niklaus@gmail.com> wrote
> How did you try to build gcc-4.1. Can you give the whole build command.
> Please provide more details so that we can help you out.
>

I've attached a shar file with all the details. Unpack it into an
empty directory,  cd to that directory, and try 'sh ./makeit' This
will fetch binutils and gcc; configure and make binutils and gcc; and
then attempt to use arm-elf-gcc to compile a tiny c program that
demonstrates the problem. (Obviously, if you already have binutils and
gcc tgz files, you can comment out the wgets before running the script
and replace them with references to your local copies.)

----- demo.c
int _start()
{
        double f = 1.23;
        return f;
}
-----


Basically, if I tell arm-elf-gcc which arm processor I'm using, it
recognizes that the processor has no floating point, so arm-elf-ld
fails, as it should, with the messages:

sponge:sf 500:arm/bin/arm-elf-gcc -mthumb-interwork -msoft-float
-mcpu=arm926ej-s -c demo.c
sponge:sf 501: arm/bin/arm-elf-ld -o demo.elf demo.o 
arm/lib/gcc/arm-elf/4.1.0/interwork/libgcc.a

arm/bin/arm-elf-ld: ERROR:
arm/lib/gcc/arm-elf/4.1.0/interwork/libgcc.a(_fixdfsi.o) uses FPA
instructions, whereas demo.elf does not
arm/bin/arm-elf-ld: failed to merge target specific data of file
arm/lib/gcc/arm-elf/4.1.0/interwork/libgcc.a(_fixdfsi.o)


if I remove '-mcpu=arm926ej-s' from the compile, then the ld will
work, but i'll end up with floating point instructions on an arm
processor that has no fp.

The configuration and make steps from the attached script are:

mkdir binutils-build
cd binutils-build
../binutils-2.16.1/configure --prefix=$BASE/arm --target=arm-elf
--enable-interwork --enable-multilib --with-float=soft
make all && make install
cd ..

mkdir gcc-build
cd gcc-build
../gcc-4.1.0/configure --prefix=$BASE/arm --target=arm-elf
--enable-languages=c --with-float=soft --enable-interwork

make all-gcc && make install-gcc
cd ..

The problem seems to be that I'm not passing the right arguments to
gcc-4.1.0/configure to cause it to not build libgcc.a with floating
point.

All help is appreciated.

If the shar file attachment doesn't make it through, it can be picked up via
wget http://www.fogey.com/bug.shar

or

wget http://www.fogey.com/bug.tgz

Marty

Attachment: bug.shar
Description: Unix shell archive


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]