Floating point for Arm-elf
David Mc Kenna
mckennad@esatclear.ie
Fri May 17 05:47:00 GMT 2002
Hi all,
I have configures and built successfully gcc3.0.4 and gcc3.1 . But when I go
to compile a simple program with floating point arithmithic I get the following
error in both versions:-
/c/win/arm/lib/gcc-lib/arm-elf/3.1/../../../../arm-elf/bin/ld: cannot open crti.o:
No such file or directory
collect2: ld returned 1 exit status
I have modified t-arm-elf such that it :
MULTILIB_OPTIONS += mhard-float/msoft-float
MULTILIB_DIRNAMES += fpu soft
are not commented in. I then compile binutils/gcc/newlib/insight using the following
script.
export MAKE_MODE=UNIX
export host=i686-pc-cygwin
export build=i686-pc-cygwin
export target=arm-elf
export prefix=/c/win/arm
export src_root=/usr/local/src/gnu
export gccver=gcc-3.1
export newlibver=newlib-1.10.0
export gdbver=gdb-5.2
export insightver=insight-5.2
export binutilsver=binutils-2.12.1
export PATH=$prefix/bin:$PATH
\rm -fr $src_root
\rm -rf $prefix
cd
echo Starting $target
echo Starting Setup
cd /usr/local/src
mkdir gnu
cd gnu
mkdir build
mkdir build/binutils
mkdir build/gcc
mkdir build/newlib
mkdir build/insight
mkdir build/logs
bunzip2 /tmp/$binutilsver.tar.bz2
bunzip2 /tmp/$newlibver.tar.bz2
bunzip2 /tmp/$insightver.tar.bz2
bunzip2 /tmp/$gccver.tar.bz2
tar -xf /tmp/$binutilsver.tar
tar -xf /tmp/$newlibver.tar
tar -xf /tmp/$insightver.tar
tar -xf /tmp/$gccver.tar
bzip2 /tmp/$binutilsver.tar
bzip2 /tmp/$newlibver.tar
bzip2 /tmp/$insightver.tar
bzip2 /tmp/$gccver.tar
cp /home/dmckenn/script/t-arm-elf $src_root/$gccver/gcc/config/arm
echo Setup Completed
echo Starting Binutils
cd $src_root/BUILD/binutils && \rm -rf *
../../$binutilsver/configure \
--with-included-gettext \
--target=$target --host=$host --build=$build \
--prefix=$prefix -v > ../logs/$target-$binutilsver-configure.log 2>&1
# Make Binutils
make -w all install > ../logs/$target-$binutilsver-make.log 2>&1
echo Binutils Completed
echo Starting Gcc $gccver
cd $src_root/BUILD/gcc && rm -rf *
echo Configure and make bootstrap compiler
The program that I am trying to compile is :
#include<stdio.h>
int main ( void )
{
int i = 0;
float f = 0.2222;
printf(" %f \n ",f);
for( i = 0; i < 10; i++ )
{
printf( "%d Hello World \n", i );
}
return 0;
}
The gcc command that I use to compile is :
/c/win/arm/bin/arm-elf-gcc.exe -g -mlittle-endian -mcpu=arm7tdmi -msoft-float
-mthumb-interwork -mthumb \
-O0 $1.c -o $1.elf
where $1 is the file name less extension.
Any help is appreciated.
Thanks in advance,
Dave McKenna
Sun Tzu once wrote......
The supreme act of war is to subdue the enemy without fighting....
--
http://www.iol.ie
------
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